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

Add UserBlueprintEvent #2983

Merged
merged 2 commits into from
Dec 10, 2020
Merged

Add UserBlueprintEvent #2983

merged 2 commits into from
Dec 10, 2020

Conversation

duncanmcclean
Copy link
Member

This PR adds a new UserBlueprintEvent to make it inline with the other BlueprintFound events like EntryBlueprintFound and to help with v2 compatibility.

Unlike the EntryBlueprintFound event though, I've not been able to implement the $user parameter as adding this would mean updating the blueprint method signature to include a $user so it can be passed in from the User.php file. If I updated it, it would be considered a breaking change for anyone who has bound their own UserRepository.

This PR addresses #2905.

@jasonvarga
Copy link
Member

How about emitting the event in User@blueprint instead?

@jasonvarga
Copy link
Member

Nevermind, that's not a great idea. It wouldn't work when we retrieve the blueprint for the "creating user" situations.

This is fine for now. We can add the $user argument in 3.1.

@jasonvarga jasonvarga merged commit 7b7a1bc into statamic:master Dec 10, 2020
@duncanmcclean duncanmcclean deleted the feature/user-blueprint-found-event branch December 10, 2020 15:13
@jelleroorda
Copy link
Contributor

@damcclean Awesome, thanks! 👍

@arthurperton
Copy link
Contributor

Thanks Duncan!

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.

4 participants