From 3302d2813561f02f6e74b019ac7c1f224250a7fb Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Mon, 15 Jul 2024 15:12:09 +0200 Subject: [PATCH] Add support for Symfony 7 --- .github/workflows/test-application.yaml | 31 ++++++++++++++++++------- composer.json | 21 ++++++++++------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index e8883f2..1bcf511 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: - DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_theme_test?serverVersion=5.7 + DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_theme_test?serverVersion=8.0 DATABASE_CHARSET: utf8mb4 DATABASE_COLLATE: utf8mb4_unicode_ci @@ -41,9 +41,19 @@ jobs: env: SYMFONY_DEPRECATIONS_HELPER: weak + - php-version: '8.2' + dependency-versions: 'highest' + env: + SYMFONY_DEPRECATIONS_HELPER: weak + + - php-version: '8.3' + dependency-versions: 'highest' + env: + SYMFONY_DEPRECATIONS_HELPER: weak + services: mysql: - image: mysql:5.7 + image: mysql:8.0 env: MYSQL_ROOT_PASSWORD: root ports: @@ -52,17 +62,21 @@ jobs: steps: - name: Checkout project - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install and configure PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - extensions: 'imagick' tools: 'composer:v2' + - name: Remove Lint Tools + # These tools are not required to run tests, so we are removing them to improve dependency resolving and + # testing lowest versions. + run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update + - name: Install composer dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 with: dependency-versions: ${{matrix.dependency-versions}} @@ -80,17 +94,16 @@ jobs: steps: - name: Checkout project - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install and configure PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 - extensions: 'imagick' + php-version: 8.3 tools: 'composer:v2' - name: Install composer dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 with: dependency-versions: ${{matrix.dependency-versions}} diff --git a/composer.json b/composer.json index 0cd5acf..07965be 100644 --- a/composer.json +++ b/composer.json @@ -16,24 +16,24 @@ "require": { "php": "^7.3 || ^8.0", "sulu/sulu": "^2.4 || ^2.5@dev", - "symfony/config": "^4.4 || ^5.4 || ^6.0", - "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0", - "symfony/http-kernel": "^5.4 || ^6.0", - "sylius/theme-bundle": "^2.1" + "symfony/config": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0", + "sylius/theme-bundle": "^2.1 || ^2.4@dev" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.1", - "jackalope/jackalope-doctrine-dbal": "^1.3.4", + "jackalope/jackalope-doctrine-dbal": "^1.3.4 || ^2.0", "jangregor/phpstan-prophecy": "^1.0", + "php-cs-fixer/shim": "^3.1", "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^1.4", "phpstan/phpstan-doctrine": "^1.2", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.1", "phpunit/phpunit": "^8.5.9", - "symfony/dotenv": "^5.4 || ^6.0", + "symfony/dotenv": "^5.4 || ^6.0 || ^7.0", "symfony/monolog-bundle": "^3.1", - "symfony/phpunit-bridge": "^5.2", + "symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0", "thecodingmachine/phpstan-strict-rules": "^1.0" }, "conflict": { @@ -87,6 +87,9 @@ ] }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "php-http/discovery": true + } } }