Skip to content

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