Skip to content

Commit fd3e48a

Browse files
committed
Merge branch 'typo3-v14'
# Conflicts: # .github/workflows/ci.yml # Build/Scripts/runTests.sh # README.md # composer.json # ext_emconf.php
2 parents 3fd57be + 213fcab commit fd3e48a

19 files changed

Lines changed: 326 additions & 157 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
branches:
88
- main
99
- v3
10-
- php85
1110
pull_request:
1211
permissions:
1312
contents: read
@@ -115,18 +114,21 @@ 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
127126
- typo3-version: "^13.4"
128127
php-version: "8.5"
129128
composer-dependencies: highest
129+
- typo3-version: "^14.0"
130+
php-version: "8.5"
131+
composer-dependencies: highest
130132
functional-tests:
131133
name: "Functional tests"
132134
runs-on: ubuntu-22.04
@@ -143,22 +145,25 @@ jobs:
143145
uses: actions/checkout@v4
144146

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

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

151153
- name: Functional Tests with mariadb (max)
152-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional
154+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional
155+
156+
- name: Functional Tests with mysql (min)
157+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional
153158

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

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

160165
- name: Functional Tests with postgres (max)
161-
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 16 -s functional
166+
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d postgres -i 18 -s functional
162167

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

Build/Scripts/runTests.sh

Lines changed: 43 additions & 59 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)$ ]]; 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)$ ]]; 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,8 +76,8 @@ 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"
80-
if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15|16)$ ]]; then
79+
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="16"
80+
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
8383
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
@@ -151,7 +151,7 @@ restoreComposerFiles() {
151151

152152
loadHelp() {
153153
# Load help text into $HELP
154-
read -r -d '' HELP <<EOF
154+
read -r -d '' HELP <<'EOF'
155155
TYPO3 core test runner. Execute unit, functional and other test suites in
156156
a container based test environment. Handles execution of single test files,
157157
sending xdebug information to a local IDE and more.
@@ -200,46 +200,42 @@ 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
213+
- 11.4 long-term, maintained until 2033-01
214+
- 11.8 long-term, maintained until 2033-10
215215
With "-d mysql":
216-
- 5.5 unmaintained since 2018-12 (default)
217-
- 5.6 unmaintained since 2021-02
218-
- 5.7 maintained until 2023-10
219-
- 8.0 maintained until 2026-04
216+
- 8.0 long-term, maintained until 2026-04
217+
- 8.4 long-term, maintained until 2032-30
220218
With "-d postgres":
221-
- 10 unmaintained since 2022-11-10 (default)
219+
- 10 unmaintained since 2022-11-10
222220
- 11 unmaintained since 2023-11-09
223221
- 12 maintained until 2024-11-14
224222
- 13 maintained until 2025-11-13
225223
- 14 maintained until 2026-11-12
226224
- 15 maintained until 2027-11-11
227-
- 16 maintained until 2028-11-09
225+
- 16 maintained until 2028-11-09 (default)
226+
- 17 maintained until 2029-11-08
227+
- 18 maintained until 2029-11-14
228228
229-
-t <11|12|13>
229+
-t <13>
230230
Only with -s composerInstall|composerInstallMin|composerInstallMax
231231
Specifies the TYPO3 CORE Version to be used
232-
- 11.5: use TYPO3 v11 (default)
233-
- 12.4: use TYPO3 v12
234-
- 13.4: use TYPO3 v13
232+
- 13.4: use TYPO3 v13 (default)
233+
- 14.0: use TYPO3 v14
235234
236-
-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>
237236
Specifies the PHP minor version to be used
238-
- 7.4: use PHP 7.4 (default)
239-
- 8.0: use PHP 8.0
240-
- 8.1: use PHP 8.1
241237
- 8.2: use PHP 8.2
242-
- 8.3: use PHP 8.3
238+
- 8.3: use PHP 8.3 (default)
243239
- 8.4: use PHP 8.4
244240
- 8.5: use PHP 8.5
245241
@@ -278,24 +274,24 @@ Options:
278274
Show this help.
279275
280276
Examples:
281-
# Run all core unit tests using PHP 7.4
277+
# Run all core unit tests using PHP 8.5
282278
./Build/Scripts/runTests.sh -s unit
283279
284280
# Run all core units tests and enable xdebug (have a PhpStorm listening on port 9003!)
285281
./Build/Scripts/runTests.sh -x -s unit
286282
287-
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.1 and filter for test canRetrieveValueWithGP
288-
./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'
289285
290286
# Run functional tests in phpunit with a filtered test method name in a specified file
291287
# example will currently execute two tests, both of which start with the search term
292288
./Build/Scripts/runTests.sh -s functional -- --filter 'findRecordByImportSource' Tests/Functional/Repository/CategoryRepositoryTest.php
293289
294-
# Run functional tests on postgres with xdebug, php 8.1 and execute a restricted set of tests
295-
./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
296292
297-
# Run functional tests on postgres 11
298-
./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
299295
EOF
300296
}
301297

@@ -314,17 +310,17 @@ ROOT_DIR="${PWD}"
314310

315311
# Option defaults
316312
TEST_SUITE=""
317-
TYPO3_VERSION="11"
313+
TYPO3_VERSION="14"
318314
DBMS="sqlite"
319315
DBMS_VERSION=""
320-
PHP_VERSION="8.1"
316+
PHP_VERSION="8.3"
321317
PHP_XDEBUG_ON=0
322318
PHP_XDEBUG_PORT=9003
323319
EXTRA_TEST_OPTIONS=""
324320
CGLCHECK_DRY_RUN=0
325321
DATABASE_DRIVER=""
326322
CONTAINER_BIN=""
327-
COMPOSER_ROOT_VERSION="12.4.2"
323+
COMPOSER_ROOT_VERSION="14.0.1"
328324
CONTAINER_INTERACTIVE="-it --init"
329325
HOST_UID=$(id -u)
330326
HOST_PID=$(id -g)
@@ -364,7 +360,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
364360
;;
365361
p)
366362
PHP_VERSION=${OPTARG}
367-
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
368364
INVALID_OPTIONS+=("-p ${OPTARG}")
369365
fi
370366
;;
@@ -373,7 +369,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
373369
;;
374370
t)
375371
TYPO3_VERSION=${OPTARG}
376-
if ! [[ ${TYPO3_VERSION} =~ ^(11|12|13)$ ]]; then
372+
if ! [[ ${TYPO3_VERSION} =~ ^(14)$ ]]; then
377373
INVALID_OPTIONS+=("-t ${OPTARG}")
378374
fi
379375
;;
@@ -446,7 +442,7 @@ mkdir -p .cache
446442
mkdir -p .Build/public/typo3temp/var/tests
447443

