Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
name: all tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4', '8.5']
TYPO3: [ '13', '14', '14-dev' ]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install testing system
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s composerInstall
Expand Down Expand Up @@ -52,14 +53,14 @@ jobs:
- name: Acceptance Tests
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s acceptance -- --fail-fast
- name: Archive acceptance tests results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: always()
with:
name: acceptance-test-reports-${{ matrix.php }}-${{ matrix.TYPO3 }}
path: .Build/Web/typo3temp/var/tests/_output

- name: Archive composer.lock
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: always()
with:
name: composer.lock-${{ matrix.php }}-${{ matrix.TYPO3 }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Check tag
run: |
Expand All @@ -39,6 +39,12 @@ jobs:
with:
php-version: 8.3
extensions: intl, mbstring, json, zip, curl
tools: composer:v2

- name: Set composer.json version and extra.typo3/cms.version
run: |
composer config "extra"."typo3/cms"."version" "${{ steps.get-version.outputs.version }}" \
&& composer validate --strict --no-check-lock --no-check-version

- name: Install tailor
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest
Expand Down
142 changes: 142 additions & 0 deletions Build/Scripts/download-patch-from-gerrit.phpsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#!/usr/bin/php
<?php
// Adopted from gist: https://gist.github.com/xperseguers/ce58e2d27f1115278bf06e5a8eb4b983
// adjusting it for project needs, which includes:
//
// * Using the subject line in normalized form for the generated patch file
// * Add `@package <package-name>`, `@label <subject>` and `@link <gerrit-change>`
// to the patch file as meta data.

$gerritId = null;
$showUsage = count($argv) < 2;
$patchesDirectory = __DIR__ . '/../../patches/';

if (!$showUsage) {
$gerritId = (int)$argv[1];
}

if ($showUsage || empty($gerritId)) {
$usage = [
'NAME',
"\tbin/" . basename($argv[0]) . ' -- downloads a patch from Gerrit',
'',
'SYNOPSIS',
"\tbin/" . basename($argv[0] . ' <id>'),
'',
'DESCRIPTION',
"\tThis will download the latest patchset from",
"\thttps://review.typo3.org/c/Packages/TYPO3.CMS/+/id then",
"\tsplit it for the various typo3/cms-* packages and update",
"\tyour composer.json",
];
echo implode("\n", $usage) . "\n\n";
exit(1);
}

$change = file_get_contents('https://review.typo3.org/changes/' . $gerritId);
// Fix garbage at the beginning
if (strpos($change, ")]}'") === 0) {
$change = json_decode(trim(substr($change, 4)), true);
}
if (empty($change['subject'])) {
echo "Change $gerritId was not found.\n";
exit(2);
}

$subject = $change['subject'];
$normalizedSubject = preg_replace('/-+/', '-', str_replace(
[
'`',
' ',
'[!!!]',
'[wip]',
'[',
']',
':',
'$',
'/',
'\\',
],
[
'',
'-',
'breaking-',
'',
'',
'-',
'_',
'',
'',
'',
],
mb_strtolower($subject)
));
echo "Subject is '$subject'\n";

$patch = base64_decode(file_get_contents('https://review.typo3.org/changes/' . $gerritId . '/revisions/current/patch'));
$patchMessage = null;
$patches = [];
do {
$nextPatchPos = strpos($patch, 'diff --git', 1);
if ($nextPatchPos === false) {
$buffer = $patch;
$patch = '';
} else {
$buffer = substr($patch, 0, $nextPatchPos);
$patch = substr($patch, $nextPatchPos);
}
if ($patchMessage === null) {
$patchMessage = $buffer;
continue;
}
// Ignore any file not part of a system extension, for example monorepository build system files.
if (!preg_match('#^diff --git a/typo3/sysext/([^/]+)/([^ ]+)#', $buffer, $matches)) {
continue;
}
$sysExtRelativeFilename = $matches[2];
if (str_starts_with($sysExtRelativeFilename, 'Tests/')) {
// Skip any test related files, which are not included in distribution
// archives of composer packages and are not patchable.
continue;
}
$sysext = $matches[1];
$package = match(true) {
str_starts_with($sysext, 'theme-') => 'typo3/' . str_replace('_', '-', $sysext),
default => 'typo3/cms-' . str_replace('_', '-', $sysext),
};
$patchPrologue = [
'@package ' . $package,
'@label ' . $subject,
'@link ' . 'https://review.typo3.org/c/Packages/TYPO3.CMS/+/' . $gerritId,
'',
];
if (!isset($patches[$package])) {
$patches[$package] = [
implode(PHP_EOL, $patchPrologue) . PHP_EOL . $patchMessage,
];
}

// Fix the patch
$prefix = 'typo3/sysext/' . $matches[1];
$file = $matches[2];
$buffer = str_replace(' a/' . $prefix . '/' . $file, ' a/' . $file, $buffer);
$buffer = str_replace(' b/' . $prefix . '/' . $file, ' b/' . $file, $buffer);
$patches[$package][] = $buffer;
} while (!empty($patch));

$composerChanges = [];
foreach ($patches as $package => $chunks) {
if (!is_dir($patchesDirectory)) {
@mkdir($patchesDirectory, 0775, true);
}
$content = implode('', $chunks);
$patchFileName = str_replace('/', '-', $package) . '_' . $gerritId . '_' . $normalizedSubject . '.patch';
file_put_contents($patchesDirectory . $patchFileName, $content);
echo "Created patch '" . $patchesDirectory . $patchFileName . "'\n";

$composerChanges[$package] = [
$subject => 'patches/' . $patchFileName,
];
}

echo "\n\nRun \"./composer install\" to install and apply missing patches.\n\n";
18 changes: 12 additions & 6 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Options:
- composer: "composer" command dispatcher, to execute various composer commands
- composerInstall: "composer install", handy if host has no PHP, uses composer cache of users home
- composerValidate: "composer validate"
- downloadGerritPatch: Download TYPO3 Gerrit change and transform it to composer patch files in "patches/"
- functional: functional tests
- lint: PHP linting
- phpstan: phpstan tests
Expand Down Expand Up @@ -283,7 +284,7 @@ CORE_ROOT="${PWD}"

# Option defaults
TEST_SUITE="help"
COMPOSER_ROOT_VERSION="2.3.7-dev"
COMPOSER_ROOT_VERSION="3.2.4-dev"
DBMS="mariadb"
DBMS_VERSION=""
PHP_VERSION="8.2"
Expand Down Expand Up @@ -597,9 +598,9 @@ case ${TEST_SUITE} in
php -v | grep '^PHP';

if [ "${TYPO3}" == "14-dev" ]; then
composer require typo3/cms-core:14.2.x-dev --dev -W --no-progress --no-interaction
composer require typo3/cms-core:14.3.x-dev --dev -W --no-progress --no-interaction
elif [ ${TYPO3} -eq 14 ]; then
composer require typo3/cms-core:^14.1 --dev -W --no-progress --no-interaction
composer require typo3/cms-core:^14.2 --dev -W --no-progress --no-interaction
else
composer require typo3/cms-core:^13.4 ichhabrecht/content-defender --dev -W --no-progress --no-interaction
fi
Expand All @@ -616,18 +617,23 @@ case ${TEST_SUITE} in
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-validate-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/sh -c "
php -v | grep '^PHP';
if [ "${TYPO3}" == "14-dev" ]; then
composer require typo3/cms-core:14.2.x-dev --dev -W --no-progress --no-interaction
composer require 'typo3/cms-core':'14.3.*@dev' --dev -W --no-progress --no-interaction
elif [ ${TYPO3} -eq 14 ]; then
composer require typo3/cms-core:^14.1 --dev -W --no-progress --no-interaction
composer require 'typo3/cms-core':'^14.1' --dev -W --no-progress --no-interaction
else
composer require typo3/cms-core:^13.4 ichhabrecht/content-defender --dev -W --no-progress --no-interaction
composer require 'typo3/cms-core':'^13.4' 'ichhabrecht/content-defender' --dev -W --no-progress --no-interaction
fi
composer validate
"
SUITE_EXIT_CODE=$?
cp composer.json composer.json.testing
mv composer.json.orig composer.json
;;
downloadGerritPatch)
COMMAND=(php -dxdebug.mode=off Build/Scripts/download-patch-from-gerrit.phpsh "$@")
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name phpstan-${SUFFIX} ${IMAGE_PHP} "${COMMAND[@]}"
SUITE_EXIT_CODE=$?
;;
functional)
COMMAND=(.Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} "$@")
case ${DBMS} in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
base: autogenerated-2
dependencies: { }
errorHandling: { }
languages:
-
title: English
enabled: true
languageId: 0
base: /
locale: en_US.UTF-8
navigationTitle: English
flag: us
rootPageId: 2
routes: { }
41 changes: 23 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "b13/container",
"description": "Create Custom Container Content Elements for TYPO3",
"description": "Container Content Elements - Create Custom Container Content Elements for TYPO3",
"type": "typo3-cms-extension",
"homepage": "https://b13.com",
"license": ["GPL-2.0-or-later"],
Expand All @@ -24,34 +24,39 @@
"bin-dir": ".Build/bin",
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true
}
"typo3/cms-composer-installers": true,
"vaimo/composer-patches": true
},
"sort-packages": true
},
"require-dev": {
"b13/container-example": "dev-task/v4",
"typo3/cms-install": "^13.4 || ^14.1 || 14.2.x-dev",
"typo3/cms-fluid-styled-content": "^13.4 || ^14.1 || 14.2.x-dev",
"typo3/cms-info": "^13.4 || ^14.1 || 14.2.x-dev",
"typo3/cms-workspaces": "^13.4 || ^14.1 || 14.2.x-dev",
"typo3/testing-framework": "^9.1",
"phpstan/phpstan": "^1.10",
"typo3/coding-standards": "^0.5.5",
"friendsofphp/php-cs-fixer": "^3.51",
"codeception/codeception": "^5.1",
"codeception/module-asserts": "^3.0",
"codeception/module-webdriver": "^4.0",
"codeception/module-db": "^3.1",
"phpunit/phpunit": "^11.3"
},
"replace": {
"typo3-ter/container": "self.version"
"codeception/module-webdriver": "^4.0",
"friendsofphp/php-cs-fixer": "^3.51",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^11.3",
"typo3/cms-fluid-styled-content": "^13.4 || ^14.2 || 14.3.*@dev",
"typo3/cms-info": "^13.4 || ^14.2 || 14.3.*@dev",
"typo3/cms-install": "^13.4 || ^14.2 || 14.3.*@dev",
"typo3/cms-workspaces": "^13.4 || ^14.2 || 14.3.*@dev",
"typo3/coding-standards": "^0.5.5",
"typo3/testing-framework": "^9.5",
"vaimo/composer-patches": "^6.0.1"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/Web",
"app-dir": ".Build",
"extension-key": "container"
}
"extension-key": "container",
"version": "3.2.4-dev",
"Package": {
"providesPackages": []
}
},
"patches-search": "patches/"
}
}
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'uploadfolder' => false,
'createDirs' => '',
'clearCacheOnLoad' => true,
'version' => '3.2.2',
'version' => '3.2.4',
'constraints' => [
'depends' => ['typo3' => '13.4.26-14.99.99'],
'conflicts' => [],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@package typo3/cms-backend
@label [BUGFIX] Strip title from package description if extracted
@link https://review.typo3.org/c/Packages/TYPO3.CMS/+/93484
@version ~14.2.0

From 17f8256acba6eb1c5b4b3e2732b63dc891279ad0 Mon Sep 17 00:00:00 2001
From: Benjamin Kott <benjamin.kott@outlook.com>
Date: Tue, 31 Mar 2026 11:24:01 +0200
Subject: [PATCH] [BUGFIX] Strip title from package description if extracted

When a composer description contains " - ", the part before
the separator is used as the package title. However, the
description was not updated and still contained the full
string including the title prefix, leading to duplicate
information when both title and description are displayed.

The description is now set to only the part after the
separator when a title is extracted.

Resolves: #109435
Releases: main
Change-Id: I2a7a57ca18b750fa26fc967fe3cc5f6df07f3728
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/93484
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: core-ci <typo3@b13.com>
---

diff --git a/Classes/Controller/AboutController.php b/Classes/Controller/AboutController.php
index 7ffdf16..c8ca11c 100644
--- a/Classes/Controller/AboutController.php
+++ b/Classes/Controller/AboutController.php
@@ -81,7 +81,7 @@
}
$extensions[] = [
'key' => $package->getPackageKey(),
- 'title' => $package->getPackageMetaData()->getDescription(),
+ 'title' => $package->getPackageMetaData()->getTitle(),
'authors' => $package->getValueFromComposerManifest('authors'),
];
}
Loading
Loading