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

Event listener priority #169

Open
BenRutlandWeb opened this issue Mar 11, 2022 · 0 comments
Open

Event listener priority #169

BenRutlandWeb opened this issue Mar 11, 2022 · 0 comments
Assignees

Comments

@BenRutlandWeb
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I can't specify the event listener priority in the event service provider.

Describe the solution you'd like
A static property on the listener to set the priority.

Describe alternatives you've considered
Registering the listeners in a subscriber or with the facade directly.

Additional context
Laravel used to allow this, it was removed as it's not good practice - listeners should be order-agnostic, however, WordPress uses priorities for core events so the ability to set the priority is still relevant in certain circumstances. The static property should possibly not be exposed by default in listener stubs.

@BenRutlandWeb BenRutlandWeb self-assigned this Mar 11, 2022
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

No branches or pull requests

1 participant