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

[8.x] Copy password rule to current_password #37650

Merged
merged 3 commits into from
Jun 11, 2021

Conversation

netpok
Copy link
Contributor

@netpok netpok commented Jun 10, 2021

This PR does not contain breaking changes.


With the introduction of the new password rule we have to different rule under the same name:

  • The Password class: which validates new passwords
  • The password rule: which validates the current password

This creates communication problems where the referenced rule can only be selected by the application context.

This PR moves the password validation to current_password and adds an alias to keep backwards compatibility. This allows:

  • All existing code function like nothing happened
  • All new code to use the new rule
  • Update existing projects when Laravel 9 is released

While not part of the PR, the main intention is to completely remove the password rule from the next major release (and maybe use it as an alias to Password::default() later in Laravel 10).

If this PR accepted I will create others to add the necessary translation lines to the laravel/laravel repository and the necessary documentation update to laravel/docs.

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