Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Discovered in https://www.drupal.org/pift-ci-job/2297315
core/lib/Drupal/Core/Http/InputBag.php was deleted in that patch, and this causes PHPStan to fail as it is passed the full set of changed files including deleted files:
13:17:11 Running PHPStan on changed files.
13:17:14 Path /var/www/html/core/lib/Drupal/Core/Http/InputBag.php does not exist
13:17:14
13:17:14 PHPStan: failed
Steps to reproduce
Proposed resolution
Do not pass deleted files in the list of changes to PHPStan.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3259142-2.patch | 533 bytes | longwave |
|
Comments
Comment #2
longwaveAdded a check that each file exists when setting up the ABS_FILES variable.
I tried to do this earlier when FILES is set up, you can specify
git diff --diff-filter=d
to skip deleted files, butgit ls-files
is also used in some cases which cannot do this: https://stackoverflow.com/questions/68309798/git-ls-files-modified-lists...Comment #3
murilohp CreditAttribution: murilohp at CI&T commentedThe code itself looks good, but I think we should test it, I made this new test-only patch based on 3162981 patch(which is the patch that generate this issue), let's see if the patch pass now.
Comment #4
malleziePhpstan succeeds on both patches. So this change looks good to me.
Comment #6
catchCommitted 3a2115b and pushed to 10.0.x. Thanks!
Comment #7
mallezie