Skip to content

Commit 0b93e79

Browse files
committed
Init v14 version
1 parent f3a2d2a commit 0b93e79

8 files changed

Lines changed: 116 additions & 145 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
branches:
88
- main
9-
- 4.0
9+
- typo3-v14
1010
pull_request:
1111
permissions:
1212
contents: read
@@ -69,7 +69,6 @@ jobs:
6969
- "php:csfix"
7070
- "php:sniff"
7171
- "ts:lint"
72-
- "xliff:lint"
7372
php-version:
7473
- "8.2"
7574
- "8.3"
@@ -115,16 +114,16 @@ jobs:
115114
fail-fast: false
116115
matrix:
117116
include:
118-
- typo3-version: "^13.4"
117+
- typo3-version: "^14.0"
119118
php-version: "8.2"
120119
composer-dependencies: highest
121-
- typo3-version: "^13.4"
120+
- typo3-version: "^14.0"
122121
php-version: "8.3"
123122
composer-dependencies: highest
124-
- typo3-version: "^13.4"
123+
- typo3-version: "^14.0"
125124
php-version: "8.4"
126125
composer-dependencies: highest
127-
- typo3-version: "^13.4"
126+
- typo3-version: "^14.0"
128127
php-version: "8.5"
129128
composer-dependencies: highest
130129
functional-tests:
@@ -143,25 +142,25 @@ jobs:
143142
uses: actions/checkout@v4
144143

145144
- name: Install testing system
146-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -s ${{ matrix.composerInstall }}
145+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -s ${{ matrix.composerInstall }}
147146

148147
- name: Functional Tests with mariadb (min)
149-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.4 -s functional
148+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mariadb -i 10.4 -s functional
150149

151150
- name: Functional Tests with mariadb (max)
152-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional
151+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional
153152

154153
- name: Functional Tests with mysql (min)
155-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional
154+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional
156155

157156
- name: Functional Tests with mysql (max)
158-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mysql -i 8.4 -s functional
157+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mysql -i 8.4 -s functional
159158

160159
- name: Functional Tests with postgres (min)
161-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 10 -s functional
160+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d postgres -i 10 -s functional
162161

163162
- name: Functional Tests with postgres (max)
164-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 18 -s functional
163+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d postgres -i 18 -s functional
165164

166165
- name: Functional Tests with sqlite
167-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d sqlite -s functional
166+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d sqlite -s functional

Build/Scripts/runTests.sh

Lines changed: 32 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ handleDbmsOptions() {
4545
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
4646
exit 1
4747
fi
48-
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.2"
49-
if ! [[ ${DBMS_VERSION} =~ ^(10.2|10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1|11.4|11.8)$ ]]; then
48+
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.11"
49+
if ! [[ ${DBMS_VERSION} =~ ^(10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1|11.4|11.8)$ ]]; then
5050
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
5151
echo >&2
5252
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
@@ -61,8 +61,8 @@ handleDbmsOptions() {
6161
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
6262
exit 1
6363
fi
64-
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="5.5"
65-
if ! [[ ${DBMS_VERSION} =~ ^(5.5|5.6|5.7|8.0|8.4)$ ]]; then
64+
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="8.4"
65+
if ! [[ ${DBMS_VERSION} =~ ^(8.0|8.1|8.2|8.3|8.4|9.5)$ ]]; then
6666
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
6767
echo >&2
6868
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
@@ -76,7 +76,7 @@ handleDbmsOptions() {
7676
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
7777
exit 1
7878
fi
79-
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10"
79+
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="16"
8080
if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15|16|17|18)$ ]]; then
8181
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
8282
echo >&2
@@ -200,28 +200,23 @@ Options:
200200
-i version
201201
Specify a specific database version
202202
With "-d mariadb":
203-
- 10.2 short-term, maintained until 2023-05-25 (default)
204-
- 10.3 short-term, maintained until 2023-05-25
205203
- 10.4 short-term, maintained until 2024-06-18
206204
- 10.5 short-term, maintained until 2025-06-24
207205
- 10.6 long-term, maintained until 2026-06
208206
- 10.7 short-term, no longer maintained
209207
- 10.8 short-term, maintained until 2023-05
210208
- 10.9 short-term, maintained until 2023-08
211209
- 10.10 short-term, maintained until 2023-11
212-
- 10.11 long-term, maintained until 2028-02
210+
- 10.11 long-term, maintained until 2028-02 (default)
213211
- 11.0 development series
214212
- 11.1 short-term development series
215213
- 11.4 long-term, maintained until 2033-01
216214
- 11.8 long-term, maintained until 2033-10
217215
With "-d mysql":
218-
- 5.5 unmaintained since 2018-12 (default)
219-
- 5.6 unmaintained since 2021-02
220-
- 5.7 maintained until 2023-10
221-
- 8.0 maintained until 2026-04
222-
- 8.4 long-term, maintained until 2032-30
216+
- 8.0 long-term, maintained until 2026-04
217+
- 8.4 long-term, maintained until 2032-30
223218
With "-d postgres":
224-
- 10 unmaintained since 2022-11-10 (default)
219+
- 10 unmaintained since 2022-11-10
225220
- 11 unmaintained since 2023-11-09
226221
- 12 maintained until 2024-11-14
227222
- 13 maintained until 2025-11-13
@@ -231,22 +226,18 @@ Options:
231226
- 17 maintained until 2029-11-08
232227
- 18 maintained until 2029-11-14
233228
234-
-t <11|12|13>
229+
-t <13>
235230
Only with -s composerInstall|composerInstallMin|composerInstallMax
236231
Specifies the TYPO3 CORE Version to be used
237-
- 11.5: use TYPO3 v11 (default)
238-
- 12.4: use TYPO3 v12
239-
- 13.4: use TYPO3 v13
232+
- 13.4: use TYPO3 v13 (default)
233+
- 14.0: use TYPO3 v14
240234
241-
-p <7.4|8.0|8.1|8.2|8.3|8.4|8.5>
235+
-p <8.2|8.3|8.4|8.5>
242236
Specifies the PHP minor version to be used
243-
- 7.4: use PHP 7.4 (default)
244-
- 8.0: use PHP 8.0
245-
- 8.1: use PHP 8.1
246237
- 8.2: use PHP 8.2
247-
- 8.3: use PHP 8.3
238+
- 8.3: use PHP 8.3 (default)
248239
- 8.4: use PHP 8.4
249-
- 8.5: use PHP 8.5
240+
- 8.5: use PHP 8.5
250241
251242
-e "<phpunit options>"
252243
Only with -s docsGenerate|functional|unit
@@ -283,24 +274,24 @@ Options:
283274
Show this help.
284275
285276
Examples:
286-
# Run all core unit tests using PHP 7.4
277+
# Run all core unit tests using PHP 8.5
287278
./Build/Scripts/runTests.sh -s unit
288279
289280
# Run all core units tests and enable xdebug (have a PhpStorm listening on port 9003!)
290281
./Build/Scripts/runTests.sh -x -s unit
291282
292-
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.1 and filter for test canRetrieveValueWithGP
293-
./Build/Scripts/runTests.sh -x -p 8.1 -- --filter 'classCanBeRegistered'
283+
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.3 and filter for test canRetrieveValueWithGP
284+
./Build/Scripts/runTests.sh -x -p 8.3 -- --filter 'classCanBeRegistered'
294285
295286
# Run functional tests in phpunit with a filtered test method name in a specified file
296287
# example will currently execute two tests, both of which start with the search term
297288
./Build/Scripts/runTests.sh -s functional -- --filter 'findRecordByImportSource' Tests/Functional/Repository/CategoryRepositoryTest.php
298289
299-
# Run functional tests on postgres with xdebug, php 8.1 and execute a restricted set of tests
300-
./Build/Scripts/runTests.sh -x -p 8.1 -s functional -d postgres -- Tests/Functional/Repository/CategoryRepositoryTest.php
290+
# Run functional tests on postgres with xdebug, php 8.3 and execute a restricted set of tests
291+
./Build/Scripts/runTests.sh -x -p 8.3 -s functional -d postgres -- Tests/Functional/Repository/CategoryRepositoryTest.php
301292
302-
# Run functional tests on postgres 11
303-
./Build/Scripts/runTests.sh -s functional -d postgres -i 11
293+
# Run functional tests on postgres 16
294+
./Build/Scripts/runTests.sh -s functional -d postgres -i 16
304295
EOF
305296
}
306297

@@ -319,17 +310,17 @@ ROOT_DIR="${PWD}"
319310

320311
# Option defaults
321312
TEST_SUITE=""
322-
TYPO3_VERSION="11"
313+
TYPO3_VERSION="14"
323314
DBMS="sqlite"
324315
DBMS_VERSION=""
325-
PHP_VERSION="8.1"
316+
PHP_VERSION="8.3"
326317
PHP_XDEBUG_ON=0
327318
PHP_XDEBUG_PORT=9003
328319
EXTRA_TEST_OPTIONS=""
329320
CGLCHECK_DRY_RUN=0
330321
DATABASE_DRIVER=""
331322
CONTAINER_BIN=""
332-
COMPOSER_ROOT_VERSION="12.4.2"
323+
COMPOSER_ROOT_VERSION="14.0.1"
333324
CONTAINER_INTERACTIVE="-it --init"
334325
HOST_UID=$(id -u)
335326
HOST_PID=$(id -g)
@@ -369,7 +360,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
369360
;;
370361
p)
371362
PHP_VERSION=${OPTARG}
372-
if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1|8.2|8.3|8.4|8.5)$ ]]; then
363+
if ! [[ ${PHP_VERSION} =~ ^(8.2|8.3|8.4|8.5)$ ]]; then
373364
INVALID_OPTIONS+=("-p ${OPTARG}")
374365
fi
375366
;;
@@ -378,7 +369,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
378369
;;
379370
t)
380371
TYPO3_VERSION=${OPTARG}
381-
if ! [[ ${TYPO3_VERSION} =~ ^(11|12|13)$ ]]; then
372+
if ! [[ ${TYPO3_VERSION} =~ ^(14)$ ]]; then
382373
INVALID_OPTIONS+=("-t ${OPTARG}")
383374
fi
384375
;;
@@ -451,7 +442,7 @@ mkdir -p .cache
451442
mkdir -p .Build/public/typo3temp/var/tests
452443

453444
IMAGE_PHP="ghcr.io/typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest"
454-
IMAGE_ALPINE="docker.io/alpine:3.8"
445+
IMAGE_ALPINE="docker.io/alpine:3.22"
455446
IMAGE_DOCS="ghcr.io/typo3-documentation/render-guides:latest"
456447
IMAGE_MARIADB="docker.io/mariadb:${DBMS_VERSION}"
457448
IMAGE_MYSQL="docker.io/mysql:${DBMS_VERSION}"
@@ -516,17 +507,9 @@ case ${TEST_SUITE} in
516507
cleanComposer
517508
stashComposerFiles
518509
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-install-highest-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/bash -c "
519-
if [ ${TYPO3_VERSION} -eq 11 ]; then
510+
if [ ${TYPO3_VERSION} -eq 14 ]; then
520511
composer require --no-ansi --no-interaction --no-progress --no-install \
521-
typo3/cms-core:^11.5.24 || exit 1
522-
fi
523-
if [ ${TYPO3_VERSION} -eq 12 ]; then
524-
composer require --no-ansi --no-interaction --no-progress --no-install \
525-
typo3/cms-core:^12.4.2 || exit 1
526-
fi
527-
if [ ${TYPO3_VERSION} -eq 13 ]; then
528-
composer require --no-ansi --no-interaction --no-progress --no-install \
529-
typo3/cms-core:^13.4 || exit 1
512+
typo3/cms-core:^14.0 || exit 1
530513
fi
531514
composer update --no-progress --no-interaction || exit 1
532515
composer show || exit 1
@@ -538,17 +521,9 @@ case ${TEST_SUITE} in
538521
cleanComposer
539522
stashComposerFiles
540523
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-install-lowest-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/bash -c "
541-
if [ ${TYPO3_VERSION} -eq 11 ]; then
542-
composer require --no-ansi --no-interaction --no-progress --no-install \
543-
typo3/cms-core:^11.5.24 || exit 1
544-
fi
545-
if [ ${TYPO3_VERSION} -eq 12 ]; then
546-
composer require --no-ansi --no-interaction --no-progress --no-install \
547-
typo3/cms-core:^12.4.2 || exit 1
548-
fi
549-
if [ ${TYPO3_VERSION} -eq 13 ]; then
524+
if [ ${TYPO3_VERSION} -eq 14 ]; then
550525
composer require --no-ansi --no-interaction --no-progress --no-install \
551-
typo3/cms-core:^13.4 || exit 1
526+
typo3/cms-core:^14.0 || exit 1
552527
fi
553528
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest || exit 1
554529
composer show || exit 1

