Overview
#3591245: DX: Introduce `composer run lint` that runs PHPCS + PHPStan (sibling to `npm run lint`) improves the DX, and makes it consistent between PHP (composer run …) and everything else (npm run …).
#3538439: Running tests locally is difficult to match with the CI introduced composer run phpstan and immediately optimized it for running on CI: it set up caching, then runs it twice.
(Meaning the intent is the same as #3589565: Make `npm run lint` output easier for humans to parse: optimize this for developer use, rather than CI.)
Proposed resolution
Make composer run phpstan run it only once, this makes a very noticeable difference (with caches primed, i.e. as you would use this during development):
- HEAD: ~30 seconds
-
$ time composer run phpstan … real 0m18.920s user 0m7.768s sys 0m12.244s - MR: ~15 seconds
-
$ time composer run phpstan … real 0m8.723s user 0m3.655s sys 0m5.315s
User interface changes
None.
Issue fork canvas-3591249
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
wim leersComment #3
wim leersComment #4
wim leersActually, it need not be postponed.
Comment #6
wim leersWell … turns out we can make CI 20–30 seconds faster too: https://git.drupalcode.org/project/canvas/-/merge_requests/1139/diffs?co...
→ screenshot illustrating the problem on the MR.
Comment #7
wim leersComment #8
justafish