[BUGFIX] Only validate method params if needed
Controller action arguments have been validated on creation, which caused superfluous CPU cycles if the action controller later detected, that an argument should not have been validated at all due to an @Extbase\IgnoreValidation annotation. To fix this, arguments get an empty result on creation. When setting the argument value, only the validation results of the property mapping are merged with the argument result. ActionController::initializeActionMethodValidators does only create validator instances for method arguments that need to be validated, thus a whole bunch of checks disappears in callActionMethod(). Releases: master Resolves: #85012 Change-Id: Iaecf36718477a9216f8d36a993a137eb7b677227 Reviewed-on: https://review.typo3.org/56970 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewe...
Showing
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-85012-OnlyValidateMethodParamsIfNeeded.rst 38 additions, 0 deletions...er/Deprecation-85012-OnlyValidateMethodParamsIfNeeded.rst
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php 12 additions, 25 deletions...ysext/extbase/Classes/Mvc/Controller/ActionController.php
- typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php 38 additions, 11 deletionstypo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
- typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php 15 additions, 1 deletiontypo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentTest.php 1 addition, 1 deletion...sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentTest.php
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php 14 additions, 0 deletions.../Configuration/ExtensionScanner/Php/MethodCallMatcher.php
Please register or sign in to comment