Problem/Motivation
commit-code-check.sh runs PHPStan, that now creates a cache in core/phpstan-tmp.
If phpcs.xml.dist is modified, it then runs phpcs across the entire codebase - which currently does not exclude core/phpstan-tmp - and so the commit errors with things like
FILE: ./core/phpstan-tmp/cache/PHPStan/7d/6e/7d6e5b8369b9e39306b75313ec87286641509818.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 23 ERRORS AFFECTING 14 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment (Drupal.Commenting.FileComment.Missing)
...
Steps to reproduce
Proposed resolution
Either configure core/phpstan-tmp to be ignored in phpcs.xml.dist
Or remove the PHPStan tmpDir setting:
By default, PHPStan stores its cache files in sys_get_temp_dir() . '/phpstan' (usually /tmp/phpstan
This seems fine for our needs, and avoids cluttering the core directory.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3466689
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
longwaveOh, we can't remove it, because we did this so GitLab CI can access the cache as an artifact. So let's just ignore it for phpcs.
Comment #3
longwaveComment #5
longwaveComment #6
smustgrave commentedSeems pretty straight forward. Can't re-run failing unit tests but highly doubt this change broke those.
Comment #7
nod_we're also creating:
Should they be excluded as well or doesn't matter since they don't have php inthem?
Comment #8
nod_test failure is legit
Comment #10
catchI think #7 doesn't matter - we can always add those in a follow-up.
Fixed the test - PHP orders differently from humans.
Comment #13
nod_Committed and pushed 576253ca19 to 11.x and 63980670bb to 11.0.x. Thanks!