mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2025-03-15 08:43:50 +01:00
[!!!][TASK] Remove TYPO3 v11 Support (#1578)
As official v11 support has stopped. Resolves: #1567
This commit is contained in:
parent
70a76f7a76
commit
b900a408cf
13 changed files with 19 additions and 220 deletions
.github/workflows
.gitlab/pipeline/jobs
func-php8.1-v11-highest.ymlfunc-php8.1-v11-lowest.ymlunit-php8.1-v11-highest.ymlunit-php8.1-v11-lowest.yml
Build/Scripts
Configuration/TCA
README.mdTests/Unit/Controller
composer.jsonext_emconf.phprector.php
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
func-php8.1-v11-highest:
|
||||
extends: .default
|
||||
image: ghcr.io/typo3/core-testing-php81:latest
|
||||
services:
|
||||
- mariadb:10
|
||||
stage: test
|
||||
needs:
|
||||
- build-composer-dependencies
|
||||
- php-lint-php8.1
|
||||
script:
|
||||
- echo "Job ${CI_JOB_NAME}"
|
||||
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
|
||||
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
|
||||
- composer ci:tests:functional
|
|
@ -1,14 +0,0 @@
|
|||
func-php8.1-v11-lowest:
|
||||
extends: .default
|
||||
image: ghcr.io/typo3/core-testing-php81:latest
|
||||
services:
|
||||
- mariadb:10
|
||||
stage: test
|
||||
needs:
|
||||
- build-composer-dependencies
|
||||
- php-lint-php8.1
|
||||
script:
|
||||
- echo "Job ${CI_JOB_NAME}"
|
||||
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
|
||||
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
|
||||
- composer ci:tests:functional
|
|
@ -1,12 +0,0 @@
|
|||
unit-php8.1-v11-highest:
|
||||
extends: .default
|
||||
image: ghcr.io/typo3/core-testing-php81:latest
|
||||
stage: test
|
||||
needs:
|
||||
- build-composer-dependencies
|
||||
- php-lint-php8.1
|
||||
script:
|
||||
- echo "Job ${CI_JOB_NAME}"
|
||||
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
|
||||
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
|
||||
- composer ci:tests:unit
|
|
@ -1,12 +0,0 @@
|
|||
unit-php8.1-v11-lowest:
|
||||
extends: .default
|
||||
image: ghcr.io/typo3/core-testing-php81:latest
|
||||
stage: test
|
||||
needs:
|
||||
- build-composer-dependencies
|
||||
- php-lint-php8.1
|
||||
script:
|
||||
- echo "Job ${CI_JOB_NAME}"
|
||||
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
|
||||
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
|
||||
- composer ci:tests:unit
|
|
@ -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>
|
||||
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -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',
|
||||
|
@ -208,84 +205,3 @@ $tca = [
|
|||
],
|
||||
],
|
||||
];
|
||||
|
||||
$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,7 +1,6 @@
|
|||
# Example TYPO3 extension for code quality checks and automated tests
|
||||
|
||||
[](https://get.typo3.org/version/12)
|
||||
[](https://get.typo3.org/version/11)
|
||||
[](https://packagist.org/packages/ttn/tea)
|
||||
[](https://packagist.org/packages/ttn/tea)
|
||||
[](https://github.com/TYPO3BestPractices/tea/actions)
|
||||
|
|
|
@ -12,10 +12,8 @@ use TYPO3\CMS\Core\Context\Context;
|
|||
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;
|
||||
|
@ -55,9 +53,6 @@ final class FrontEndEditorControllerTest extends UnitTestCase
|
|||
|
||||
// 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,
|
||||
|
@ -214,32 +209,15 @@ final class FrontEndEditorControllerTest extends UnitTestCase
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,6 @@ use TTN\Tea\Controller\TeaController;
|
|||
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;
|
||||
|
@ -46,9 +45,6 @@ final class TeaControllerTest extends UnitTestCase
|
|||
$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);
|
||||
|
|
|
@ -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",
|
||||
|
@ -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"
|
||||
|
|
|
@ -8,10 +8,10 @@ $EM_CONF[$_EXTKEY] = [
|
|||
'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',
|
||||
|
|
|
@ -80,8 +80,7 @@ return RectorConfig::configure()
|
|||
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,
|
||||
])
|
||||
|
@ -96,7 +95,7 @@ return RectorConfig::configure()
|
|||
->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([
|
||||
|
|
Loading…
Add table
Reference in a new issue