-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 support for an actor provider for extensions which use a user reference #2914
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2914 +/- ##
==========================================
- Coverage 78.64% 78.59% -0.05%
==========================================
Files 171 171
Lines 8775 8789 +14
==========================================
+ Hits 6901 6908 +7
- Misses 1874 1881 +7 ☔ View full report in Codecov by Sentry. |
This seems like a good idea. One benefit (once I implement the actor provider in StofDoctrineExtensionsBundle) is that this will avoid reading the authenticated user early in the request (requiring to potentially start the session), even in requests that won't ever record a blameable change. |
@mbabker what is the plan for this PR ? Are you going to merge it ? I got a new report on the bundle that would also be solved by migrating to the actor provider. |
I went ahead and did a quick docs update, should be ready for review/merge now. |
Ref: #2843
This is kind of a fresh take on #2074 which is seemingly more relevant with stuff like FrankenPHP out there nowadays. For now I went with a single interface that can be used by all extensions (since loggable (and the WIP revisionable) have a similar thing), but since the extensions also have different requirements (blameable supports strings and associations, loggable only supports strings), maybe this needs more refinement. Also for now there aren't any implementations shipped in this library, what goes on within a provider is probably better handled either in the framework integrations or directly within an application.