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

Question about PHP Attribute support #4

Open
hauptmedia opened this issue Jul 29, 2022 · 1 comment
Open

Question about PHP Attribute support #4

hauptmedia opened this issue Jul 29, 2022 · 1 comment

Comments

@hauptmedia
Copy link

Hi,

instead of using annotations for configuration i would like to use PHP8 style attributes.

/**
 * @Direct\Action()
 */

becomes

#[Direct\Action]

Is this already implemented? If not where is a good starting point for me to implement it?

Best regards,

Julian

@sgehrig
Copy link
Member

sgehrig commented Jul 29, 2022

Hi @hauptmedia ,

thanks for your message. Currently PHP attributes are not yet supported. Support however is totally possible. It must be implemented in https://github.com/teqneers/ext-direct which is the library that this bundle just uses and configures for Symfony.

Your help would be really appreciated if possible. In fact, without having taken a deep dive into the library, I assume that implementing a new metadata driver would be sufficient (see https://github.com/teqneers/ext-direct/blob/master/src/Metadata/Driver/AnnotationDriver.php for an example of the annotation driver).

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

No branches or pull requests

2 participants