Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Use a single interface for all constraints. #88

Merged
merged 1 commit into from
Jan 25, 2017
Merged

Use a single interface for all constraints. #88

merged 1 commit into from
Jan 25, 2017

Conversation

matt-allan
Copy link
Collaborator

This PR changes all constraints to use a simple 3 parameter interface:

public function validate($value, $parameter, Validator $validator)

Originally I was trying to not pass the validator in to the constraints to keep them decoupled, but I think it ended up making the code confusing and hard to extend.

@matt-allan matt-allan merged commit e07893d into thephpleague:master Jan 25, 2017
@matt-allan matt-allan deleted the simpler-constraints branch January 25, 2017 14:40
@matt-allan matt-allan mentioned this pull request Feb 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant