Skip to content

Add zend_get_attribute_object() - #14161

Merged
TimWolla merged 3 commits into
php:masterfrom
TimWolla:zend-get-attribute-object
May 14, 2024
Merged

Add zend_get_attribute_object()#14161
TimWolla merged 3 commits into
php:masterfrom
TimWolla:zend-get-attribute-object

Conversation

@TimWolla

Copy link
Copy Markdown
Member

This makes the implementation for ReflectionAttribute::newInstance() reusable.


This is related to #11293 where it will come in handy to reliably extract the parameters of the #[\Deprecated] attribute when named arguments are used.


Should the addition of zend_get_attribute_object() be mentioned in UPGRADING.INTERNALS?

This makes the implementation for `ReflectionAttribute::newInstance()`
reusable.
…ance()
This test ensures that the `filename` parameter for the fake stack frame is
functional. Without it, the stack trace would show `[internal function]` for
frame `#0`.

@GirgiasGirgias left a comment

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.

Minor nit

Comment threadZend/zend_attributes.c Outdated

@GirgiasGirgias left a comment

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.

You can add an entry in UPGRADING.INTERNALS if you want, but I don't think we generally publicize new APIs in it 🤔

@TimWolla

Copy link
Copy Markdown
MemberAuthor

but I don't think we generally publicize new APIs in it 🤔

Doesn't look like it and I'm not starting. Thanks for the review, merging.

@TimWolla
TimWolla merged commit c90c4fe into php:masterMay 14, 2024
@TimWolla
TimWolla deleted the zend-get-attribute-object branch May 14, 2024 06:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TimWolla@Girgias