Skip to content

Commit

Permalink
[FEATURE] Add v13 support (#47)
Browse files Browse the repository at this point in the history
* Add v13 support

* [TASK] Special handling for v13 doctrine dependency in CI

* [TASK] Prevent deprecation warning in functional test

---------

Co-authored-by: Simon Praetorius <simon@praetorius.me>
  • Loading branch information
ochorocho and s2b authored Feb 2, 2024
1 parent 926e3e5 commit f48b11f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
matrix:
php-versions: [8.2, 8.1]
typo3-versions: [11, 12]
include:
- php-versions: 8.2
typo3-versions: 13

name: Unit Testing (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }})
steps:
Expand Down Expand Up @@ -81,8 +84,13 @@ jobs:
composer-php-${{ matrix.php-versions }}-
composer-
- name: Install composer dependencies v13
if: matrix.typo3-versions == 13
run: composer require typo3/minimal:^13 doctrine/dbal:"4.0.0-RC2@rc" --prefer-dist --no-progress

-
name: Install composer dependencies
if: matrix.typo3-version != 13
run: composer require typo3/minimal "^${{ matrix.typo3-versions }}" --prefer-dist --no-progress

-
Expand All @@ -105,6 +113,9 @@ jobs:
matrix:
php-versions: [8.2, 8.1]
typo3-versions: [11, 12]
include:
- php-versions: 8.2
typo3-versions: 13

name: Functional Testing (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }})
steps:
Expand Down Expand Up @@ -138,8 +149,13 @@ jobs:
composer-php-${{ matrix.php-versions }}-
composer-
- name: Install composer dependencies v13
if: matrix.typo3-versions == 13
run: composer require typo3/minimal:^13 doctrine/dbal:"4.0.0-RC2@rc" --prefer-dist --no-progress

-
name: Install composer dependencies
if: matrix.typo3-version != 13
run: composer require typo3/minimal "^${{ matrix.typo3-versions }}" --prefer-dist --no-progress

-
Expand Down
2 changes: 1 addition & 1 deletion Build/Testing/FunctionalTestsBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* This file is defined in FunctionalTests.xml and called by phpunit
* before instantiating the test suites.
*/
(static function () {
(static function() {
$testbase = new \TYPO3\TestingFramework\Core\Testbase();
$testbase->defineOriginalRootPath();
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests');
Expand Down
2 changes: 1 addition & 1 deletion Build/Testing/UnitTestsBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* according script within TYPO3 core's Build/Scripts directory and
* adapt to extensions needs.
*/
(static function () {
(static function() {
$testbase = new \TYPO3\TestingFramework\Core\Testbase();

// These if's are for core testing (package typo3/cms) only. cms-composer-installer does
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/ViteConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

protected function prepareEntrypoints(array $entrypoints, string $rootPath): array
{
return array_map(function ($entrypoint) use ($rootPath) {
return array_map(function($entrypoint) use ($rootPath) {
$entrypoint = $this->partialRealpath($this->getAbsoluteInputPath($entrypoint));
$entrypointRelativeToRoot = PathUtility::getRelativePath($rootPath, PathUtility::dirname($entrypoint));
return $entrypointRelativeToRoot . PathUtility::basename($entrypoint);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/ViteManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function get(string $entrypoint): ?ViteManifestItem
*/
public function getValidEntrypoints(): array
{
return array_filter($this->items, fn(ViteManifestItem $entry) => $entry->isEntry);
return array_filter($this->items, fn (ViteManifestItem $entry) => $entry->isEntry);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion Tests/Functional/Imaging/SvgIconProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Imaging\IconSize;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

Expand Down Expand Up @@ -52,7 +53,7 @@ protected function setUp(): void
$this->svgIconProvider = $this->get(SvgIconProvider::class);
$this->icon = GeneralUtility::makeInstance(Icon::class);
$this->icon->setIdentifier('typo3-logo');
$this->icon->setSize(Icon::SIZE_SMALL);
$this->icon->setSize(class_exists(IconSize::class) ? IconSize::SMALL : Icon::SIZE_SMALL);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
],
"require": {
"php": ">=8.1",
"typo3/cms-core": "^11.5 || ^12.4"
"typo3/cms-core": "^11.5 || ^12.4 || ^13.0"
},
"require-dev": {
"typo3/coding-standards": "^0.7.1",
"typo3/coding-standards": "^0.8.x-dev",
"editorconfig-checker/editorconfig-checker": "^10.3",
"typo3/testing-framework": "^8.0 || ^7.0",
"phpstan/phpstan": "^1.10",
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'version' => '1.8.0',
'constraints' => [
'depends' => [
'typo3' => '11.5.0-12.4.99',
'typo3' => '11.5.0-13.4.99',
],
],
'autoload' => [
Expand Down

0 comments on commit f48b11f

Please sign in to comment.