Skip to content

improve attribute formatting with better argument parsing - #256

Merged
jordikroon merged 8 commits into
php:masterfrom
jordikroon:attribute-constants-v2
Sep 11, 2026
Merged

jordikroon merged 8 commits into
php:masterfrom
jordikroon:attribute-constants-v2

Conversation

@jordikroon

@jordikroon jordikroon commented Jun 22, 2026

Copy link
Copy Markdown
Member

Follow up #255 with improved rendering.

image

And

image

@jordikroon
jordikroon force-pushed the attribute-constants-v2 branch 2 times, most recently from 880bae4 to db7da9a Compare June 22, 2026 19:23
@TimWolla
TimWolla requested a review from Girgias June 23, 2026 21:21
@TimWolla

Copy link
Copy Markdown
Member

Looking at the second screenshot for #[\Deprecated]: What about a trailing comma?

@jordikroon
jordikroon force-pushed the attribute-constants-v2 branch 3 times, most recently from a9c5b3a to 39c4006 Compare June 24, 2026 06:53
<para>3. Unknown attribute with literal argument</para>
<classsynopsis class="class">
<ooclass>
<modifier role="attribute">#[\UnknownAttribute(foo: 'bar')]</modifier>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you have an attribute that is not in FQN? A rendering warning?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would link silently, like #[\UnknownAttribute]. But I have added a warning as it's not desirable.

Comment on lines +78 to +79
<span class="attribute"><a href="file.knownattribute.is.in.html">#[\KnownAttribute]</a> </span><br>
<span class="attribute"><a href="file.anotherknownattribute.is.in.html">#[\AnotherKnownAttribute]</a> </span><br>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the attribute syntax now in the link? Also space between closing a tag and closing span tag.

Also EOL before EOF on a bunch of files.

@jordikroon
jordikroon force-pushed the attribute-constants-v2 branch from 39c4006 to 4c02ea9 Compare September 11, 2026 14:26
@jordikroon
jordikroon merged commit d927213 into php:master Sep 11, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants