Problem/Motivation
PHPStan 1.9.2 was released.
Looking at the "updated deps" TestBot runs lately we can see there's an issue, probably caused by issue https://github.com/phpstan/phpstan/issues/8113 and "fixed" in PR https://github.com/phpstan/phpstan-src/pull/1987.
Running PHPStan on *all* files.
------ -----------------------------------------------------------------------
Line core/modules/config/tests/src/Functional/ConfigImportInstallProfileTe
st.php
------ -----------------------------------------------------------------------
72 Cannot unset offset 'syslog' on array{testing_config_import: 0}.
73 Cannot unset offset 'theme' on array{module:
array{testing_config_import: 0}}.
------ -----------------------------------------------------------------------
[ERROR] Found 2 errors
Steps to reproduce
Proposed resolution
By "simply" moving the line $core['module']['testing_config_import'] = 0; from line 71 down to 73, so after the unsets PHPStan is complaining about, everything passes locally.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3321779-2.patch | 3.2 KB | spokje |
Comments
Comment #2
spokjeComment #3
spokjeComment #4
longwavePHPStan has an extremely frequent release cycle and I'm not sure it is worthwhile chasing the updates. Maybe we should hold off on this until closer to Drupal 10.0.0? We should do a final round of updates in the first half of December, in preparation for the release.
Comment #5
spokjeI don't mind, but this time the update breaks the 'updated deps' daily run on 10.0.x and 10.1.x auto-test.
See https://www.drupal.org/pift-ci-job/2522957 and https://www.drupal.org/pift-ci-job/2522960.
If that's OK with everyone, I'm all for not updating.
Comment #6
mondrakeWell, maybe the fix itself, without the PHPStan bump, could be done anyway? Supported by the PHPStan report of the error on the updated version?
In the end, it's all about cleaning our code :)
Comment #7
longwaveI guess as this breaks the updated deps test then we should commit this fix, and we might as well bump the locked version while we are here.
Comment #9
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!