Skip to content

ext/reflection: add namespace methods to ReflectionAttribute#22464

Open
Girgias wants to merge 2 commits into
php:masterfrom
Girgias:reflection-attribute-namespace-methods2
Open

ext/reflection: add namespace methods to ReflectionAttribute#22464
Girgias wants to merge 2 commits into
php:masterfrom
Girgias:reflection-attribute-namespace-methods2

Conversation

@Girgias

@Girgias Girgias commented Jun 26, 2026

Copy link
Copy Markdown
Member

Based on #22463

Add the ReflectionAttribute::inNamespace(), ReflectionAttribute::getNamespaceName(), and ReflectionAttribute::getShortName() methods.

Closes #19556

Comment thread ext/reflection/php_reflection.c Outdated
}
/* }}} */

/* Returns whether this Attribute is defined in namespace */

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.

but the attribute doesn't need to be defined, that isn't checked until newInstance(), also affects below

Maybe something like "Returns whether this attribute name comes from a namespace"?

Girgias added 2 commits June 27, 2026 12:02
Add the ReflectionAttribute::inNamespace(), ReflectionAttribute::getNamespaceName(), and ReflectionAttribute::getShortName() methods.

Closes phpGH-19556
@Girgias Girgias force-pushed the reflection-attribute-namespace-methods2 branch from b3aff8f to dee39a7 Compare June 27, 2026 11:03
@Girgias Girgias requested a review from DanielEScherzer June 27, 2026 11:03
Sign up for free to 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.

ext/reflection: Add various methods dealing with namespaces for ReflectionAttribute

2 participants