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] Remove illuminate/foundation dependency from Password validation #37648

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

netpok
Copy link
Contributor

@netpok netpok commented Jun 10, 2021

Currently the password validation rule uses the __ foundation helper function but the illuminate/validation package does not depend on the illuminate/foundation package.

This PR will make the rule use the Translator from the Validator.

The only problem is that in theory getTranslator is not part of the Validator interface, but this happens many places in the framework.

@driesvints
Copy link
Member

Isn't this a breaking change? What if apps don't have the translator set and are already using the feature?

@netpok
Copy link
Contributor Author

netpok commented Jun 10, 2021

The Validator already depends on the translator, the __ helper also depends on the translator. Basically if no translator is set in the app it's already broken.

@driesvints
Copy link
Member

Where are you calling setValidator?

@netpok
Copy link
Contributor Author

netpok commented Jun 10, 2021

@driesvints
Copy link
Member

@netpok perfect, thanks

@taylorotwell taylorotwell merged commit 45262e6 into laravel:8.x Jun 10, 2021
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.

3 participants