-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Deprecate Event::getWorkflow()
method
#60195
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
[Workflow] Deprecate Event::getWorkflow()
method
#60195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like my comment about #[Deprecated]
would apply to the few other cases where we use it.
Alternatively, we could ban it from the codebase. It's not better than the annotation anyway.
We should maybe postpone using it to Symfony 8+, where we won't have to duplicate the runtime notice for PHP <8.4.
0dd99b3
to
09c3175
Compare
The benefit of the native attribute is that PHP will report the deprecation in the place doing the call, not in the method being deprecated, so it gives a better location for the warning (in our system using |
09c3175
to
5c483fb
Compare
5c483fb
to
178a01e
Compare
im wondering if we can avoid cant we fix |
I means injecting a locator in every workflow. IMHO this is not the respectability of the workflow to do that. I already thought about using a custom event dispatcher, but a bit overkill IMHO. More over, having a generic listener is really rare, so this use case is really limited |
178a01e
to
595711c
Compare
595711c
to
20fbc9c
Compare
Thank you @lyrixx. |
If one has a listener able to run on many workflow, it need to inject a locator