Bug #89057

Altering the arguments of a schedulable Symfony command that is configured in the Scheduler module breaks the module

Added by Stefan P 21 days ago. Updated 21 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2019-09-02
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

  1. Create a Symfony Command with arguments and register it.
  2. In teh Scheduler module add a task to execute console commands and select your command, save
  3. Remove one argument in the code again
  4. Open the Scheduler module
  5. Exception "The <removed argument name> argument does not exist."

No way to recover from this via backend.

Problem is in sysext:scheduler/Classes/Task/ExecuteSchedulableCommandTask.php on line 113 where $input = new ArrayInput($this->getArguments(), $schedulableCommand->getDefinition()); is called. The defintion is read by Symfony fron the actual PHP file of the command, but the arguments are read from the additonal fields.

Some check whether the defintion has changed against the stored arguments has to happen there. Without such a check changing an existing task is basically not possible without breaking the scheduler (inducing manually fixing scheduler tasks via DB, not even a console command exists to fix such a state).

History

#1 Updated by Stefan P 21 days ago

  • Subject changed from Altering the arguments of a schedulable Symfony command that is configured in teh Scheduler module breaks the module to Altering the arguments of a schedulable Symfony command that is configured in the Scheduler module breaks the module

Also available in: Atom PDF