[BUGFIX] Skip input validation in scheduler command task
All commands that are added via Configuration/Commands.php are instantiated and prepared when the "scheduler:run" command is executed. This preparation includes setting the Application object. If this Application object is present in an Command object, calling the run method of the command will cause a merge of the application's arguments with command arguments. Since command objects in symfony/console and TYPO3 are more or less singletons, these merged arguments will stay merged on a second "instantiation" of the command through when scheduler executes the second task with the same command. Therefore we must SKIP the validation of the new Input object we create and pass to the command's run method, so that this validation does not fail due to the missing command argument. It also does not matter that we skip validation, because validation happens implicitly when calling the run method on the command object. Only Symfony code is "smart" enough to set the command argument, when it was not present before. Resolves: #87312 Releases: master,9.5 Change-Id: I75677493216961fd7559a923e94e7831e07921bf Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63964 Tested-by:Helmut Hummel <typo3@helhum.io> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Richard Haeser <richard@maxserv.com> Reviewed-by:
Helmut Hummel <typo3@helhum.io> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Manuel Selbach <manuel_selbach@yahoo.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Richard Haeser <richard@maxserv.com>
parent
314333b4
Please register or sign in to comment