From 80d8b976d33128c09db9fcda14395be1eaabafcf Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 19 Apr 2023 11:40:15 +0200 Subject: [PATCH] Support TYPO3 v12 --- .github/workflows/ci.yaml | 23 +++++++++++++++++++---- composer.json | 28 +++++++++++++++------------- shell.nix | 20 +++++++++++++------- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab0bef2..501e91c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,7 @@ jobs: - 7.4 - 8.0 - 8.1 + - 8.2 steps: - name: Checkout uses: actions/checkout@v3 @@ -68,8 +69,15 @@ jobs: matrix: include: - php-version: '7.4' - - php-version: '8.0' + typo3-version: '^11.5' - php-version: '8.1' + typo3-version: '^11.5' + - php-version: '8.2' + typo3-version: '^11.5' + - php-version: '8.1' + typo3-version: '^12.4@dev' + - php-version: '8.2' + typo3-version: '^12.4@dev' steps: - uses: actions/checkout@v3 @@ -82,7 +90,7 @@ jobs: - name: Install dependencies run: |- - composer require --no-interaction --prefer-dist --no-progress + composer req "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3-version }}" "typo3/cms-form:${{ matrix.typo3-version }}" --prefer-dist --no-progress --no-interaction ./vendor/bin/codecept build - name: Code Quality (by PHPStan) @@ -94,8 +102,15 @@ jobs: matrix: include: - php-version: '7.4' - - php-version: '8.0' + typo3-version: '^11.5' + - php-version: '8.1' + typo3-version: '^11.5' + - php-version: '8.2' + typo3-version: '^11.5' - php-version: '8.1' + typo3-version: '^12.4@dev' + - php-version: '8.2' + typo3-version: '^12.4@dev' steps: - uses: actions/checkout@v3 @@ -120,7 +135,7 @@ jobs: done - name: Install dependencies - run: composer install --no-interaction --prefer-dist --no-progress + run: composer req "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3-version }}" "typo3/cms-form:${{ matrix.typo3-version }}" --prefer-dist --no-progress --no-interaction - name: PHPUnit Tests env: diff --git a/composer.json b/composer.json index e5e0ddd..e67324c 100644 --- a/composer.json +++ b/composer.json @@ -30,29 +30,31 @@ } }, "require": { - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", - "typo3/cms-backend": "^11.5", - "typo3/cms-core": "^11.5", - "typo3/cms-extbase": "^11.5", - "typo3/cms-frontend": "^11.5" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "typo3/cms-backend": "^12.4@dev", + "typo3/cms-core": "^12.4@dev", + "typo3/cms-extbase": "^12.4@dev", + "typo3/cms-fluid-styled-content": "^12.4@dev", + "typo3/cms-form": "^12.4@dev", + "typo3/cms-frontend": "^11.5 || ^12.4@dev" }, "require-dev": { - "codeception/codeception": "^4.2", - "codeception/module-webdriver": "^2.0", + "codeception/codeception": "^5.0", + "codeception/module-webdriver": "^3.2", "cweagans/composer-patches": "^1.7", "friendsofphp/php-cs-fixer": "^3.11", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "1.1.0", + "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5", - "saschaegerer/phpstan-typo3": "^1.1", - "typo3/cms-fluid-styled-content": "^11.5", - "typo3/cms-form": "^11.5", - "typo3/cms-tstemplate": "^11.5", - "typo3/testing-framework": "^6.6" + "saschaegerer/phpstan-typo3": "^1.8", + "typo3/testing-framework": "7.x-dev" }, + "minimum-stability": "dev", + "prefer-stable": true, "config": { "sort-packages": true, + "lock": false, "allow-plugins": { "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true, diff --git a/shell.nix b/shell.nix index ba97917..3b70b62 100644 --- a/shell.nix +++ b/shell.nix @@ -1,21 +1,25 @@ { pkgs ? import { } }: let + php = pkgs.php82; + inherit(pkgs.php81Packages) composer; + projectInstall = pkgs.writeShellApplication { name = "project-install"; runtimeInputs = [ - pkgs.php81 - pkgs.php81Packages.composer + php + composer ]; text = '' + rm -rf .Build/ vendor/ composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT" ''; }; projectValidateComposer = pkgs.writeShellApplication { name = "project-validate-composer"; runtimeInputs = [ - pkgs.php81 - pkgs.php81Packages.composer + php + composer ]; text = '' composer validate @@ -39,7 +43,7 @@ let projectCodingGuideline = pkgs.writeShellApplication { name = "project-coding-guideline"; runtimeInputs = [ - pkgs.php81 + php projectInstall ]; text = '' @@ -54,12 +58,12 @@ let pkgs.sqlite pkgs.firefox pkgs.geckodriver - pkgs.php81 + php ]; text = '' project-install - export INSTANCE_PATH="$PROJECT_ROOT/.Build/web/typo3temp/var/tests/acceptance/" + export INSTANCE_PATH="$PROJECT_ROOT/.Build/web/typo3temp/var/tests/acceptance" mkdir -p "$INSTANCE_PATH" ./vendor/bin/codecept run @@ -73,6 +77,8 @@ in pkgs.mkShell { projectValidateXml projectCodingGuideline projectTestAcceptance + php + composer ]; shellHook = ''