Hooks defined using #[Hook] attributes are not discovered in GitLab CI pipelines
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3585002. -->
Reported by: [akhil babu](https://www.drupal.org/user/3632866)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>I pushed a test in <a href="https://git.drupalcode.org/project/ai_agents/-/merge_requests/257/diffs?commit_id=6c8323d558c5a31125671f45fba23a33513c50cb">this commit</a> which defined a toke usinh the #[hook] attriibute. The test passed locally, But failed in the CI pipeline as the hook was not discovered. So I had to define the token in the traditional .module file.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<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>
issue