Skip to content

Comments

Bump to PHPStan ^2.1.40 and utilize ClassConstantReflection->isFinalByKeyword()#7911

Merged
TomasVotruba merged 4 commits intomainfrom
bump-phpstan-2140
Feb 23, 2026
Merged

Bump to PHPStan ^2.1.40 and utilize ClassConstantReflection->isFinalByKeyword()#7911
TomasVotruba merged 4 commits intomainfrom
bump-phpstan-2140

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Feb 23, 2026

My PR to PHPStan was merged yesteday:

for add ClassConstantReflection::isFinalByKeyword() method to detect native final, over docblock based final.

The PHPStan 2.1.40 released today with include the new feature:

This PR bump PHPStan to ^2.1.40 and use the new method, replace the old tweak to get the native final which need to verify on php version check first and native reflection resolving, now, it covered on phpstan.

@samsonasik
Copy link
Member Author

@TomasVotruba ready 👍

@samsonasik
Copy link
Member Author

Rebased and added fixture to skip docblock based @final on VariableConstFetchToClassConstFetchRector 👍

@samsonasik
Copy link
Member Author

@TomasVotruba ready to merge 👍

@TomasVotruba TomasVotruba merged commit 3f583cd into main Feb 23, 2026
59 checks passed
@TomasVotruba
Copy link
Member

LGTM 👍

@TomasVotruba TomasVotruba deleted the bump-phpstan-2140 branch February 23, 2026 19:51
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.

3 participants