Skip to content

Modernize for TYPO3 v13/v14#17

Open
davidsteeb wants to merge 3 commits into
masterfrom
feature/v3-cleanup
Open

Modernize for TYPO3 v13/v14#17
davidsteeb wants to merge 3 commits into
masterfrom
feature/v3-cleanup

Conversation

@davidsteeb
Copy link
Copy Markdown
Contributor

Drop support for TYPO3 10/11/12 and PHP < 8.2.

  • Remove dead code: ext_tables.sql (TCA auto-schema), ext_localconf.php (legacy pre-v12 hook + duplicate icon registration), Classes/Hooks/ (PageLayoutViewDrawItemHookInterface removed in v12), Classes/Listener/ PageContentPreviewRendering (now handled in ContentPreviewRenderer).
  • Ship configuration as a Site Set under Configuration/Sets/codeblock/ instead of relying on integrators to @import TypoScript and PageTSconfig.
  • Use constructor injection for Highlighter in HighlightProcessor and CodeLanguages; mark both as public services so TYPO3 can resolve them.
  • Fix the auto-detect default for code_language (?? true was wrong).
  • Truncate the page-module preview with mb_strimwidth.
  • Refresh GitHub Actions workflow to ubuntu-latest, checkout@v4, PHP 8.2, GITHUB_OUTPUT syntax.
  • Rewrite README, add CHANGELOG documenting 3.0.0 breaking changes.

Drop support for TYPO3 10/11/12 and PHP < 8.2.

* Remove dead code: ext_tables.sql (TCA auto-schema), ext_localconf.php
  (legacy pre-v12 hook + duplicate icon registration), Classes/Hooks/
  (PageLayoutViewDrawItemHookInterface removed in v12), Classes/Listener/
  PageContentPreviewRendering (now handled in ContentPreviewRenderer).
* Ship configuration as a Site Set under Configuration/Sets/codeblock/
  instead of relying on integrators to @import TypoScript and PageTSconfig.
* Use constructor injection for Highlighter in HighlightProcessor and
  CodeLanguages; mark both as public services so TYPO3 can resolve them.
* Fix the auto-detect default for code_language (?? true was wrong).
* Truncate the page-module preview with mb_strimwidth.
* Refresh GitHub Actions workflow to ubuntu-latest, checkout@v4, PHP 8.2,
  GITHUB_OUTPUT syntax.
* Rewrite README, add CHANGELOG documenting 3.0.0 breaking changes.
@davidsteeb davidsteeb requested a review from bmack May 22, 2026 17:08
@davidsteeb davidsteeb self-assigned this May 22, 2026
Replace the legacy addTcaSelectItem() + manual typeicon_classes +
manual $GLOBALS['TCA']['tt_content']['types']['codeblock'] assignment +
page.tsconfig wizard registration with a single
ExtensionManagementUtility::addRecordType() call.

addRecordType() (TYPO3 v13+) is the official convenience method that
supersedes addPlugin() and addTcaSelectItem() for CType registration.
It registers the select item, the typeicon, the wizard entry (group,
title, description, icon) and the type's showitem / columnsOverrides /
previewRenderer in one call, and automatically appends the 'extended'
tab to the showitem string.

The wizard registration in Configuration/Sets/codeblock/page.tsconfig
is now redundant and removed. The code_language column is inlined in
the type-specific showitem instead of being injected via
addToAllTCAtypes().
The extension uses classes from typo3/cms-backend (StandardContentPreviewRenderer,
GridColumnItem) and typo3/cms-frontend (ContentObjectRenderer,
DataProcessorInterface), but composer.json only declared typo3/cms-core.
Add both as direct dependencies so slimmed-down installs resolve correctly
and the dependency graph reflects actual usage.

Also adds a 'description' field to the Site Set config so editors see what
the Set provides in the backend "Sets for this Site" UI.
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