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

Allow specifying "break chain on failure" flag as Validator option #5780

Merged

Conversation

weierophinney
Copy link
Member

- When calling `attachByName()`, allow passing the "break chain on failure" flag
  as an option, instead of requiring it to be passed as the third argument to
  the method; simplifies factories.

- Fixes zfcampus/zf-apigility-admin#89
}

if (isset($options['breakchainonfailure'])) {
$breakChainOnFailure = (bool) $options['breakchainonfailure'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sincerely I don't like to have different ways of write the same thing. IMO this is an overhead for the framework.

Anyway, If you consider this necessary please add a test case for this option too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a test case -- mainly because it's documented both ways in different locations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record:
The uses of these config keys are in Zend/File/Transfer/Adapter/AbstractAdapter.php and Zend/InputFilter/Factory.php

- Wrote a data provider so that the option name both with and without
  underscores may be tested.
Maks3w added a commit that referenced this pull request Feb 3, 2014
Allow specifying "break chain on failure" flag as Validator option
@Maks3w Maks3w merged commit 95e1d90 into zendframework:develop Feb 3, 2014
@weierophinney weierophinney deleted the hotfix/zf-apigility-admin-89 branch February 3, 2014 22:03
gianarb pushed a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
…y/hotfix/zf-apigility-admin-89

Allow specifying "break chain on failure" flag as Validator option
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.

2 participants