Problem/Motivation
PHPStan performs static analysis on a codebase to find bugs. PHPStan is run in our CI pipeline. PHPStan groups its lints into rule levels.
At time-of-writing, the 9.0.x and 8.0.x branches are at Rule Level 2. As of commit 1965641 in 9.0.x and commit 848acd3, when I test the module at level 3 (i.e.: by running ddev phpstan --level=3, it shows only 7 lints.
6 of these lints are in test code. The only lint that shows up in production code can be fixed by changing a comment. Thus, these changes are very low risk.
Proposed resolution
Fix the lints, then update phpstan.neon so new merge requests must conform to at least level 3.
Remaining tasks
Merge request 9.0.x- merge request !207 created by @mparker17 in #3Merge request 8.0.x- merge request !208 created by @mparker17 in #5Merge to 9.0.x- merged by @mparker17 in #7Merge to 8.0.x- merged by @mparker17 in #9Release 9.0.x- released in 9.0.0-alpha3 by @mparker17Release 8.0.x- released in 8.0.0-alpha7 by @mparker17
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork elasticsearch_connector-3586383
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:
Comments
Comment #2
mparker17Title/Summary mismatch (summary was correct, we want to be at level 3 when this issue is done).
For reference, here is the list of errors (output from
ddev phpstan --level=3 --error-format=rawbut slightly formatted)...Comment #4
mparker17Created merge request !207 for the 9.0.x branch; let's see what testbot thinks.
Comment #6
mparker17Tests passed for 9.0.x; so I've created a merge request for 8.0.x
Comment #8
mparker17Merging to 8.0.x next
Comment #10
mparker17Merged to 8.0.x now. I'll update this issue when these change are released.
Comment #12
mparker17The changes in this issue were released in elasticsearch_connector-9.0.0-alpha3, and elasticsearch_connector-8.0.0-alpha7