Skip to content

[FEATURE] Add TYPO3 v14 compatibility (drop v12)#57

Open
konradmichalik wants to merge 11 commits intotritum:masterfrom
move-elevator:feat/typo3-v14-upgrade
Open

[FEATURE] Add TYPO3 v14 compatibility (drop v12)#57
konradmichalik wants to merge 11 commits intotritum:masterfrom
move-elevator:feat/typo3-v14-upgrade

Conversation

@konradmichalik
Copy link
Copy Markdown

Summary

This PR adds full TYPO3 v14 compatibility while maintaining v13 support. TYPO3 v12 is dropped.

Breaking changes

  • Minimum TYPO3 version is now v13.4 LTS
  • Version constraints updated to ^13.4 || ^14.0

TYPO3 v14 hook removals addressed

TYPO3 v14 removed several SC_OPTIONS hooks that this extension relies on. This PR introduces PSR-14 event listeners as replacements:

Removed Hook PSR-14 Replacement
afterBuildingFinished (Breaking #98239) AfterBuildingFinishedEvent — new event dispatched by CopyService and FormHooks
afterInitializeCurrentPage AfterCurrentPageIsResolvedListener — listens to core's AfterCurrentPageIsResolvedEvent
beforeRendering BeforeRenderableIsRenderedListener — listens to core's BeforeRenderableIsRenderedEvent

Legacy hook registrations are kept for v13 backward compatibility. On v13, only the hooks fire (PSR-14 events don't exist yet). On v14, only the PSR-14 listeners fire (hooks are silently ignored).

Backend form editor fix

Removed the deprecated formEditorPartials configuration (Deprecation #109306). TYPO3 v14.2 replaced Fluid-based stage partials with web components. Omitting formEditorPartials lets both v13 and v14 use their default composite element rendering, fixing the visual nesting of
child elements in the backend form editor.

Additional changes

  • Removed unnecessary call_user_func wrapper in ext_localconf.php
  • Made FormHooks class final
  • Typed CopyService::$features as Features instead of mixed
  • Used explicit nullable types for PHP 8.4 compatibility
  • Updated Services.yaml to exclude Event value objects from DI
  • Added DDEV multi-version test environment with form fixtures for v13/v14

Tested on

  • TYPO3 v13.4.28 — Frontend rendering, copy/remove, multi-step forms, backend form editor
  • TYPO3 v14.2.0 — Frontend rendering, copy/remove, multi-step forms, backend form editor

Drop TYPO3 v12 support. Target v13.4 LTS and v14.x.
Bump extension version to 6.0.0.
TYPO3 v14 removes the SC_OPTIONS afterBuildingFinished hook (Breaking #98239).
Introduce AfterBuildingFinishedEvent as PSR-14 replacement.
Legacy hook dispatch is kept for v13 backward compatibility.
- Make FormHooks final
- Type CopyService::features property as Features
- Use explicit nullable types for PHP 8.4 compat
TYPO3 v14.2 deprecated Fluid-based stage partials in favor of
web components (Deprecation #109306). Removing formEditorPartials
lets both v13 and v14 use their default composite element rendering,
fixing the visual nesting of child elements in the backend form editor.
TYPO3 v14 removed the afterInitializeCurrentPage and beforeRendering
SC_OPTIONS hooks. Add PSR-14 event listeners for:
- AfterCurrentPageIsResolvedEvent (replaces afterInitializeCurrentPage)
- BeforeRenderableIsRenderedEvent (replaces beforeRendering)

The listeners delegate to existing FormHooks methods, keeping the
v13 hook registration intact for backward compatibility.
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.

1 participant