Tweak PHPStan config so paths are always correct and baseline is more usable
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3397162. --> Reported by: [alexpott](https://www.drupal.org/user/157725) Related to !189 !69 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Follow on from <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3395419" title="Status: Closed (fixed)">#3395419: Allow contrib modules to run PHPStan via GitLab CI</a></span></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Run PHPStan from module directory so paths are correct</li> <li>Remove baseline before generating a new one</li> <li>Add new variable <code>_PHPSTAN_BASELINE_FILENAME</code> with default value 'phpstan-baseline.neon'</li> </ul> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3> > Related issue: [Issue #3445001](https://www.drupal.org/node/3445001)
issue