Replies: 1 comment 1 reply
-
Hi, this is no longer reported by PHPStan thanks to this feature: https://phpstan.org/blog/zero-config-analysis-with-static-reflection Basically it's not PHPStan's job to tell you have this problem. It was especially annoying for classes that don't have to be in the autoloader, like PHPUnit testcases or migration scripts. You need to use a different tool if you want this detected, I recommend Slevomat Coding Standard: https://github.com/slevomat/coding-standard#slevomatcodingstandardfilestypenamematchesfilename |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Given the following example:
File name:
MyClass.php
File contents:
I seem to remember that in the past PHPStan was throwing an error about the class name not matching the file name, something similar to "Class not found in reflection..", however currently there is no validation error.
I am currently using PHPStan version 0.12.70, with level 8, and never used any custom settings/rules.
Any help would be appreciated, thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions