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

[11.x] Support Parent Classes for Event Listeners #52278

Conversation

vbergerondev
Copy link

Hi Taylor,

I've made a slight modification to the addInterfaceListeners method to also support parent classes. This enhancement is useful for listening to a group of events that extend the same parent class (e.g., TwoFactorAuthenticationEvent abstract class from Fortify).

This change is necessary for me to create database logs when specific events from Fortify are dispatched. While it's currently possible to listen to interfaces, Fortify events do not implement any interfaces.

Thanks!

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@vbergerondev vbergerondev force-pushed the 11.x-add-support-to-listen-on-parent-event-class branch from cfc74f4 to ce9630b Compare July 25, 2024 23:50
@vbergerondev vbergerondev changed the title Merge interfaces and parents for adding event listeners [11.x] Support Parent Classes for Event Listeners Jul 25, 2024
@vbergerondev vbergerondev marked this pull request as ready for review July 25, 2024 23:57
@taylorotwell
Copy link
Member

I think I would hesitate to change this on a patch release. We would probably be safer adding an interface to Fortify events.

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.

2 participants