Closed (fixed)
Project:
Project Browser
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2024 at 18:15 UTC
Updated:
26 Feb 2024 at 19:39 UTC
Jump to comment: Most recent
We have started testing on Gitlab CI, but PHPStan is currently disabled. When run through Gitlab CI it fails with the following eror:
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --error-format=junit > junit.xml || true
Note: Using configuration file /builds/issue/project_browser-3415079/phpstan.neon.dist.
File '/builds/issue/project_browser-3415079/vendor/phpstan/phpstan/../../../core/phpstan.neon.dist' is missing or is not readable.Enable PHPStan in .gitlab-ci.yml and let run. Note PHPStan failure.
Fix it!
Needs to correct the path to the core phpstan.neon.dist file. As DrupalCI is still running, it would be nice to do this in a way that works on both.
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 #3
lostcarpark commentedIn phpstan.neon.dist, the Drupal core phpstan config is referenced using the following path:
For GitlabCI, this needs to be:
However, changing it in the file causes DrupalCI to fail.
As we want to run DrupalCI and GitlabCI in parallel for now, I have added a
before_scriptto change the path on the fly withsed.Not sure if there's a better way - such as using a variable that GitlabCI and DrupalCI can set to different values.
Comment #4
lostcarpark commentedOf course, once we move off DrupalCI, we can put the correct path in the file and remove the script, so doing it the "best" way is not so important.
Comment #5
lostcarpark commentedAll tests are passing (except PHPCS in Gitlab CI, which is the subject of ongoing work).
Comment #6
fjgarlin commentedThe changes on the MR look good. I also see that it's temporary whilst both DrupalCI and GitLab CI are in play.
RTBC.
Comment #9
chrisfromredfinThanks for the eyes, Fran!
Comment #10
chrisfromredfin