[!!!][TASK] 2.0 – Drop legacy layer, require TYPO3 v13/v14 - #53
[!!!][TASK] 2.0 – Drop legacy layer, require TYPO3 v13/v14#53davidsteeb wants to merge 3 commits into
Conversation
BREAKING: drops support for TYPO3 v10, v11 and v12 (and PHP < 8.2). - Remove legacy PageLayoutView hook (BackendPreviewRenderer) and its registration; v12+ always uses the previewRenderer. - Remove ext_tables.php (only registered the < v12 backend skin). - Reduce ext_localconf.php to the (now unconditional) stylesheet entry. - Remove BootCompleted listener (registered unused Fontawesome icons). - ContentPreview: render previews via ViewFactoryInterface on both the RecordInterface (v14) and the array (v13) path, dropping StandaloneView. - DatabaseRowService: drop the pre-v12 manual file-field fallback. - GetDatabaseRecordViewHelper: drop the v12 QueryBuilder::add() branch. - CI/PHPStan: drop the v12 matrix entry, config and baseline; regenerate the v14 baseline (12 -> 3 entries). - Bump constraints: PHP ^8.2, TYPO3 ^13.4 || ^14.3, version 2.0.0. Relates: BEXT-596
Relates: BEXT-596
The previous regeneration ran against a broken local v13 vendor state (mixed v13/v14), producing v14-style entries. Restore the actual v13 errors reported by CI (instanceof-always-false + checkRecordEditAccess), which differ from the v14 baseline. Relates: BEXT-596
| $row['allImages-visible'] = $this->countVisibleFileReferences($row['allImages']); | ||
| if ($row[$fieldName] ?? false) { | ||
| $row['all' . $variableName] = $this->fileRepository->findByRelation('tt_content', $fieldName, $row['uid']); | ||
| $row['all' . $variableName . '-visible'] = $this->countVisibleFileReferences($row['all' . $variableName]); |
There was a problem hiding this comment.
extendRow is only called for v13 (because in v14 we have the Record Object).
I would suggest to drop die "-visible" variables, because they are also not available in v14
| if ($row[$fieldName] ?? false) { | ||
| $row['all' . $variableName] = $this->fileRepository->findByRelation('tt_content', $fieldName, $row['uid']); | ||
| $row['all' . $variableName . '-visible'] = $this->countVisibleFileReferences($row['all' . $variableName]); | ||
| } |
There was a problem hiding this comment.
(maybe we can even do more cleanups in this Method, to become similar to v14)
There was a problem hiding this comment.
Pull request overview
This PR prepares the extension’s 2.0 release by removing the legacy TYPO3 v10/v11/v12 compatibility layer and raising the minimum requirements to TYPO3 v13/v14 with PHP 8.2+, simplifying backend preview rendering to rely on the modern ViewFactory-based approach.
Changes:
- Dropped legacy registration/hook paths (
ext_tables.php, legacy hook class, unused boot listener) and simplifiedext_localconf.php. - Refactored backend preview rendering to use
ViewFactoryInterfaceon both v13 (array record) and v14 (Record API) paths; removedStandaloneView. - Updated version/constraints and CI/PHPStan configs to target TYPO3 13/14 only.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ext_tables.php | Removed legacy (< v12) backend skin registration. |
| ext_localconf.php | Simplified to unconditional backend stylesheet registration. |
| ext_emconf.php | Bumped extension version and raised TYPO3 dependency range. |
| Configuration/Services.yaml | Removed DI entries for dropped legacy hook/listener classes. |
| composer.json | Bumped version and raised PHP/TYPO3 requirements. |
| Classes/ViewHelpers/GetDatabaseRecordViewHelper.php | Simplified ordering logic for UID list ordering. |
| Classes/Service/DatabaseRowService.php | Removed pre-v12 file-field fallback logic; simplified file field resolving. |
| Classes/Listener/BootCompleted.php | Removed unused icon registration listener. |
| Classes/Hooks/BackendPreviewRenderer.php | Removed deprecated hook-based renderer. |
| Classes/Backend/Preview/StandardContentPreviewRenderer.php | Updated legacy render call to pass PageLayoutContext. |
| Classes/Backend/Preview/ContentPreview.php | Refactored to shared createView() + unified ViewFactory rendering path; removed StandaloneView. |
| Build/phpstan13.neon | Removed excludes related to removed legacy hook file. |
| Build/phpstan12.neon | Removed TYPO3 12 PHPStan config. |
| Build/phpstan.neon | Removed excludes related to removed legacy hook file. |
| Build/phpstan-baseline13.neon | Cleaned baseline entries tied to removed code paths. |
| Build/phpstan-baseline12.neon | Removed TYPO3 12 baseline. |
| Build/phpstan-baseline.neon | Cleaned baseline entries tied to removed code paths. |
| .github/workflows/ci.yml | Removed TYPO3 12 from CI matrix and related steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'constraints' => [ | ||
| 'depends' => [ | ||
| 'typo3' => '10.4.0-14.99.99', | ||
| 'typo3' => '13.4.0-14.99.99', |
| } else { | ||
| $queryBuilder->add('orderBy', 'FIELD(uid,' . implode(',', $uids) . ')'); | ||
| } | ||
| $queryBuilder->getConcreteQueryBuilder()->addOrderBy('FIELD(uid,' . implode(',', $uids) . ')'); |
Cleanup release 2.0: raise the minimum to TYPO3 v13.4 / v14 and PHP 8.2, and remove the v10/v11/v12 compatibility layer. The ViewHelpers stay (no core replacement).
Removed
Classes/Hooks/BackendPreviewRenderer.php(PageLayoutViewDrawItemHookInterface, gone since v12) incl. its SC_OPTIONS registration andpublic: truein Services.yamlext_tables.php(only registered the < v12 backend skin)Classes/Listener/BootCompleted.php– registered unused Fontawesome icons (templates use the core iconsactions-exclamation-*-alt)Build/phpstan12.neon+phpstan-baseline12.neon, and'12'from the CI matrixSimplified
ext_localconf.php→ just the (now unconditional) stylesheet registrationContentPreview: renders viaViewFactoryInterfaceon both paths (RecordInterface/v14 and array/v13) →StandaloneView(removed in v14) is gone, sharedcreateView()helperDatabaseRowService: removed the pre-v12 manual file-field fallback (!$foundOne)GetDatabaseRecordViewHelper: removed the v12QueryBuilder::add()branchConstraints
^8.2, TYPO3^13.4 || ^14.3, version2.0.0(composer.json + ext_emconf.php)Quality
PartialsLegacykept (still used on v13 via[typo3.version < 14]in page.tsconfig)Relates BEXT-596.