[6.x] Revert #27807 "Extract registered event and login to registered method" #29875
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #29874 by reverting the changes to the
RegistersUsers
trait introduced in #27807.Because
RegistersUsers
is a trait, classesuse
ing it directly can't extend its functionality with theparent
keyword as suggested in the upgrade guide, which means that to 'extend' a method we would have to override it completely and copy in any of the trait's functionality that we wanted to keep (or use something weird likeuse RegistersUsers { registered as afterRegistered; }
).It worked great before, and let people hook into the registration process or return a different response from the registration controller.
If we don't want to provide that functionality at all, we should take out the
registered
method completely, since splitting it in two doesn't accomplish anything if we can't extend either of them anyway.If this is merged I'll submit a PR to update the docs. We should probably still mention this somewhere though, since people following the letter of the upgrade guide would have broken their apps by using the
parent
keyword.