Problem/Motivation
Fix a bunch of errors reported by PHPStan Strict with all rules disabled, i.e, the "miscellaneous" errors before we can consider introducing strict.
Most of the things identified will be easy/sane DX things.
Steps to reproduce
Add checkFunctionNameCase: true to the parameters section of core/phpstan.neon.dist and run phpstan.
Remaining tasks
- CI Pass
- Review.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
Nil.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | staticMethod.nameCase.neon_.txt | 1.46 KB | dpi |
Issue fork drupal-3487239
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:
- 3487218-phpstan-strict--staticmethod-namecase
changes, plain diff MR !10172
Comments
Comment #2
dpiComment #3
dpiComment #5
dpiComment #6
smustgrave commentedSince phpstan-strict isn't in core should we be fixing this right now or work to get phpstan-strict into core first?
Comment #7
dpi@smustgrave the issue will come for that, these batch of issues that I've created will allow us to add it without increasing the baseline.
There isn't a lot of them, and its easier to solve upfront.
Comment #8
dpiComment #9
dpi@smustgrave created an outline at #3487269: [meta] Resolve issues exposed by PHPStan Strict with all rules off (misc and core configuration changes)
Comment #10
smustgrave commentedSo brought this up in slack and think these should be postponed till it’s agreed that phpstan strict will be added. Didn’t see a ticket for that discussion
Comment #11
smustgrave commentedOnly temporarily postponing pending feedback on #3487269: [meta] Resolve issues exposed by PHPStan Strict with all rules off (misc and core configuration changes)
If we decide there no harm in merging these we can put back into review and I'll put top of my list to review. Just want to make sure they'll be accepted first.
Comment #12
mstrelan commentedI added
checkFunctionNameCase: trueto the existing phpstan config and got the same result. As per #3487218-7: Resolve PHPStan-Strict errors: class.nameCase we should fix these with or without phpstan enforcement, as they are clearly incorrect.Have updated the IS with steps to reproduce not requiring the strict package.
Comment #14
larowlanCommitted to 11.x - thanks!