Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!!!][TASK] Remove TYPO3 v11 Support #1578

Merged
merged 1 commit into from
Feb 3, 2025
Merged
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
36 changes: 0 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,24 +157,6 @@ jobs:
fail-fast: false
matrix:
include:
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.3"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.3"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: lowest
Expand Down Expand Up @@ -252,24 +234,6 @@ jobs:
fail-fast: false
matrix:
include:
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.3"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.3"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: lowest
Expand Down
14 changes: 0 additions & 14 deletions .gitlab/pipeline/jobs/func-php8.1-v11-highest.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml

This file was deleted.

5 changes: 2 additions & 3 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ Options:
- 15 maintained until 2027-11-11
- 16 maintained until 2028-11-09

-t <11.5|12.4>
-t <12.4>
Only with -s composerUpdateMin|composerUpdateMax
Specifies the TYPO3 CORE Version to be used
- 11.5: use TYPO3 v11 with typo3/cms-composer-installers ^3
- 12.4: (default) use TYPO3 v12 with typo3/cms-composer-installers ^5

-p <8.1|8.2|8.3|8.4>
Expand Down Expand Up @@ -374,7 +373,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:o:nhu" OPT; do
;;
t)
CORE_VERSION=${OPTARG}
if ! [[ ${CORE_VERSION} =~ ^(11.5|12.4)$ ]]; then
if ! [[ ${CORE_VERSION} =~ ^(12.4)$ ]]; then
INVALID_OPTIONS+=("-t ${OPTARG}")
fi
;;
Expand Down
86 changes: 1 addition & 85 deletions Configuration/TCA/tx_tea_domain_model_tea.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

$tca = [
return [
'ctrl' => [
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea',
'label' => 'title',
Expand Down Expand Up @@ -208,84 +205,3 @@
],
],
];

$typo3Version = new Typo3Version();
if ($typo3Version->getMajorVersion() < 12) {
$tca = array_replace_recursive(
$tca,
[
'ctrl' => [
'cruser_id' => 'cruser_id',
],
'columns' => [
'title' => [
'config' => [
'eval' => 'trim,required',
],
],
],
]
);
unset($tca['columns']['title']['required']);

$tca['columns']['l18n_parent']['config']['items'] = [
[
0 => '',
1 => 0,
],
];
$tca['columns']['image'] = [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
'config' => ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
[
'maxitems' => 1,
'appearance' => [
'collapseAll' => true,
'useSortable' => false,
'enabledControls' => [
'hide' => false,
],
],
]
),
];
$tca['columns']['hidden']['config'] = [
'type' => 'check',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden',
'items' => [
[
0 => '',
'invertStateDisplay' => true,
],
],
];
$tca['columns']['starttime']['config'] = [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
];
$tca['columns']['endtime']['config'] = [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
];
$tca['columns']['fe_group']['config']['items'] = [
[
0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
1 => -1,
],
[
0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
1 => -2,
],
[
0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
1 => '--div--',
],
];
}

return $tca;
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Example TYPO3 extension for code quality checks and automated tests

[![TYPO3 V12](https://img.shields.io/badge/TYPO3-12-orange.svg)](https://get.typo3.org/version/12)
[![TYPO3 V11](https://img.shields.io/badge/TYPO3-11-orange.svg)](https://get.typo3.org/version/11)
[![License](https://img.shields.io/github/license/TYPO3-Documentation/tea)](https://packagist.org/packages/ttn/tea)
[![Total downloads](https://poser.pugx.org/ttn/tea/downloads.svg)](https://packagist.org/packages/ttn/tea)
[![GitHub CI status](https://github.com/TYPO3BestPractices/tea/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/TYPO3BestPractices/tea/actions)
Expand Down
32 changes: 5 additions & 27 deletions Tests/Unit/Controller/FrontEndEditorControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
use TYPO3\CMS\Core\Context\UserAspect;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Fluid\View\TemplateView;
use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
Expand Down Expand Up @@ -55,9 +53,6 @@ protected function setUp(): void

// We need to create an accessible mock in order to be able to set the protected `view`.
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
if ((new Typo3Version())->getMajorVersion() < 12) {
$methodsToMock[] = 'forward';
}
$this->subject = $this->getAccessibleMock(
FrontEndEditorController::class,
$methodsToMock,
Expand Down Expand Up @@ -214,32 +209,15 @@ public function updateActionWithOwnTeaPersistsProvidedTea(): void

private function mockRedirect(string $actionName): void
{
if ((new Typo3Version())->getMajorVersion() < 12) {
$this->subject->expects(self::once())->method('redirect')
->with($actionName)
// @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only.
->willThrowException(new StopActionException('redirectToUri', 1476045828));
// @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only.
$this->expectException(StopActionException::class);
} else {
$redirectResponse = $this->createStub(RedirectResponse::class);
$this->subject->expects(self::once())->method('redirect')->with($actionName)
->willReturn($redirectResponse);
}
$redirectResponse = $this->createStub(RedirectResponse::class);
$this->subject->expects(self::once())->method('redirect')->with($actionName)
->willReturn($redirectResponse);
}

private function stubRedirect(string $actionName): void
{
if ((new Typo3Version())->getMajorVersion() < 12) {
$this->subject->method('redirect')
// @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only.
->willThrowException(new StopActionException('redirectToUri', 1476045828));
// @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only.
$this->expectException(StopActionException::class);
} else {
$redirectResponse = $this->createStub(RedirectResponse::class);
$this->subject->method('redirect')->willReturn($redirectResponse);
}
$redirectResponse = $this->createStub(RedirectResponse::class);
$this->subject->method('redirect')->willReturn($redirectResponse);
}

/**
Expand Down
4 changes: 0 additions & 4 deletions Tests/Unit/Controller/TeaControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use TTN\Tea\Domain\Model\Tea;
use TTN\Tea\Domain\Repository\TeaRepository;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Fluid\View\TemplateView;
Expand Down Expand Up @@ -46,9 +45,6 @@ protected function setUp(): void
$this->teaRepositoryMock = $this->createMock(TeaRepository::class);
// We need to create an accessible mock in order to be able to set the protected `view`.
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
if ((new Typo3Version())->getMajorVersion() < 12) {
$methodsToMock[] = 'forward';
}
$this->subject = $this->getAccessibleMock(TeaController::class, $methodsToMock, [$this->teaRepositoryMock]);

$this->viewMock = $this->createMock(TemplateView::class);
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"psr/http-message": "^1.0.1",
"typo3/cms-core": "^11.5.41 || ^12.4.26",
"typo3/cms-extbase": "^11.5.41 || ^12.4.26",
"typo3/cms-fluid": "^11.5.41 || ^12.4.26",
"typo3/cms-frontend": "^11.5.41 || ^12.4.26"
"typo3/cms-core": "^12.4.26",
"typo3/cms-extbase": "^12.4.26",
"typo3/cms-fluid": "^12.4.26",
"typo3/cms-frontend": "^12.4.26"
},
"require-dev": {
"ergebnis/composer-normalize": "2.45.0",
Expand All @@ -69,7 +69,7 @@
"symfony/yaml": "5.4.45 || 6.4.18 || 7.2.3",
"tomasvotruba/cognitive-complexity": "0.2.3",
"tomasvotruba/type-coverage": "1.0.0",
"typo3/cms-fluid-styled-content": "^11.5.41 || ^12.4.26",
"typo3/cms-fluid-styled-content": "^12.4.26",
"typo3/coding-standards": "0.6.1 || 0.8.0",
"typo3/testing-framework": "7.1.1",
"webmozart/assert": "^1.11.0"
Expand Down
8 changes: 4 additions & 4 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
'constraints' => [
'depends' => [
'php' => '8.1.0-8.3.99',
'typo3' => '11.5.41-12.4.99',
'extbase' => '11.5.41-12.4.99',
'fluid' => '11.5.41-12.4.99',
'frontend' => '11.5.41-12.4.99',
'typo3' => '12.4.26-12.4.99',
'extbase' => '12.4.26-12.4.99',
'fluid' => '12.4.26-12.4.99',
'frontend' => '12.4.26-12.4.99',
],
],
'state' => 'stable',
Expand Down
5 changes: 2 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@
Typo3SetList::CODE_QUALITY,
Typo3SetList::GENERAL,

Typo3LevelSetList::UP_TO_TYPO3_11,
// Typo3LevelSetList::UP_TO_TYPO3_12,
Typo3LevelSetList::UP_TO_TYPO3_12,

// TYPO3TestingFrameworkSetList::TYPO3_TESTING_FRAMEWORK_7,
])
Expand All @@ -96,7 +95,7 @@
->withImportNames(true, true, false)
->withConfiguredRule(ExtEmConfRector::class, [
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.3.99',
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '11.5.41-12.4.99',
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.26-12.4.99',
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
])
->withSkip([
Expand Down