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
Illuminate\Validation\PresenceVerifierInterface needs implementation of setConnection() method? #12250
Comments
Sorry, but we do not include setters and getters on our interfaces. |
Yes, this method should not be in the interface, but the problem is that it is called as quoted above. what happens is that so I am obliged to implement a method that does not need, in this case setConnection(), to solve my problem, had to leave this method unimplemented:
|
Agreed. Implementation: |
I needed my own implementation of the Illuminate\Validation\PresenceVerifierInterface, but when the framework was executed, an exception was launched.
In my controller I did something like:
$myValidatorInstance->setPresenceVerifier($myVerifierImplementation);
Then I noticed that the PresenceVerifierInterface does not contain the method setConnection(), but this method is called at the instance verifier in Illuminate\Validation\Validator.php in validateUnique () method, which results in an exception.
I believe that the setConnection () method should not be necessarily implemented, since I do not need it, correct me if I'm mistaken.
The text was updated successfully, but these errors were encountered: