Problem/Motivation
Amongst the current suppressions found in the PHPStan level 1 baseline, introduce by the adding of phpstan/phpstan-phpunit, is: Class already @covers \Foo\Bar so the method @covers is redundant..
This issue exists to fix all of those.
Steps to reproduce
- Run PHPStan on level 1 and see the above issue amongst all others.
Proposed resolution
- Solve all of the reported issues for the above mentioned.
- Run PHPStan on level 1 and don't see the above issue any more.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3351067
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3351067-fix-phpstan-l1
changes, plain diff MR !3744
Comments
Comment #2
spokjeComment #4
spokjeComment #5
spokjeComment #6
smustgrave commentedFrom what I can tell this is a valid cleanup.
The MR passing shows it applies cleanly and doesn't generate errors.
Comment #7
catchI'm seeing errors like
in core commit checks.
Comment #8
spokjeHmmm, that specific one is handled in #3351073: Fix PHPStan L1 errors "Annotation "@covers::foo" is invalid, "@covers" should be followed by a space and a value.", unsure why that shows up in commit checks for this one.
Also: What are these commit checks and can mere mortal people trigger those?
If not and TestBot is green, I'm not sure what I can do about it, since I will never get to see those errors.
Comment #9
catchYou can run ./core/scripts/dev/commit-code-check.sh
Also I think I was missing a composer update
Comment #10
spokjeAh, i actually (almost) use that on any issue.
Thought there might be some "special sauce" somewhere.
Root cause found, normality restored.
Comment #11
catchYep, that was the problem.
Committed/pushed to 10.1.x, thanks!
Comment #13
catch