Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Priority system for validators #6386

Closed
weierophinney opened this issue Jun 17, 2014 · 5 comments
Closed

Priority system for validators #6386

weierophinney opened this issue Jun 17, 2014 · 5 comments

Comments

@weierophinney
Copy link
Member

The Zend\Filter\FilterChain class allows you to prioritize filters, and uses Zend\Stdlib\PriorityQueue internally. Zend\Validator\ValidatorChain should do this as well. The prepend*() methods would check for the highest priority value, and add one to it, while attach*() would assume default priority unless a priority value is provided.

@MadCat34
Copy link
Contributor

Ok for a PR ?

@Ocramius
Copy link
Member

@weierophinney why would the order of validators matter? Unless we have a concept of "break chain on success", I see little use-cases for this.

@Ocramius
Copy link
Member

Nvm, I see some value in configurability, though a "break chain on success" would be totally awesome :-)

@localheinz
Copy link
Member

👍

@adamlundrigan
Copy link
Contributor

@Ocramius this PR was replaced by #6496 and so can be closed

@Ocramius Ocramius self-assigned this Nov 19, 2014
@Ocramius Ocramius added this to the 2.4.0 milestone Nov 19, 2014
Ocramius added a commit that referenced this issue Nov 19, 2014
Ocramius added a commit that referenced this issue Nov 19, 2014
Ocramius added a commit to Ocramius/zf2 that referenced this issue Nov 22, 2014
…lidatorChain#merge()` method, which presents internal type mismatches
Ocramius added a commit to Ocramius/zf2 that referenced this issue Nov 22, 2014
…ly to `ValidatorChain#attach()` by `ValidatorChain#merge()`
Ocramius added a commit to Ocramius/zf2 that referenced this issue Nov 22, 2014
Ocramius added a commit to Ocramius/zf2 that referenced this issue Nov 22, 2014
…d, as the validator chain is now deep-cloned
Ocramius added a commit that referenced this issue Nov 22, 2014
…hain-merge-type-mismatch

Hotfix: #6386 #6496 validator chain merge type mismatch
Ocramius pushed a commit to zendframework/zf2-documentation that referenced this issue Nov 26, 2014
samsonasik pushed a commit to samsonasik/zf2-documentation that referenced this issue Mar 31, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…alidator chain should reject invalid callbacks
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…inor cleanups, simplifying checks around `$callback` validity
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…dding `@group` annotations for newly introduced tests
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…nlining `$this->attach()` and `$this->plugin()` calls
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…everting minor bc-break (`attach` method should keep a compatible signature)
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…emoving useless test that checks against an invalid type-hint usage
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…dding test for uncovered `ValidatorChain#merge()` method, which presents internal type mismatches
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…ixing values passed internally to `ValidatorChain#attach()` by `ValidatorChain#merge()`
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
…ValidatorChain` can be cloned, as the validator chain is now deep-cloned
gianarb pushed a commit to zendframework/zend-validator that referenced this issue May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants