Skip to content

Replace Psalm to PHPStan - #229

Merged
vjik merged 14 commits into
masterfrom
phpstan
Oct 27, 2026
Merged

vjik merged 14 commits into
masterfrom
phpstan

Conversation

@vjik

@vjik vjik commented Oct 27, 2026

Copy link
Copy Markdown
Member
Q A
Is bugfix? ❌
New feature? ❌
Breaks BC? ❌

vjik added 13 commits October 26, 2026 16:19
# Conflicts:
#	src/ParseResult/ValueProcessor/RichTextValue.php
#	src/RichTextConverter.php
#	src/Type/InputFile.php
#	src/Type/InputRichBlockBlockQuotation.php
#	src/Type/InputRichBlockExpandableBlockQuotation.php
#	src/Type/InputRichBlockFooter.php
#	src/Type/InputRichBlockParagraph.php
#	src/Type/InputRichBlockPreformatted.php
#	src/Type/InputRichBlockPullQuotation.php
#	src/Type/InputRichBlockSectionHeading.php
#	src/Type/InputRichBlockTable.php
#	src/Type/InputRichBlockThinking.php
#	src/Type/RichBlockBlockQuotation.php
#	src/Type/RichBlockCaption.php
#	src/Type/RichBlockExpandableBlockQuotation.php
#	src/Type/RichBlockFooter.php
#	src/Type/RichBlockParagraph.php
#	src/Type/RichBlockPreformatted.php
#	src/Type/RichBlockPullQuotation.php
#	src/Type/RichBlockSectionHeading.php
#	src/Type/RichBlockTable.php
#	src/Type/RichBlockTableCell.php
#	src/Type/RichBlockThinking.php
#	src/Type/RichMessageButton.php
#	src/Type/RichTextAnchorLink.php
#	src/Type/RichTextBankCardNumber.php
#	src/Type/RichTextBold.php
#	src/Type/RichTextBotCommand.php
#	src/Type/RichTextCashtag.php
#	src/Type/RichTextCode.php
#	src/Type/RichTextDateTime.php
#	src/Type/RichTextEmailAddress.php
#	src/Type/RichTextHashtag.php
#	src/Type/RichTextItalic.php
#	src/Type/RichTextMarked.php
#	src/Type/RichTextMention.php
#	src/Type/RichTextPhoneNumber.php
#	src/Type/RichTextReference.php
#	src/Type/RichTextReferenceLink.php
#	src/Type/RichTextSpoiler.php
#	src/Type/RichTextStrikethrough.php
#	src/Type/RichTextSubscript.php
#	src/Type/RichTextSuperscript.php
#	src/Type/RichTextTextMention.php
#	src/Type/RichTextUnderline.php
#	src/Type/RichTextUrl.php
Allows passing concrete methods, e.g. SendMessage, where MethodInterface<mixed> is expected.
@vjik
vjik requested a balanced review from Copilot October 27, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

No blocking findings were reported, but the cross-cutting analyzer and type-contract migration warrants final human review.

No open issues 🎉

What changed in this PR

Replaces Psalm with PHPStan across the library and tests. Production changes are limited to type annotations; test updates make existing expectations explicit for stricter analysis.

Changes:

  • Replace Psalm tooling with PHPStan, PHPUnit integration, and dead-code detection; update CI and documentation.
  • Migrate type aliases, generics, serialization contracts, and collection annotations.
  • Refine test assertions, upload fixtures, stream helpers, and mocks.
File Description
tools/​psalm/​composer.json Remove isolated Psalm dependency.
tests/​WebhookResponse/​WebhookResponseTest.php Use a valid file-path fixture.
tests/​Type/​VideoTest.php Narrow nullable media collections.
tests/​Type/​VideoChatStartedTest.php Explicitly assert empty object state.
tests/​Type/​Update/​UpdateTest.php Refine nullable-field and logger assertions.
tests/​Type/​UniqueGiftInfoTest.php Refine parsed-gift assertions.
tests/​Type/​TextQuoteTest.php Assert nullable entities are present.
tests/​Type/​Sticker/​StickerSetTest.php Assert thumbnail presence.
tests/​Type/​Sticker/​InputStickerTest.php Use a valid file-path fixture.
tests/​Type/​SharedUserTest.php Assert nullable photos are present.
tests/​Type/​RichBlockTableTest.php Reorder cell-type assertions.
tests/​Type/​RichBlockPhotoTest.php Reorder photo-type assertions.
tests/​Type/​RichBlockListTest.php Reorder item-type assertions.
tests/​Type/​ResponseParametersTest.php Add return type and presence assertion.
tests/​Type/​ReactionCountTest.php Narrow the reaction implementation.
tests/​Type/​PollTest.php Narrow nullable entity collections.
tests/​Type/​PollOptionTest.php Assert optional entities and authors.
tests/​Type/​PollOptionDeletedTest.php Narrow nullable option entities.
tests/​Type/​PollOptionAddedTest.php Narrow nullable option entities.
tests/​Type/​PollMediaTest.php Assert nullable photos are present.
tests/​Type/​Payment/​TransactionPartnerUserTest.php Assert affiliate presence.
tests/​Type/​Payment/​TransactionPartnerChatTest.php Assert gift presence.
tests/​Type/​Payment/​TransactionPartnerAffiliateProgramTest.php Assert sponsor presence.
tests/​Type/​Payment/​AffiliateInfoTest.php Assert affiliate-object presence.
tests/​Type/​OwnedGiftRegularTest.php Refine gift and entity assertions.
tests/​Type/​MessageReactionUpdatedTest.php Narrow reaction implementations.
tests/​Type/​MessageReactionCountUpdatedTest.php Narrow the reaction implementation.
tests/​Type/​ManagedBotUpdatedTest.php Remove redundant nested-type assertions.
tests/​Type/​ManagedBotCreatedTest.php Remove a redundant nested-type assertion.
tests/​Type/​LivePhotoTest.php Assert nullable photos are present.
tests/​Type/​InputStoryContentVideoTest.php Update file fixtures and redundant assertions.
tests/​Type/​InputStoryContentPhotoTest.php Update file fixture and redundant assertion.
tests/​Type/​InputRichMessageTest.php Use valid file-path fixtures.
tests/​Type/​InputRichMessageMediaTest.php Use a valid file-path fixture.
tests/​Type/​InputRichBlockVoiceNoteTest.php Update upload fixture.
tests/​Type/​InputRichBlockVideoTest.php Update upload fixture.
tests/​Type/​InputRichBlockSlideshowTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockPhotoTest.php Update upload fixture.
tests/​Type/​InputRichBlockParagraphTest.php Annotate data and intentional invalid inputs.
tests/​Type/​InputRichBlockListTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockListItemTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockDocumentTest.php Update upload fixture.
tests/​Type/​InputRichBlockDetailsTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockCollageTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockBlockQuotationTest.php Update nested upload fixture.
tests/​Type/​InputRichBlockAudioTest.php Update upload fixture.
tests/​Type/​InputRichBlockAnimationTest.php Update upload fixture.
tests/​Type/​InputProfilePhotoStaticTest.php Update file fixture and redundant assertion.
tests/​Type/​InputProfilePhotoAnimatedTest.php Update file fixtures and redundant assertions.
tests/​Type/​InputPaidMediaVideoTest.php Update upload fixtures.
tests/​Type/​InputPaidMediaPhotoTest.php Update upload fixture.
tests/​Type/​InputPaidMediaLivePhotoTest.php Update upload fixtures.
tests/​Type/​InputMediaVoiceNoteTest.php Update upload fixture.
tests/​Type/​InputMediaVideoTest.php Update upload fixtures.
tests/​Type/​InputMediaStickerTest.php Update upload fixture.
tests/​Type/​InputMediaPhotoTest.php Update upload fixture.
tests/​Type/​InputMediaLivePhotoTest.php Update upload fixtures.
tests/​Type/​InputMediaDocumentTest.php Update upload fixtures.
tests/​Type/​InputMediaAudioTest.php Update upload fixtures.
tests/​Type/​InputMediaAnimationTest.php Update upload fixtures.
tests/​Type/​InputFileTest.php Open resources through the checked helper.
tests/​Type/​InlineKeyboardButtonTest.php Assert optional button objects exist.
tests/​Type/​Inline/​ChosenInlineResultTest.php Assert location presence.
tests/​Type/​GiftInfoTest.php Refine gift and entity assertions.
tests/​Type/​GeneralForumTopicUnhiddenTest.php Explicitly assert empty object state.
tests/​Type/​GeneralForumTopicHiddenTest.php Explicitly assert empty object state.
tests/​Type/​ForumTopicReopenedTest.php Explicitly assert empty object state.
tests/​Type/​ForumTopicClosedTest.php Explicitly assert empty object state.
tests/​Type/​ExternalReplyInfoTest.php Refine nullable media assertions.
tests/​Type/​CommunityChatRemovedTest.php Explicitly assert empty object state.
tests/​Type/​ChecklistTest.php Narrow nullable title entities.
tests/​Type/​ChecklistTaskTest.php Narrow nullable task entities.
tests/​Type/​ChatSharedTest.php Assert nullable photos are present.
tests/​Type/​ChatMemberUpdatedTest.php Narrow membership implementations.
tests/​Type/​ChatJoinRequestTest.php Access the required date directly.
tests/​Type/​ChatFullInfoTest.php Reuse established community narrowing.
tests/​Type/​BotAccessSettingsTest.php Assert nullable users are present.
tests/​Transport/​MimeTypeResolver/​CustomMimeTypeResolverTest.php Use checked resource creation.
tests/​Transport/​MimeTypeResolver/​ApacheMimeTypeResolverTest.php Use checked resource creation.
tests/​Transport/​CurlTransport/​CurlTransportTest.php Narrow options and use checked streams.
tests/​Transport/​CurlTransport/​CurlTransportDownloadFileTest.php Assert captured options exist.
tests/​TelegramBotApi/​DownloadFileStreamCopyError/​DownloadFileStreamCopyErrorTest.php Use checked resource creation.
tests/​TelegramBotApi/​DownloadFileCopiesStream/​DownloadFileCopiesStreamTest.php Refine stream and metadata handling.
tests/​Support/​TransportMock.php Type captured request collections.
tests/​Support/​TestHelper.php Add checked file helpers and socket typing.
tests/​Support/​Color.php Suppress intentional fixture diagnostics.
tests/​Support/​Car.php Suppress intentional fixture diagnostics.
tests/​ParseResult/​ValueProcessor/​TransactionPartnerValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​RevenueWithdrawalStateValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​PaidMediaValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​OwnedGiftValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​MenuButtonValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​ChatMemberValueTest.php Annotate data-provider parameters.
tests/​ParseResult/​ValueProcessor/​BackgroundTypeValueTest.php Annotate data-provider parameters.
tests/​Method/​UpdatingMessage/​StopPollTest.php Narrow the returned poll.
tests/​Method/​UpdatingMessage/​EditMessageMediaTest.php Update upload fixture.
tests/​Method/​UpdatingMessage/​EditEphemeralMessageMediaTest.php Update upload fixture.
tests/​Method/​Update/​SetWebhookTest.php Update certificate fixture.
tests/​Method/​Update/​GetWebhookInfoTest.php Narrow returned webhook information.
tests/​Method/​Update/​GetUpdatesTest.php Assert an array result.
tests/​Method/​Sticker/​UploadStickerFileTest.php Update fixtures and narrow returned file.
tests/​Method/​Sticker/​SetStickerSetThumbnailTest.php Update upload fixture.
tests/​Method/​Sticker/​SendStickerTest.php Update fixture and narrow returned message.
tests/​Method/​Sticker/​ReplaceStickerInSetTest.php Update upload fixture.
tests/​Method/​Sticker/​GetStickerSetTest.php Narrow the returned sticker set.
tests/​Method/​Sticker/​GetAvailableGiftsTest.php Narrow the returned gift collection.
tests/​Method/​Sticker/​AddStickerToSetTest.php Update upload fixture.
tests/​Method/​SetMyProfilePhotoTest.php Update upload fixtures.
tests/​Method/​SetBusinessAccountProfilePhotoTest.php Update upload fixtures.
tests/​Method/​SetBusinessAccountGiftSettingsTest.php Remove a redundant processor assertion.
tests/​Method/​SetBusinessAccountBioTest.php Remove a redundant processor assertion.
tests/​Method/​SendVoiceTest.php Update fixture and narrow returned message.
tests/​Method/​SendVideoTest.php Update fixtures and narrow returned message.
tests/​Method/​SendVideoNoteTest.php Update fixtures and narrow returned message.
tests/​Method/​SendVenueTest.php Narrow the returned message.
tests/​Method/​SendRichMessageTest.php Narrow the returned message.
tests/​Method/​SendPollTest.php Update fixtures and narrow returned message.
tests/​Method/​SendPhotoTest.php Update fixture and narrow returned message.
tests/​Method/​SendPaidMediaTest.php Update fixture and narrow returned message.
tests/​Method/​SendMessageTest.php Narrow the returned message.
tests/​Method/​SendMediaGroupTest.php Update upload fixture.
tests/​Method/​SendLocationTest.php Narrow the returned message.
tests/​Method/​SendLivePhotoTest.php Update fixtures and narrow returned message.
tests/​Method/​SendDocumentTest.php Update fixtures and narrow returned message.
tests/​Method/​SendDiceTest.php Narrow the returned message.
tests/​Method/​SendContactTest.php Narrow the returned message.
tests/​Method/​SendChecklistTest.php Narrow the returned message.
tests/​Method/​SendAudioTest.php Update fixtures and narrow returned message.
tests/​Method/​SendAnimationTest.php Update fixtures and narrow returned message.
tests/​Method/​RevokeChatInviteLinkTest.php Narrow the returned invite link.
tests/​Method/​PostStoryTest.php Update upload fixtures.
tests/​Method/​Payment/​SendInvoiceTest.php Narrow the returned message.
tests/​Method/​Payment/​GetStarTransactionsTest.php Narrow returned transactions.
tests/​Method/​Inline/​AnswerWebAppQueryTest.php Narrow the returned web-app message.
tests/​Method/​Inline/​AnswerGuestQueryTest.php Narrow the returned guest message.
tests/​Method/​GetUserProfilePhotosTest.php Narrow returned profile photos.
tests/​Method/​GetUserProfileAudiosTest.php Narrow returned profile audio.
tests/​Method/​GetUserChatBoostsTest.php Narrow returned boosts.
tests/​Method/​GetMyShortDescriptionTest.php Narrow the returned description.
tests/​Method/​GetMyNameTest.php Narrow the returned bot name.
tests/​Method/​GetMyDefaultAdministratorRightsTest.php Narrow returned administrator rights.
tests/​Method/​GetMyCommandsTest.php Assert an array result.
tests/​Method/​GetMeTest.php Correct class casing and narrow returned user.
tests/​Method/​GetManagedBotAccessSettingsTest.php Assert nullable users are present.
tests/​Method/​GetFileTest.php Narrow the returned file.
tests/​Method/​GetChatTest.php Narrow returned chat information.
tests/​Method/​GetChatAdministratorsTest.php Assert an array result.
tests/​Method/​GetBusinessConnectionTest.php Narrow the returned connection.
tests/​Method/​Game/​SendGameTest.php Narrow the returned message.
tests/​Method/​Game/​GetGameHighScoresTest.php Assert an array result.
tests/​Method/​ForwardMessageTest.php Narrow the returned message.
tests/​Method/​ForwardMessagesTest.php Assert an array result.
tests/​Method/​EditStoryTest.php Update upload fixtures.
tests/​Method/​EditMessageChecklistTest.php Narrow the returned message.
tests/​Method/​EditChatSubscriptionInviteLinkTest.php Narrow the returned invite link.
tests/​Method/​EditChatInviteLinkTest.php Narrow the returned invite link.
tests/​Method/​CreateForumTopicTest.php Narrow the returned forum topic.
tests/​Method/​CreateChatSubscriptionInviteLinkTest.php Narrow the returned invite link.
tests/​Method/​CreateChatInviteLinkTest.php Narrow the returned invite link.
tests/​Method/​CopyMessageTest.php Narrow the returned message identifier.
tests/​Method/​CopyMessagesTest.php Assert an array result.
tests/​LogContextFactoryTest.php Annotate inputs and use checked streams.
tests/​InputFileCollectorTest.php Update file-path fixtures.
tests/​DownloadedFile/​SaveTo/​SaveToTest.php Use checked resource creation.
tests/​DownloadedFile/​DownloadedFileTest.php Use checked resource creation.
tests/​CustomMethodTest.php Update upload fixture.
tests/​Curl/​CurlMock.php Type options and guard resource writes.
src/​WebhookResponse/​WebhookResponse.php Annotate generic methods and response data.
src/​WebhookResponse/​JsonWebhookResponseFactory.php Annotate generic method input.
src/​Type/​WebAppInfo.php Annotate serialized data.
src/​Type/​UserProfilePhotos.php Consolidate nested collection typing.
src/​Type/​User.php Annotate serialized data.
src/​Type/​Update/​Update.php Migrate conditional and raw-data annotations.
src/​Type/​SwitchInlineQueryChosenChat.php Annotate serialized data.
src/​Type/​SuggestedPostPrice.php Annotate serialized data.
src/​Type/​SuggestedPostParameters.php Annotate serialized data.
src/​Type/​StoryAreaType.php Migrate serialization return annotation.
src/​Type/​StoryAreaPosition.php Annotate serialized data.
src/​Type/​StoryArea.php Annotate serialized data.
src/​Type/​Sticker/​MaskPosition.php Annotate serialized data.
src/​Type/​Sticker/​InputSticker.php Annotate serialized data.
src/​Type/​RichTextUrl.php Migrate rich-text alias import.
src/​Type/​RichTextUnderline.php Migrate rich-text alias import.
src/​Type/​RichTextTextMention.php Migrate rich-text alias import.
src/​Type/​RichTextSuperscript.php Migrate rich-text alias import.
src/​Type/​RichTextSubscript.php Migrate rich-text alias import.
src/​Type/​RichTextStrikethrough.php Migrate rich-text alias import.
src/​Type/​RichTextSpoiler.php Migrate rich-text alias import.
src/​Type/​RichTextReferenceLink.php Migrate rich-text alias import.
src/​Type/​RichTextReference.php Migrate rich-text alias import.
src/​Type/​RichTextPhoneNumber.php Migrate rich-text alias import.
src/​Type/​RichTextMention.php Migrate rich-text alias import.
src/​Type/​RichTextMarked.php Migrate rich-text alias import.
src/​Type/​RichTextItalic.php Migrate rich-text alias import.
src/​Type/​RichTextHashtag.php Migrate rich-text alias import.
src/​Type/​RichTextEmailAddress.php Migrate rich-text alias import.
src/​Type/​RichTextDateTime.php Migrate rich-text alias import.
src/​Type/​RichTextCode.php Migrate rich-text alias import.
src/​Type/​RichTextCashtag.php Migrate rich-text alias import.
src/​Type/​RichTextBotCommand.php Migrate rich-text alias import.
src/​Type/​RichTextBold.php Migrate rich-text alias import.
src/​Type/​RichTextBankCardNumber.php Migrate rich-text alias import.
src/​Type/​RichTextAnchorLink.php Migrate rich-text alias import.
src/​Type/​RichText.php Define the PHPStan rich-text alias.
src/​Type/​RichMessageButton.php Migrate rich-text alias import.
src/​Type/​RichBlockThinking.php Migrate rich-text alias import.
src/​Type/​RichBlockTableCell.php Migrate rich-text alias import.
src/​Type/​RichBlockTable.php Migrate rich-text alias import.
src/​Type/​RichBlockSectionHeading.php Migrate rich-text alias import.
src/​Type/​RichBlockPullQuotation.php Migrate rich-text alias import.
src/​Type/​RichBlockPreformatted.php Migrate rich-text alias import.
src/​Type/​RichBlockParagraph.php Migrate rich-text alias import.
src/​Type/​RichBlockFooter.php Migrate rich-text alias import.
src/​Type/​RichBlockExpandableBlockQuotation.php Migrate rich-text alias import.
src/​Type/​RichBlockDetails.php Migrate rich-text alias import.
src/​Type/​RichBlockCaption.php Migrate rich-text alias import.
src/​Type/​RichBlockBlockQuotation.php Migrate rich-text alias import.
src/​Type/​ResponseParameters.php Annotate decoded response input.
src/​Type/​ReplyParameters.php Annotate serialized data.
src/​Type/​ReplyKeyboardRemove.php Annotate serialized data.
src/​Type/​ReplyKeyboardMarkup.php Clarify keyboard and serialization types.
src/​Type/​ReactionType.php Annotate serialization contract.
src/​Type/​Payment/​TransactionPartnerUser.php Type the paid-media collection.
src/​Type/​Payment/​ShippingOption.php Annotate serialized data.
src/​Type/​Payment/​LabeledPrice.php Annotate serialized data.
src/​Type/​Passport/​PassportElementError.php Annotate serialization contract.
src/​Type/​MessageEntity.php Annotate serialized data.
src/​Type/​MenuButton.php Annotate serialization contract.
src/​Type/​LoginUrl.php Annotate serialized data.
src/​Type/​LocationAddress.php Annotate serialized data.
src/​Type/​LinkPreviewOptions.php Annotate serialized data.
src/​Type/​KeyboardButtonRequestUsers.php Annotate serialized data.
src/​Type/​KeyboardButtonRequestManagedBot.php Annotate serialized data.
src/​Type/​KeyboardButtonRequestChat.php Annotate serialized data.
src/​Type/​KeyboardButtonPollType.php Annotate serialized data.
src/​Type/​KeyboardButton.php Annotate serialized data.
src/​Type/​InputStoryContent.php Migrate serialization return annotation.
src/​Type/​InputRichBlockThinking.php Migrate rich-text alias import.
src/​Type/​InputRichBlockTable.php Migrate rich-text alias import.
src/​Type/​InputRichBlockSectionHeading.php Migrate rich-text alias import.
src/​Type/​InputRichBlockPullQuotation.php Migrate rich-text alias import.
src/​Type/​InputRichBlockPreformatted.php Migrate rich-text alias import.
src/​Type/​InputRichBlockParagraph.php Migrate rich-text alias import.
src/​Type/​InputRichBlockFooter.php Migrate rich-text alias import.
src/​Type/​InputRichBlockExpandableBlockQuotation.php Migrate rich-text alias import.
src/​Type/​InputRichBlockDetails.php Migrate rich-text alias import.
src/​Type/​InputRichBlockBlockQuotation.php Migrate rich-text alias import.
src/​Type/​InputProfilePhoto.php Migrate serialization return annotation.
src/​Type/​InputPollOptionMedia.php Migrate serialization return annotation.
src/​Type/​InputPollOption.php Annotate serialized data.
src/​Type/​InputPollMedia.php Migrate serialization return annotation.
src/​Type/​InputPaidMedia.php Annotate serialization contract.
src/​Type/​InputMedia.php Migrate serialization return annotation.
src/​Type/​InputChecklistTask.php Annotate serialized data.
src/​Type/​InputChecklist.php Annotate serialized data.
src/​Type/​InlineKeyboardMarkup.php Clarify keyboard and serialization types.
src/​Type/​InlineKeyboardButton.php Annotate serialized data.
src/​Type/​Inline/​InputMessageContent.php Annotate serialization contract.
src/​Type/​Inline/​InlineQueryResultsButton.php Annotate serialized data.
src/​Type/​Inline/​InlineQueryResult.php Annotate serialization contract.
src/​Type/​Game/​CallbackGame.php Annotate serialized data.
src/​Type/​ForceReply.php Annotate serialized data.
src/​Type/​DisabledButton.php Annotate serialized data.
src/​Type/​CopyTextButton.php Annotate serialized data.
src/​Type/​ChatPermissions.php Annotate serialized data.
src/​Type/​ChatAdministratorRights.php Annotate serialized data.
src/​Type/​BotCommandScope.php Annotate serialization contract.
src/​Type/​BotCommand.php Annotate serialized data.
src/​Type/​AcceptedGiftTypes.php Annotate serialized data.
src/​Transport/​TransportInterface.php Consolidate request collection annotations.
src/​Transport/​NativeTransport.php Migrate option, header, and upload annotations.
src/​Transport/​MimeTypeResolver/​CustomMimeTypeResolver.php Migrate MIME-map annotation.
src/​Transport/​MimeTypeResolver/​CompositeMimeTypeResolver.php Migrate resolver-list annotation.
src/​Transport/​CurlTransport.php Annotate cURL options.
src/​TelegramBotApi.php Migrate call generics and collection annotations.
src/​RichTextConverter.php Migrate rich-text alias import.
src/​ParseResult/​ValueProcessor/​ValueProcessorInterface.php Make the result template covariant.
src/​ParseResult/​ValueProcessor/​RichTextValue.php Migrate alias and annotate object input.
src/​ParseResult/​ValueProcessor/​RawValue.php Migrate generic input annotation.
src/​ParseResult/​ValueProcessor/​ObjectValue.php Constrain and migrate object generics.
src/​ParseResult/​ValueProcessor/​ObjectOrTrueValue.php Constrain and migrate object generics.
src/​ParseResult/​ValueProcessor/​InterfaceValue.php Migrate generic dispatch annotations.
src/​ParseResult/​ValueProcessor/​ArrayOfObjectsValue.php Constrain and annotate object collections.
src/​ParseResult/​ValueProcessor/​ArrayOfArraysOfObjectsValue.php Constrain and annotate nested object collections.
src/​ParseResult/​ValueProcessor/​ArrayMap.php Migrate processor class-string annotation.
src/​ParseResult/​ResultFactory.php Migrate generic result annotations.
src/​ParseResult/​Param.php Specify generic processor metadata.
src/​MethodInterface.php Make results covariant and migrate contracts.
src/​Method/​UpdatingMessage/​StopPoll.php Specify the poll processor generic.
src/​Method/​UpdatingMessage/​StopMessageLiveLocation.php Specify the message-or-true processor generic.
src/​Method/​UpdatingMessage/​EditMessageText.php Specify the message-or-true processor generic.
src/​Method/​UpdatingMessage/​EditMessageReplyMarkup.php Specify the message-or-true processor generic.
src/​Method/​UpdatingMessage/​EditMessageMedia.php Specify the message-or-true processor generic.
src/​Method/​UpdatingMessage/​EditMessageLiveLocation.php Specify the message-or-true processor generic.
src/​Method/​UpdatingMessage/​EditMessageCaption.php Specify the message-or-true processor generic.
src/​Method/​Update/​SetWebhook.php Type allowed-update values.
src/​Method/​Update/​GetWebhookInfo.php Specify the webhook-information processor generic.
src/​Method/​Update/​GetUpdates.php Specify the update-collection processor generic.
src/​Method/​Sticker/​UploadStickerFile.php Specify the file processor generic.
src/​Method/​Sticker/​SendSticker.php Specify the message processor generic.
src/​Method/​Sticker/​GetStickerSet.php Specify the sticker-set processor generic.
src/​Method/​Sticker/​GetCustomEmojiStickers.php Specify the sticker-collection processor generic.
src/​Method/​Sticker/​GetAvailableGifts.php Specify the gifts processor generic.
src/​Method/​SendVoice.php Specify the message processor generic.
src/​Method/​SendVideoNote.php Specify the message processor generic.
src/​Method/​SendVideo.php Specify the message processor generic.
src/​Method/​SendVenue.php Specify the message processor generic.
src/​Method/​SendRichMessage.php Specify the message processor generic.
src/​Method/​SendPoll.php Specify the message processor generic.
src/​Method/​SendPhoto.php Specify the message processor generic.
src/​Method/​SendPaidMedia.php Specify the message processor generic.
src/​Method/​SendMessage.php Specify the message processor generic.
src/​Method/​SendMediaGroup.php Specify the message-collection processor generic.
src/​Method/​SendLocation.php Specify the message processor generic.
src/​Method/​SendLivePhoto.php Specify the message processor generic.
src/​Method/​SendDocument.php Specify the message processor generic.
src/​Method/​SendDice.php Specify the message processor generic.
src/​Method/​SendContact.php Specify the message processor generic.
src/​Method/​SendChecklist.php Specify the message processor generic.
src/​Method/​SendAudio.php Specify the message processor generic.
src/​Method/​SendAnimation.php Specify the message processor generic.
src/​Method/​SavePreparedKeyboardButton.php Specify the prepared-button processor generic.
src/​Method/​RevokeChatInviteLink.php Specify the invite-link processor generic.
src/​Method/​RepostStory.php Specify the story processor generic.
src/​Method/​PostStory.php Specify the story processor generic.
src/​Method/​Payment/​SendInvoice.php Specify the message processor generic.
src/​Method/​Payment/​GetStarTransactions.php Specify the transactions processor generic.
src/​Method/​Inline/​SavePreparedInlineMessage.php Specify the prepared-message processor generic.
src/​Method/​Inline/​AnswerWebAppQuery.php Specify the web-app-message processor generic.
src/​Method/​Inline/​AnswerGuestQuery.php Specify the guest-message processor generic.
src/​Method/​GetUserProfilePhotos.php Specify the profile-photos processor generic.
src/​Method/​GetUserProfileAudios.php Specify the profile-audio processor generic.
src/​Method/​GetUserPersonalChatMessages.php Specify the message-collection processor generic.
src/​Method/​GetUserGifts.php Specify the owned-gifts processor generic.
src/​Method/​GetUserChatBoosts.php Specify the boosts processor generic.
src/​Method/​GetMyStarBalance.php Specify the star-amount processor generic.
src/​Method/​GetMyShortDescription.php Specify the short-description processor generic.
src/​Method/​GetMyName.php Specify the bot-name processor generic.
src/​Method/​GetMyDescription.php Specify the description processor generic.
src/​Method/​GetMyDefaultAdministratorRights.php Specify the administrator-rights processor generic.
src/​Method/​GetMyCommands.php Specify the command-collection processor generic.
src/​Method/​GetMe.php Specify the user processor generic.
src/​Method/​GetManagedBotAccessSettings.php Specify the access-settings processor generic.
src/​Method/​GetForumTopicIconStickers.php Specify the sticker-collection processor generic.
src/​Method/​GetFile.php Specify the file processor generic.
src/​Method/​GetChatGifts.php Specify the owned-gifts processor generic.
src/​Method/​GetChatAdministrators.php Specify the membership-collection processor generic.
src/​Method/​GetChat.php Specify the chat-information processor generic.
src/​Method/​GetBusinessConnection.php Specify the connection processor generic.
src/​Method/​GetBusinessAccountStarBalance.php Specify the star-amount processor generic.
src/​Method/​GetBusinessAccountGifts.php Specify the owned-gifts processor generic.
src/​Method/​Game/​SetGameScore.php Specify the message-or-true processor generic.
src/​Method/​Game/​SendGame.php Specify the message processor generic.
src/​Method/​Game/​GetGameHighScores.php Specify the score-collection processor generic.
src/​Method/​ForwardMessages.php Specify the identifier-collection processor generic.
src/​Method/​ForwardMessage.php Specify the message processor generic.
src/​Method/​EditStory.php Specify the story processor generic.
src/​Method/​EditMessageChecklist.php Specify the message processor generic.
src/​Method/​EditChatSubscriptionInviteLink.php Specify the invite-link processor generic.
src/​Method/​EditChatInviteLink.php Specify the invite-link processor generic.
src/​Method/​CreateForumTopic.php Specify the forum-topic processor generic.
src/​Method/​CreateChatSubscriptionInviteLink.php Specify the invite-link processor generic.
src/​Method/​CreateChatInviteLink.php Specify the invite-link processor generic.
src/​Method/​CopyMessages.php Specify the identifier-collection processor generic.
src/​Method/​CopyMessage.php Specify the message-identifier processor generic.
src/​LogContextFactory.php Preserve generic types in log-context annotations.
src/​FileCollector.php Migrate file-map annotations.
src/​FailResult.php Specify generic method metadata.
src/​CustomMethod.php Migrate data and processor annotations.
src/​Curl/​CurlInterface.php Annotate cURL option collections.
src/​Api.php Migrate call generics and request/result annotations.
README.md Point the analysis badge to the correct workflow.
psalm.xml Remove Psalm configuration.
phpstan.dist.neon Configure strict source and test analysis.
docs/​internals.md Document PHPStan usage.
composer.json Add PHPStan dependencies and replace the analysis script.
CHANGELOG.md Record the analysis-tool migration.
.github/​workflows/​static.yml Run PHPStan in the existing PHP matrix.
.claude/​skills/​bot-api-update/​SKILL.md Update the documented analysis command.

Review effort: Balanced

@vjik
vjik merged commit 13d26c8 into master Oct 27, 2026
22 checks passed
@vjik
vjik deleted the phpstan branch October 27, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants