Problem/Motivation

PHP Attributes support target specification - see https://www.php.net/manual/en/language.attributes.classes.php

Should attributes supplied by this module be targeted to Attribute::TARGET_METHOD - I think that that makes sense seeing how the attributes are used.

Proposed resolution

Change #[Attribute] to #[Attribute(Attribute::TARGET_METHOD)]

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#8 3277361-8.patch1.17 KBelber
#3 3277361-3.patch1.17 KBelber

Issue fork hux-3277361

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

elber’s picture

Assigned: Unassigned » elber
elber’s picture

Assigned: elber » Unassigned
Status: Active » Needs review
StatusFileSize
new1.17 KB

Status: Needs review » Needs work

The last submitted patch, 3: 3277361-3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

dpi’s picture

Sounds good, thanks @alexpott

@elber there's errant line removals in the patch. And I'm guessing its broken because you should be using \Attribute (full qualified namespaec) rather than Attribute

elber’s picture

Assigned: Unassigned » elber

ok, I will work again.

dpi’s picture

*Attribute, not Exception. Long day.

elber’s picture

Assigned: elber » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.17 KB

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to merge on green ❤️

dpi’s picture

Title: Limit where the PHP attributes can be used » 3277361-attribute-limit
Status: Reviewed & tested by the community » Needs review

Converted to MR with doGit.

Tests now passing with whitespace revert + namespace fix.

dpi’s picture

Title: 3277361-attribute-limit » Limit where the PHP attributes can be used
Status: Needs review » Reviewed & tested by the community

Ergh why does the title change like this

dpi’s picture

  • dpi committed 60b2d27 on 1.x
    Issue #3277361 by dpi, elber, alexpott: Limit where the PHP attributes...
dpi’s picture

Status: Reviewed & tested by the community » Fixed

Merged! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.