DX+CI: Add `composer run phpstan-regenerate-ignores-for-11.3-and-higher` — to simplify updating baseline errors due to PHPStan running on 11.2, fail CI job if out of sync
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3575399. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !639
>>>
<h3 id="overview">Overview</h3>
<p>See <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3569884" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3569884</a></span> — that needed to update the PHPStan baseline, which is surprisingly painful.</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Make it less painful:</p>
<ol>
<li>reduce the number of ignored errors to the actual essentials
</li><li>split the ignored errors for >=11.3 (and not for other purposes) into its own file → <a href="https://git.drupalcode.org/project/canvas/-/pipelines/751804">still green</a></li>
<li>provide a <code>composer run phpstan-generate-ignores-for-11.3-and-higher</code> command to update this file</li>
<li>automatically test on CI that it is in sync — necessary to avoid disruption for those developing on 11.3 while Canvas continues to be tested (including PHPStan compliance) against its minimum version on CI: 11.2</li>
</ol>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
> Related issue: [Issue #3485233](https://www.drupal.org/node/3485233)
issue