From b33457af012a3ad8a156bb2aa0c0cd13796bb643 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Tue, 7 Nov 2023 18:53:14 +0100 Subject: [PATCH 1/9] feature: enable support for Pimcore 11 --- .gitattributes | 2 ++ .github/workflows/qa.yaml | 2 +- .github/workflows/tests.yaml | 4 ++++ .gitignore | 13 ++++++++++--- .php-cs-fixer.php | 2 +- compose.yaml | 2 +- composer.json | 6 +++--- phpunit.xml.dist | 2 +- 8 files changed, 23 insertions(+), 10 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..09b8a26 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -36,6 +36,10 @@ jobs: dependencies: "lowest" - php-version: "8.1" dependencies: "highest" + - php-version: "8.2" + dependencies: "lowest" + - php-version: "8.2" + dependencies: "highest" steps: - name: Git Checkout 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/ From aa8240f711bfd5e701a0fa29c442d1695546f9d2 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Tue, 7 Nov 2023 18:57:45 +0100 Subject: [PATCH 2/9] fix: add Pimcore Admin Bundle to pipeline --- .github/workflows/tests.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 09b8a26..32c34cc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -55,6 +55,10 @@ jobs: with: dependency-versions: ${{ matrix.dependencies }} + - 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 env: From ba56392bca45433ef960703e691a95eb4b61b5f4 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 09:56:26 +0100 Subject: [PATCH 3/9] fix: use Pimcore 10 only with PHP 8.1 --- .github/workflows/tests.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 32c34cc..7697de1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -38,6 +38,7 @@ jobs: dependencies: "highest" - php-version: "8.2" dependencies: "lowest" + composer-options: "--with pimcore/pimcore='^11.0'" - php-version: "8.2" dependencies: "highest" @@ -54,10 +55,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' + if: matrix.dependencies == 'highest' && matrix.php-version == '8.2' - name: Execute tests run: composer tests From a3c73e58bd904ac38795f7222cb027e367e222ba Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 09:58:55 +0100 Subject: [PATCH 4/9] fix: use Pimcore 10 only with PHP 8.1 part 2 --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7697de1..20a2086 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -38,7 +38,7 @@ jobs: dependencies: "highest" - php-version: "8.2" dependencies: "lowest" - composer-options: "--with pimcore/pimcore='^11.0'" + composer-options: "--with pimcore/pimcore=^11.0" - php-version: "8.2" dependencies: "highest" From ee67c9600c28997d1b327b980484fcf531ea85bd Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 10:38:37 +0100 Subject: [PATCH 5/9] fix: use the correct Pimcore version with the correct php versions --- .github/workflows/tests.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 20a2086..fc14f4f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,13 +32,21 @@ jobs: fail-fast: false matrix: include: + # Pimcore 10.5.1 - php-version: "8.1" dependencies: "lowest" + # Pimcore 10.6.* - php-version: "8.1" dependencies: "highest" + composer-options: "--with pimcore/pimcore=^10.6" + # Pimcore 11.* + - php-version: "8.1" + dependencies: "highest" + # Pimcore 11.0 - php-version: "8.2" dependencies: "lowest" composer-options: "--with pimcore/pimcore=^11.0" + # Pimcore 11.* - php-version: "8.2" dependencies: "highest" @@ -59,7 +67,7 @@ jobs: - name: Add Pimcore Admin UI run: composer require --dev pimcore/admin-ui-classic-bundle --no-interaction - if: matrix.dependencies == 'highest' && matrix.php-version == '8.2' + if: matrix.dependencies == 'highest' || matrix.php-version == '8.2' - name: Execute tests run: composer tests From f565c882332a1c2a861756ffbaa6f5d26a57016e Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 10:53:45 +0100 Subject: [PATCH 6/9] try to remove highest dependencies --- .github/workflows/tests.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fc14f4f..b9a444b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,18 +37,15 @@ jobs: dependencies: "lowest" # Pimcore 10.6.* - php-version: "8.1" - dependencies: "highest" composer-options: "--with pimcore/pimcore=^10.6" # Pimcore 11.* - php-version: "8.1" - dependencies: "highest" # Pimcore 11.0 - php-version: "8.2" dependencies: "lowest" composer-options: "--with pimcore/pimcore=^11.0" # Pimcore 11.* - php-version: "8.2" - dependencies: "highest" steps: - name: Git Checkout From e3d8fef73b5dfe7abc9b5e1e2e6b65ec99e45653 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 10:57:31 +0100 Subject: [PATCH 7/9] re-add highest --- .github/workflows/tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b9a444b..fc14f4f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,15 +37,18 @@ jobs: dependencies: "lowest" # Pimcore 10.6.* - php-version: "8.1" + dependencies: "highest" composer-options: "--with pimcore/pimcore=^10.6" # Pimcore 11.* - php-version: "8.1" + dependencies: "highest" # Pimcore 11.0 - php-version: "8.2" dependencies: "lowest" composer-options: "--with pimcore/pimcore=^11.0" # Pimcore 11.* - php-version: "8.2" + dependencies: "highest" steps: - name: Git Checkout From bbfdf4ac25d65b4aa77ebdd0bdb95831e7e82248 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 11:06:22 +0100 Subject: [PATCH 8/9] test 1 --- .github/workflows/tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fc14f4f..2b266d5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,7 +37,6 @@ jobs: dependencies: "lowest" # Pimcore 10.6.* - php-version: "8.1" - dependencies: "highest" composer-options: "--with pimcore/pimcore=^10.6" # Pimcore 11.* - php-version: "8.1" From a5dd1b049f5bc22b4ebea5f756295eda5e783368 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Wed, 8 Nov 2023 13:33:10 +0100 Subject: [PATCH 9/9] ci: use pipeline setup from other bundle, because it's easier --- .github/workflows/tests.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2b266d5..6952836 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,22 +32,12 @@ jobs: fail-fast: false matrix: include: - # Pimcore 10.5.1 - php-version: "8.1" - dependencies: "lowest" - # Pimcore 10.6.* + dependencies: "lowest" # Pimcore 10.5.0 - php-version: "8.1" - composer-options: "--with pimcore/pimcore=^10.6" - # Pimcore 11.* - - php-version: "8.1" - dependencies: "highest" - # Pimcore 11.0 - - php-version: "8.2" - dependencies: "lowest" - composer-options: "--with pimcore/pimcore=^11.0" - # Pimcore 11.* + dependencies: "highest" # Pimcore 11.* - php-version: "8.2" - dependencies: "highest" + dependencies: "highest" # Pimcore 11.* steps: - name: Git Checkout @@ -66,7 +56,7 @@ jobs: - name: Add Pimcore Admin UI run: composer require --dev pimcore/admin-ui-classic-bundle --no-interaction - if: matrix.dependencies == 'highest' || matrix.php-version == '8.2' + if: matrix.dependencies == 'highest' - name: Execute tests run: composer tests