Bug #34872
Singleton validators never have their options passed
100%
Description
The ValidatorResolver
does not pass options to validators that are singletons:
case Configuration::SCOPE_PROTOTYPE: $validator = new $validatorObjectName($validatorOptions); break; case Configuration::SCOPE_SINGLETON: $validator = $this->objectManager->get($validatorObjectName); break;
Since singletons cannot get constructor arguments via get()
but only through object configuration, we should at least check for options given to a singleton here and inform the developer about a probably bug in his code…
Updated by Karsten Dambekalns over 8 years ago
- Status changed from Accepted to New
- Assignee deleted (
Karsten Dambekalns) - Target version deleted (
1.1 RC1)
Updated by Karsten Dambekalns almost 8 years ago
- Subject changed from Singleton validators do not get their options to Singleton validators have never passed their options
Updated by Karsten Dambekalns almost 8 years ago
- Subject changed from Singleton validators have never passed their options to Singleton validators never have their options passed
Updated by Adrian Föder almost 8 years ago
- Status changed from New to Accepted
- Assignee set to Adrian Föder
- Target version set to 2.0
Updated by Gerrit Code Review almost 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17671
Updated by Adrian Föder almost 8 years ago
sorry didn't want to change it but was used to click "git any" at that box, without reading a present value...
Updated by Gerrit Code Review almost 8 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17671
Updated by Gerrit Code Review almost 8 years ago
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19562
Updated by Adrian Föder almost 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 05fc389ba3bf7022960cfd6cd9f66f1f82732f11.