[TASK] Separate concerns in EXT:scheduler
This change finally cleans up logic within the scheduler extension, namely to separate concerns regarding reading from and writing to the database. All of these methods are moved to a Repository class in order to handle database access into one class, and to untangle the tight coupling between the Scheduler class and the Task class. In addition, the AbstractTask will become a lot smaller, as it only deals with the actual execution of the code in the future. A new TaskValidator is added to validate if a task can be executed. Resolves: #100247 Releases: main Change-Id: I6e74956bdffaf5c3197476456d8ba01dd0b2a97f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78197 Reviewed-by:Nikita Hovratov <nikita.h@live.de> Tested-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- Build/phpstan/phpstan-baseline.neon 2 additions, 12 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Documentation/Changelog/12.3/Deprecation-100247-VariousInterconnectedMethodsInEXTscheduler.rst 78 additions, 0 deletions...ion-100247-VariousInterconnectedMethodsInEXTscheduler.rst
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php 84 additions, 0 deletions.../Configuration/ExtensionScanner/Php/MethodCallMatcher.php
- typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php 2 additions, 1 deletiontypo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
- typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php 1 addition, 0 deletions...tor/Classes/Task/ValidatorTaskAdditionalFieldProvider.php
- typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php 12 additions, 18 deletionstypo3/sysext/scheduler/Classes/Command/SchedulerCommand.php
- typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php 45 additions, 36 deletions...cheduler/Classes/Controller/SchedulerModuleController.php
- typo3/sysext/scheduler/Classes/CronCommand/CronCommand.php 2 additions, 2 deletionstypo3/sysext/scheduler/Classes/CronCommand/CronCommand.php
- typo3/sysext/scheduler/Classes/Domain/Repository/SchedulerTaskRepository.php 454 additions, 0 deletions...ler/Classes/Domain/Repository/SchedulerTaskRepository.php
- typo3/sysext/scheduler/Classes/Scheduler.php 51 additions, 173 deletionstypo3/sysext/scheduler/Classes/Scheduler.php
- typo3/sysext/scheduler/Classes/SystemInformation/ToolbarItemProvider.php 3 additions, 13 deletions...heduler/Classes/SystemInformation/ToolbarItemProvider.php
- typo3/sysext/scheduler/Classes/Task/AbstractTask.php 43 additions, 137 deletionstypo3/sysext/scheduler/Classes/Task/AbstractTask.php
- typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php 3 additions, 1 deletion...Task/ExecuteSchedulableCommandAdditionalFieldProvider.php
- typo3/sysext/scheduler/Classes/Validation/Validator/TaskValidator.php 42 additions, 0 deletions.../scheduler/Classes/Validation/Validator/TaskValidator.php
- typo3/sysext/scheduler/Configuration/Services.yaml 3 additions, 0 deletionstypo3/sysext/scheduler/Configuration/Services.yaml
- typo3/sysext/scheduler/Tests/Unit/Task/ExecuteSchedulableCommandAdditionalFieldProviderTest.php 4 additions, 0 deletions.../ExecuteSchedulableCommandAdditionalFieldProviderTest.php
- typo3/sysext/scheduler/Tests/Unit/Validation/Validator/TaskValidatorTest.php 75 additions, 0 deletions...ler/Tests/Unit/Validation/Validator/TaskValidatorTest.php
Please register or sign in to comment