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

Update docs examples to show configuring and injecting the attribute reader to listeners #2797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Apr 29, 2024

The documentation right now only covers injecting an annotation reader into the various event listener classes. With Symfony 6.4 deprecating the @annotation_reader service and 7.0 fully removing it, that makes this bit of the documentation less than optimal.

Additionally, the internal feature detection code in this package still heavily favors annotations over attributes, meaning if doctrine/annotations is installed in a project for any reason at all, the feature detection code is going to use annotations. This is less than optimal for applications using attributes, but not really actionable until a new major release is cut.

This PR updates the documentation to provide examples for injecting the attribute reader instead of an annotation reader in the IpTraceable and Symfony docs pages, as these pages do have some explicit Symfony config examples with setAnnotationReader calls configured; this can help users set up their environments more efficiently if they aren't using StofDoctrineExtensionsBundle (and for those who are, a resolution for stof/StofDoctrineExtensionsBundle#481 helps those folks).

Fixes #2780

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.

The service "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader".
1 participant