Regression introduced by #3561392: Canvas' `hook_requirements()` not running on >=11.3
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3587539. --> Reported by: [wim leers](https://www.drupal.org/user/99777) Related to !1003 >>> <h3 id="overview">Overview</h3> <p>In writing <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/3485233" title="Status: Closed (fixed)">#3485233: Add phpstan-baseline Composer script to root composer.json</a></span>, I looked at our PHPStan baseline/ignores. It includes:</p> <pre> -<br> message: '#^Attribute class Drupal\\Core\\Hook\\Attribute\\LegacyRequirementsHook does not exist\.$#'<br> identifier: attribute.notFound<br> count: 1<br> path: canvas.install</pre><p> &hellip; which felt kinda <em>off</em> to see in there.</p> <p>This was introduced in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3561392" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3561392</a></span>, ~2.5 months ago, to get Canvas to pass tests/CI on 11.3. It seems innocent, right?</p> <p>&#128050; However, reading the docblock for <code>LegacyRequirementsHook</code>:</p> <pre> * Marking requirements hooks as #LegacyRequirementsHook will prevent them<br> * from running on Drupal 11.3.0 and later.</pre><p>Manually tested and &hellip; sure enough, our requirements hook does not fire on &gt;=11.3!</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Make it run again.</p> <h3 id="ui-changes">User interface changes</h3>
issue