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

Make dependency doctrine/annotations optional #333

Closed
W0rma opened this issue Oct 15, 2024 · 2 comments · Fixed by #334
Closed

Make dependency doctrine/annotations optional #333

W0rma opened this issue Oct 15, 2024 · 2 comments · Fixed by #334

Comments

@W0rma
Copy link
Contributor

W0rma commented Oct 15, 2024

Since #326 native PHP attributes can be used for configuration.

When using PHP 8.1 or greater PHP attributes can fully replace Doctrine annotations.

Thus, we could think about making the doctrine/annotations dependency optional (see #326 (comment)).

@W0rma
Copy link
Contributor Author

W0rma commented Oct 15, 2024

Making the annotations package optional is a BC break because packages which use Doctrine annotations for configuration would need to install doctrine/annotations explicitly.

In jms/serializer a similar change was released in a minor release (schmittjoh/serializer#1471).

@goetas Should we use a similar strategy for willdurand/hateoas or would you prefer to work on that for the next major release (which could maybe even drop annotations completely while raising the minimum required PHP version to 8.1)?

@goetas
Copy link
Collaborator

goetas commented Oct 15, 2024

I'm fine in doing something as in jms serializer. a small bc break but it allows us to move forward.
for sure some people will complain, but i will be happier without having to worry about it for the next years :)

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 a pull request may close this issue.

2 participants