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

Switch to PHP Attributes #83

Open
ebitkov opened this issue Feb 27, 2024 · 2 comments
Open

Switch to PHP Attributes #83

ebitkov opened this issue Feb 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ebitkov
Copy link

ebitkov commented Feb 27, 2024

In version 3.30.0 the serializer made the annotations optional in favor of attributes.

Since the API in this project still uses annotations, this change makes this project not work by default. You have to configure an annotation reader manually now. Currently looking into how to do that. (see comment)

Considering the latest changes in the PHP ecosystem the switch to attributes seems to be overdue.

@mgrundkoetter
Copy link
Member

Thanks for pointing that out. First of all you are correct, attributes are pretty standard now, so very good point to use them here as well.
The update you mentioned is a minor update of the package and they decided to introduce a "B/C Break" change with that. Not common and rather unexpected. So as quick fix, just fix this package in your composer.json to the old version. For a more sustainable solution, feel free to open a PR for this feature.

@mgrundkoetter mgrundkoetter added the enhancement New feature or request label Feb 27, 2024
@ebitkov
Copy link
Author

ebitkov commented Feb 27, 2024

As discussed here, just requiring doctrine/annotations via Composer seems to do the trick for now (tested it in my project).

Maybe adding the requirement into the composer.json for now should be sufficient for a hotfix until the annotations are rewritten as attributes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants