From 99d230de7cfa4f85f8855502f67da1b589be6d05 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 13:50:36 +0100 Subject: [PATCH] feature: enable support for Pimcore 11 (#18) * feature: enable support for Pimcore 11 * fix: add Pimcore Admin Bundle to pipeline * fix: use Pimcore 10 only with PHP 8.1 --- .gitattributes | 2 ++ .github/workflows/qa.yaml | 2 +- .github/workflows/tests.yaml | 11 +++++++++-- .gitignore | 13 ++++++++++--- .php-cs-fixer.php | 2 +- compose.yaml | 2 +- composer.json | 6 +++--- phpunit.xml.dist | 2 +- 8 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.gitattributes b/.gitattributes index d502c58..2ce5a83 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +/.editorconfig export-ignore /.gitattributes export-ignore /.github/ export-ignore /.gitignore export-ignore @@ -10,4 +11,5 @@ /phpstan-baseline.neon export-ignore /phpstan.neon export-ignore /phpunit.xml.dist export-ignore +/sonar-project.properties export-ignore /tests/ export-ignore diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 2f782b7..5ca161e 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -22,7 +22,7 @@ jobs: - name: PHP Setup uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 - name: Validate composer.json run: composer validate --strict diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 82c6670..6952836 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,9 +33,11 @@ jobs: matrix: include: - php-version: "8.1" - dependencies: "lowest" + dependencies: "lowest" # Pimcore 10.5.0 - php-version: "8.1" - dependencies: "highest" + dependencies: "highest" # Pimcore 11.* + - php-version: "8.2" + dependencies: "highest" # Pimcore 11.* steps: - name: Git Checkout @@ -50,6 +52,11 @@ jobs: uses: ramsey/composer-install@v2 with: dependency-versions: ${{ matrix.dependencies }} + composer-options: ${{ matrix.composer-options }} + + - name: Add Pimcore Admin UI + run: composer require --dev pimcore/admin-ui-classic-bundle --no-interaction + if: matrix.dependencies == 'highest' - name: Execute tests run: composer tests diff --git a/.gitignore b/.gitignore index 237e3f1..9ab1ab7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,17 @@ /composer.lock /vendor/ +# Docker Compose +/compose.override.yaml + # PHP-CS-Fixer -.php-cs-fixer.cache +/.php-cs-fixer.cache # PHPUnit -.phpunit.result.cache -/reports/ +/.phpunit.result.cache /.phpunit.cache/ +/reports/ + +# Optionally, ignore project files for common IDE +# A better alternative would be to globally ignore configuration files of your preferred IDE (see: https://stackoverflow.com/a/7335487) +#/.idea/ diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index cd6d8fa..4795d19 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,7 +3,7 @@ /* * This document has been initially generated with * https://mlocati.github.io/php-cs-fixer-configurator/#version:3.5.0|configurator - * and then adapted be our needs + * and then adapted to our needs */ return (new PhpCsFixer\Config) diff --git a/compose.yaml b/compose.yaml index 1dabac3..28d168d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -16,7 +16,7 @@ services: timeout: 10s php: - image: pimcore/pimcore:php8.1-latest + image: pimcore/pimcore:php8.2-latest volumes: - ./:/var/www/html/ environment: diff --git a/composer.json b/composer.json index 93fdc01..55b24cb 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ } }, "require": { - "php": "~8.1.0", - "pimcore/pimcore": "^10.5.1", + "php": "~8.1.0 || ~8.2.0", + "pimcore/pimcore": "^10.5.1 || ^11.0", "symfony/console": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0", "symfony/framework-bundle": "^5.0 || ^6.0", @@ -34,7 +34,7 @@ "phpstan/phpstan-symfony": "^1.2", "phpunit/phpunit": "^9.5", "spatie/phpunit-snapshot-assertions": "^4.2", - "symfony/filesystem": "^5.4", + "symfony/filesystem": "^5.4 || ^6.0", "teamneusta/pimcore-testing-framework": "^0.11.0" }, "conflict": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6d27b57..148fef9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -25,7 +25,7 @@ - ./src + ./src/