448444
IMAGE_PHP="ghcr.io/typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest"
449-
IMAGE_ALPINE="docker.io/alpine:3.8"
445+
IMAGE_ALPINE="docker.io/alpine:3.22"
450446
IMAGE_DOCS="ghcr.io/typo3-documentation/render-guides:latest"
451447
IMAGE_MARIADB="docker.io/mariadb:${DBMS_VERSION}"
452448
IMAGE_MYSQL="docker.io/mysql:${DBMS_VERSION}"
@@ -511,17 +507,9 @@ case ${TEST_SUITE} in
511507
cleanComposer
512508
stashComposerFiles
513509
${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 "
514-
if [ ${TYPO3_VERSION} -eq 11 ]; then
510+
if [ ${TYPO3_VERSION} -eq 14 ]; then
515511
composer require --no-ansi --no-interaction --no-progress --no-install \
516-
typo3/cms-core:^11.5.24 || exit 1
517-
fi
518-
if [ ${TYPO3_VERSION} -eq 12 ]; then
519-
composer require --no-ansi --no-interaction --no-progress --no-install \
520-
typo3/cms-core:^12.4.2 || exit 1
521-
fi
522-
if [ ${TYPO3_VERSION} -eq 13 ]; then
523-
composer require --no-ansi --no-interaction --no-progress --no-install \
524-
typo3/cms-core:^13.4 || exit 1
512+
typo3/cms-core:^14.0 || exit 1
525513
fi
526514
composer update --no-progress --no-interaction || exit 1
527515
composer show || exit 1
@@ -533,17 +521,9 @@ case ${TEST_SUITE} in
533521
cleanComposer
534522
stashComposerFiles
535523
${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 "
536-
if [ ${TYPO3_VERSION} -eq 11 ]; then
537-
composer require --no-ansi --no-interaction --no-progress --no-install \
538-
typo3/cms-core:^11.5.24 || exit 1
539-
fi
540-
if [ ${TYPO3_VERSION} -eq 12 ]; then
541-
composer require --no-ansi --no-interaction --no-progress --no-install \
542-
typo3/cms-core:^12.4.2 || exit 1
543-
fi
544-
if [ ${TYPO3_VERSION} -eq 13 ]; then
524+
if [ ${TYPO3_VERSION} -eq 14 ]; then
545525
composer require --no-ansi --no-interaction --no-progress --no-install \
546-
typo3/cms-core:^13.4 || exit 1
526+
typo3/cms-core:^14.0 || exit 1
547527
fi
548528
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest || exit 1
549529
composer show || exit 1
@@ -583,7 +563,11 @@ case ${TEST_SUITE} in
583563
SUITE_EXIT_CODE=$?
584564
;;
585565
postgres)
586-
${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null
566+
POSTGRES_TMPFS="/var/lib/postgresql/data"
567+
if [[ ${DBMS_VERSION} -eq 18 ]]; then
568+
POSTGRES_TMPFS="/var/lib/postgresql"
569+
fi
570+
${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs ${POSTGRES_TMPFS}:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null
587571
waitFor postgres-func-${SUFFIX} 5432
588572
CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=bamboo -e typo3DatabaseUsername=funcu -e typo3DatabaseHost=postgres-func-${SUFFIX} -e typo3DatabasePassword=funcp"
589573
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}"

Classes/Command/UpdateMetadataCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Ayacoo\Tiktok\Domain\Repository\FileRepository;
88
use Ayacoo\Tiktok\Helper\TiktokHelper;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910
use Symfony\Component\Console\Command\Command;
1011
use Symfony\Component\Console\Input\InputInterface;
1112
use Symfony\Component\Console\Input\InputOption;
@@ -19,6 +20,7 @@
1920
use TYPO3\CMS\Core\Resource\ResourceFactory;
2021
use TYPO3\CMS\Core\Utility\GeneralUtility;
2122

23+
#[AsCommand('tiktok:updateMetadata', 'Updates the Tiktok metadata')]
2224
class UpdateMetadataCommand extends Command
2325
{
2426
protected function configure(): void
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Ayacoo\Tiktok\EventListener;
6+
7+
use TYPO3\CMS\Core\Attribute\AsEventListener;
8+
use TYPO3\CMS\Core\Imaging\Event\ModifyIconForResourcePropertiesEvent;
9+
use TYPO3\CMS\Core\Resource\File;
10+
11+
/**
12+
* Adjusts the icon for resources with mime type "video/tiktok".
13+
*/
14+
final class ModifyIconForResourcePropertiesListener
15+
{
16+
#[AsEventListener]
17+
public function __invoke(ModifyIconForResourcePropertiesEvent $event): void
18+
{
19+
$resource = $event->getResource();
20+
21+
if (!$resource instanceof File) {
22+
return;
23+
}
24+
25+
if ($resource->getMimeType() === 'video/tiktok') {
26+
$event->setIconIdentifier('mimetypes-media-image-tiktok');
27+
}
28+
}
29+
}

Classes/Rendering/TiktokRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use TYPO3\CMS\Core\Utility\GeneralUtility;
1616
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
1717
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
18-
use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException;
18+
use TYPO3\CMS\Extbase\Configuration\Exception\NoServerRequestGivenException;
1919

2020
/**
2121
* Tiktok renderer class
@@ -110,7 +110,7 @@ protected function getPrivacySetting(): bool
110110
$privacy = (bool)$extSettings['privacy'] ?? false;
111111
}
112112
return $privacy;
113-
} catch (InvalidConfigurationTypeException $e) {
113+
} catch (NoServerRequestGivenException $e) {
114114
return false;
115115
}
116116
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Ayacoo\Tiktok\Tca\DisplayCond;
6+
7+
class IsTiktok
8+
{
9+
/**
10+
* @param array<string,mixed> $parameters
11+
*/
12+
public function match(array $parameters): bool
13+
{
14+
$record = $parameters['record'] ?? [];
15+
if (!is_array($record)) {
16+
return false;
17+
}
18+
19+
return (!empty($record['tiktok_html'] ?? ''));
20+
}
21+
}

0 commit comments

Comments
 (0)