Skip to content
Commit 77a3e843 authored by Helmut Hummel's avatar Helmut Hummel Committed by Richard Haeser
Browse files

[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: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarRichard Haeser <richard@maxserv.com>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarManuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarRichard Haeser <richard@maxserv.com>
parent 314333b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment