Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Attribute linking #127

Merged
merged 1 commit into from
May 20, 2024
Merged

Add Attribute linking #127

merged 1 commit into from
May 20, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented May 17, 2024

This PR adds support for attributes in the format described in this comment and generates links to the documentation pages of known predefined attributes.

Edit:
As a side note, there are 129 additional attributes in php-src stub files that are not documented in doc-en.

@kocsismate
Copy link
Member

Do you plan to add support for displaying other types of attributes? Or is there any technical limitation?

@kocsismate
Copy link
Member

gen_stub.php counterpart: php/php-src#14270

@haszi
Copy link
Contributor Author

haszi commented May 19, 2024

Do you plan to add support for displaying other types of attributes? Or is there any technical limitation?

This PR supports 'known' attributes on method and function parameters. 'Known' in this context means an attribute that has been declared in the documentation with an ID in the class.attribute_name format (all current predefined attributes are supported).

As far as this PRs limitation, this implementation doesn't support namespaced attributes and does not support linking an attribute on a return type either. It wouldn't be hard to add these though.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

LGTM thank you!

@Girgias Girgias merged commit dda2c63 into php:master May 20, 2024
9 checks passed
@haszi haszi deleted the Add-Attribute-linking branch May 20, 2024 11:53
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