Skip to content

TYPO3 v13 compatibility, DI modernization, and new crontab:list / crontab:show commands - #26

Open
stigfaerch wants to merge 8 commits into
helhum:mainfrom
stigfaerch:v13
Open

TYPO3 v13 compatibility, DI modernization, and new crontab:list / crontab:show commands#26
stigfaerch wants to merge 8 commits into
helhum:mainfrom
stigfaerch:v13

Conversation

@stigfaerch

@stigfaerch stigfaerch commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #25

Summary

This branch makes the extension compatible with TYPO3 v13.4 and raises the version to 1.0.0-dev. Support for TYPO3 v11/v12 is dropped. Along the way, the codebase is modernized (native DI, typed properties, PHP 8.2+), the backend module is migrated to the v13 module APIs, and two new CLI commands are added.

Breaking changes

  • Requires TYPO3 ^13.4, PHP ^8.2, and dragonmantank/cron-expression ^3.0 (previously ^2.3).
  • Support for TYPO3 v11 and v12 is removed:
    • ext_tables.php (legacy module registration and v11 scheduler-module hiding) is deleted; module registration now relies solely on Configuration/Backend/Modules.php, and hiding the scheduler module solely on the BeforeModuleCreationEvent listener.
  • Helhum\TYPO3\Crontab\Crontab no longer has an optional constructor argument with a makeInstance fallback: it now requires TaskRepository and ConnectionPool via DI. Code instantiating it manually must be updated.
  • TaskExecutor interface gains a getArguments(): array requirement implemented by all shipped executors (Command/Scheduler/Script); custom executors must implement it.

Backend module migration to v13 APIs

  • Controller uses ModuleTemplate::assignMultiple() + renderResponse() instead of the removed $this->view / setContent() / renderContent() flow.
  • New Resources/Private/Layouts/Module.html replaces Default.html, rendering the doc header, flash messages, and module body the way v13 expects.
  • RequireJS is replaced by ES modules: new Configuration/JavaScriptModules.php import map (@helhum/crontab/), and f:be.pageRenderer now uses includeJavaScriptModules.
  • Resources/Public/JavaScript/Scheduler.js (190 lines of jQuery/RequireJS code, mostly copied from EXT:scheduler and unused here) is replaced by a small vanilla-JS ES module (scheduler.js) that only implements the per-group "check all" toggle — collapse, tooltips, and modals are handled by core/Bootstrap 5.
  • List template updated to Bootstrap 5 (data-bs-* attributes, text-bg-* badges, float-end).
  • ExpressionViewHelper drops the removed CompileWithRenderStatic trait in favor of a plain render() method.

Dependency injection / autowiring fixes

  • Crontab service is properly autowired: it now injects ConnectionPool (Symfony DI cannot autowire Connection directly, since its constructor requires an array of params) and resolves the connection in the constructor body.
  • CrontabCommand and CrontabScheduleCommand get their dependencies (Crontab, TaskRepository) via constructor injection instead of GeneralUtility::makeInstance() inside execute().

New features

  • crontab:list — lists all configured tasks grouped by task group, showing identifier, executor type (Command/Scheduler/Script), title, arguments, scheduled state, and next execution time. For command tasks the title falls back to the Symfony command's own description.
  • crontab:show <identifier> — shows all details for a single task (group, type, cron expression, next due/next execution, multiple-execution and retry flags, progress, executor class, and full argument list).

Other fixes and modernization

  • Crontab::dueTasks() uses fetchAssociative() (the Doctrine DBAL fetch() method no longer exists).
  • Implicitly nullable parameter declarations (Type $x = null) converted to explicit ?Type $x = null (deprecated as of PHP 8.4).
  • SchedulerTaskRepository::$optionValues is now declared explicitly (it was previously created as a dynamic property, deprecated since PHP 8.2).
  • Untyped @var-docblock properties replaced with native typed properties across commands, events, executors, task definitions, and the process manager; constructor property promotion and match() used where appropriate.
  • ext_emconf.php cleaned up (removed long-obsolete uploadfolder, createDirs, clearCacheOnLoad keys); version set to 1.0.0-dev, constraint typo3 13.4.0-13.4.99.
  • friendsofphp/php-cs-fixer added as dev dependency.

Testing

Running in production-mirroring TYPO3 v13.4 instances (MSP multisite platform): worker loop (crontab:execute) with idle sleep, task scheduling/removal, the backend module (list, toggle, run-immediately, terminate, delete), and the new crontab:list / crontab:show commands.

🤖 Generated with Claude Code

stigfaerch and others added 8 commits April 17, 2026 09:38
Inject ConnectionPool instead of Connection since Symfony cannot
autowire Connection (its constructor requires an array $params).
Resolve the scheduled-table connection in the constructor body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
List all configured tasks grouped by group, showing executor type
(Command/Scheduler/Script), scheduled status and next execution time.
For Command tasks the title column shows the Symfony command's own
description, truncated to 60 characters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TYPO3 13 compatibility

1 participant