Uh oh!
There was an error while loading. Please reload this page.
fix: resolve inconsistent PHPStan errors between local and CI environment - #9865
Conversation
Before anything else, it’s important to note that this script is not written in a cross-platform way. Lines 115 to 116 in 6f5c1d7 When using the PS I:\work\Github\CodeIgniter4> php vendor/bin/phpstanNote: Using configuration file I:\work\Github\CodeIgniter4\phpstan.neon.dist. 895/895 [============================] 100% [OK] No errors |
What do you mean? When I wrote that before, I considered it also for Windows. It can be written directly as And that bash is usually installed if you installed the git for windows installed with all the cli tools included with it. |
datamweb
commented
Jan 3, 2026
So, the command's successful execution depends on a specific user prerequisite and configuration having Git Bash installed and added to the system's PATH. This is considered a hidden dependency. Just as I was unable to run it at first, other users are likely unaware of this requirement and will probably face the same issue. |
paulbalandan
commented
Jan 3, 2026
As I remember it, when I was starting developing on Windows, one of the things I set up first is install git for windows including all its tools as that provides more or less the experience of working on unix. I think this is not a hidden dependency for this project but something expected when contributing. However, if you think this can be improved, please feel free to propose a change. |
michalsn
commented
Jan 3, 2026
I thought that installing Git on Windows automatically includes Bash. That said, do we actually need this cleanup step? The |
paulbalandan
commented
Jan 3, 2026
Oh, really? In previous versions it doesn't yet remove the files and the step was proposed by the maintainer in the readme. If that's the case, then we remove the cleanup part. |
michalsn
commented
Jan 3, 2026
I tested this by copying one of the .neon files and renaming it. After running the command, the additional file was removed, so it looks like this is how it works now. If someone has time, please double-check. |
Uh oh!
There was an error while loading. Please reload this page.
michalsn
commented
Jan 3, 2026
Thank you for the review @paulbalandan |
paulbalandan
commented
Jan 3, 2026
Thanks, I looked at the code and the tool really deletes the orphaned baseline files. So, the cleanup step is no longer needed. |
Description
This PR excludes
MockCommon.phpfrom PHPStan scan for consistent results.From my understanding, PHPStan scanned both function definitions, and depending on which it loaded first (or cached), it could detect different signatures.
Checklist: