Limit where the PHP attributes can be used
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3277361. --> Reported by: [alexpott](https://www.drupal.org/user/157725) Related to !4 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>PHP Attributes support target specification - see <a href="https://www.php.net/manual/en/language.attributes.classes.php">https://www.php.net/manual/en/language.attributes.classes.php</a></p> <p>Should attributes supplied by this module be targeted to <code>Attribute::TARGET_METHOD</code> - I think that that makes sense seeing how the attributes are used.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Change <code>#[Attribute]</code> to <code>#[Attribute(Attribute::TARGET_METHOD)]</code></p> <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