Classes/Form/Element/RedirectElement.php

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@
55
namespace Ayacoo\RedirectTab\Form\Element;
66

77
use Ayacoo\RedirectTab\Service\RedirectDemandService;
8+
use Psr\Http\Message\ServerRequestInterface;
89
use Psr\Http\Message\UriInterface;
910
use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;
11+
use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
1012
use TYPO3\CMS\Backend\Routing\UriBuilder;
1113
use TYPO3\CMS\Core\Http\Uri;
1214
use TYPO3\CMS\Core\Utility\GeneralUtility;
13-
use TYPO3\CMS\Fluid\View\StandaloneView;
15+
use TYPO3\CMS\Core\View\ViewFactoryData;
16+
use TYPO3\CMS\Core\View\ViewFactoryInterface;
17+
use TYPO3\CMS\Core\View\ViewInterface;
1418
use TYPO3\CMS\Redirects\Utility\RedirectConflict;
1519

1620
class RedirectElement extends AbstractFormElement
1721
{
18-
private StandaloneView $view;
22+
private ViewInterface $view;
1923

2024
public function render(): array
2125
{
@@ -28,7 +32,7 @@ public function render(): array
2832
$currentPage = 1;
2933
}
3034

31-
$this->prepareView();
35+
$this->prepareView($request);
3236

3337
$this->view->assignMultiple([
3438
'redirects' => $redirectDemandService->getRedirects((int)$currentPage),
@@ -40,21 +44,23 @@ public function render(): array
4044
]);
4145

4246
$result = $this->initializeResultArray();
43-
$result['html'] = $this->view->render();
47+
$result['html'] = $this->view->render('List');
4448
return $result;
4549
}
4650

47-
protected function prepareView(): void
51+
protected function prepareView(ServerRequestInterface $request): void
4852
{
49-
$templateName = 'List';
50-
$this->view = GeneralUtility::makeInstance(StandaloneView::class);
51-
$this->view->setTemplate($templateName);
52-
$this->view->setTemplateRootPaths(['EXT:redirect_tab/Resources/Private/Templates/Backend']);
53-
$this->view->setPartialRootPaths(['EXT:redirect_tab/Resources/Private/Partials/Backend']);
54-
$this->view->setLayoutRootPaths(['EXT:redirect_tab/Resources/Private/Layouts']);
53+
$viewFactory = GeneralUtility::makeInstance(ViewFactoryInterface::class);
54+
$viewFactoryData = new ViewFactoryData(
55+
templateRootPaths: ['EXT:redirect_tab/Resources/Private/Templates/Backend'],
56+
partialRootPaths: ['EXT:redirect_tab/Resources/Private/Partials/Backend'],
57+
layoutRootPaths: ['EXT:redirect_tab/Resources/Private/Layouts'],
58+
request: $request,
59+
);
60+
$this->view = $viewFactory->create($viewFactoryData);
5561
}
5662

57-
protected function buildRedirectUrl(int $currentPage): UriInterface|Uri
63+
protected function buildRedirectUrl(int $currentPage): UriInterface|Uri|null
5864
{
5965
$backendUriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
6066
$uriParameters = [
@@ -66,6 +72,10 @@ protected function buildRedirectUrl(int $currentPage): UriInterface|Uri
6672
'page' => $currentPage,
6773
];
6874

69-
return $backendUriBuilder->buildUriFromRoute('record_edit', $uriParameters);
75+
try {
76+
return $backendUriBuilder->buildUriFromRoute('record_edit', $uriParameters);
77+
} catch (RouteNotFoundException) {
78+
return null;
79+
}
7080
}
7181
}

0 commit comments

Comments
 (0)