-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect other PSR violations where namespace is missing or not a subnamespace of configured one #8
Detect other PSR violations where namespace is missing or not a subnamespace of configured one #8
Conversation
d1fb66b
to
3ee697c
Compare
3ee697c
to
9956a25
Compare
…ilently passing if valid classes are found, will only show up when requesting PSR violations)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No silent ignoring 👍🏻
Thanks, I think it makes sense but I am a bit worried about unforeseen side-effects here.. It should only be warnings though nothing dramatic so let's merge and see if we get more feedback than expected :) |
@PrinsFrank already got a bunch of errors on the Composer repo due to test fixtures😅 One last one I cannot fix immediately tho is in a dependency:
So my guess is it will cause more pain than we think.. |
@Seldaek these warnings only really make sense in the composer project itself, right? Errors in autoloaded classes can be more easily found if the strict-psr is run in the project itself, but if a dependency ships with non-psr4 compliant classes I don't think it makes sense to show these errors in dependant packages? |
Right yes that's true. I need to see if I can ignore dependencies. It's not that easy given the API we have here. |
I can look into this this weekend as well if you want? I'd love to help out right now, but I'm ill at the moment. ;) |
Nah don't worry I am on it. 6307dcf fixes some of the problems already. And the new method added there will let me clean up vendor warnings in Composer. Hope you get well soon! |
Fixes composer/composer#11957
To get warnings about missing namespaces or non-common namespaces in Composer when running with --strict-psr, classes shouldn't be skipped before checking their namespace if they don't have a common root.