Skip to content

PHPStan extension for final classes (in theory) that cannot be final (because of mocking, Doctrine proxies, etc) #5343

Answered by ondrejmirtes
gnutix asked this question in Support
Discussion options

You must be logged in to vote

Hi, I shy away from introducing custom attributes like that because they'd create problems at runtime - since PHPStan is a dev dependency, instantiating those attributes would fail.

There's already some support for reading @final, the annotation just haven't been read by the corresponding rule. I just added the check. You'll see it if you enable bleeding edge: phpstan/phpstan-src@dffd2c2

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gnutix
Comment options

@gnutix
Comment options

Answer selected by gnutix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants