From 63e3ee55d95ba61627f7f7e945835916d29cca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Mleczko?= Date: Thu, 30 Nov 2023 01:08:48 +0100 Subject: [PATCH 1/5] Update symfony dependencies to 6&7 --- .github/workflows/unit-tests.yml | 12 ++++++++++-- composer.json | 10 +++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 119b836d..3b297c67 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -5,7 +5,7 @@ on: push: ~ schedule: # Do not make it the first of the month and/or midnight since it is a very busy time - - cron: "* 10 5 * *" + - cron: "10 10 5 * *" jobs: tests: @@ -18,13 +18,21 @@ jobs: # Lowest Deps - php: 8.1 symfony: 5.4.* - composer-flags: '--prefer-stable' + composer-flags: '--prefer-lowest --prefer-stable' can-fail: false # Stable deps - php: 8.2 symfony: 6.3.* composer-flags: '--prefer-stable' can-fail: false + - php: 8.2 + symfony: 6.4.* + composer-flags: '--prefer-stable' + can-fail: false + - php: 8.2 + symfony: 7.0.* + composer-flags: '--prefer-stable' + can-fail: false name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}" diff --git a/composer.json b/composer.json index 1696365a..45c7fcaf 100644 --- a/composer.json +++ b/composer.json @@ -22,17 +22,17 @@ "league/oauth2-server": "^8.3", "nyholm/psr7": "^1.4", "psr/http-factory": "^1.0", - "symfony/event-dispatcher": "^5.4|^6.2", - "symfony/framework-bundle": "^5.4|^6.2", + "symfony/event-dispatcher": "^5.4|^6.2|^7.0", + "symfony/framework-bundle": "^5.4|^6.2|^7.0", "symfony/polyfill-php81": "^1.22", "symfony/psr-http-message-bridge": "^2.0|^6|^7", - "symfony/security-bundle": "^5.4|^6.2" + "symfony/security-bundle": "^5.4|^6.2|^7.0" }, "require-dev": { "ext-pdo": "*", "ext-pdo_sqlite": "*", - "symfony/browser-kit": "^5.4|^6.2", - "symfony/phpunit-bridge": "^5.4|^6.2" + "symfony/browser-kit": "^5.4|^6.2|^7.0", + "symfony/phpunit-bridge": "^5.4|^6.2|^7.0" }, "autoload": { "psr-4": { "League\\Bundle\\OAuth2ServerBundle\\": "src/" } From 6106aeefd5fc2c369562f580ea6425ab1ffb14ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Mleczko?= Date: Thu, 30 Nov 2023 14:24:51 +0100 Subject: [PATCH 2/5] Update test matrix schedule --- .github/workflows/unit-tests.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3b297c67..919e11e2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,25 +14,11 @@ jobs: strategy: fail-fast: false matrix: - include: - # Lowest Deps - - php: 8.1 - symfony: 5.4.* - composer-flags: '--prefer-lowest --prefer-stable' - can-fail: false - # Stable deps - - php: 8.2 - symfony: 6.3.* - composer-flags: '--prefer-stable' - can-fail: false - - php: 8.2 - symfony: 6.4.* - composer-flags: '--prefer-stable' - can-fail: false - - php: 8.2 - symfony: 7.0.* - composer-flags: '--prefer-stable' - can-fail: false + #Stable supported versions + php: ['8.1', '8.2', '8.3'] + symfony: ['5.4.*', '6.4.*', '7.0.*'] + composer-flags: ['--prefer-stable'] + can-fail: [false] name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}" From 7f16fa23ced760f97a7ebd91912196ec947a36dc Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Fri, 29 Dec 2023 22:34:01 +0100 Subject: [PATCH 3/5] Bump Xdebug to 3.3.1 --- .github/workflows/unit-tests.yml | 2 +- dev/docker/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 919e11e2..073b7906 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -30,7 +30,7 @@ jobs: uses: "actions/checkout@v4" - name: "build the PHP8 environment" - run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.2.0' php" + run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.3.1' php" if: startsWith(matrix.php, '8') - name: "install dependencies" diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile index 88b3fe23..e9d99495 100644 --- a/dev/docker/Dockerfile +++ b/dev/docker/Dockerfile @@ -7,7 +7,7 @@ LABEL maintainer="Petar Obradović " RUN mkdir -p /app/bin ENV PATH /app/bin:$PATH -ARG XDEBUG_VERSION=3.1.6 +ARG XDEBUG_VERSION=3.3.1 # Install needed core and PECL extensions RUN apk add --update --no-cache --virtual .build-deps \ From 97c408f9272b5a90d3b911169814f98d4080d114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Mleczko?= Date: Sat, 30 Dec 2023 00:20:07 +0100 Subject: [PATCH 4/5] Fix deprecated classname alias --- src/EventListener/AuthorizationRequestUserResolvingListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventListener/AuthorizationRequestUserResolvingListener.php b/src/EventListener/AuthorizationRequestUserResolvingListener.php index f17ab90d..e735d8ce 100644 --- a/src/EventListener/AuthorizationRequestUserResolvingListener.php +++ b/src/EventListener/AuthorizationRequestUserResolvingListener.php @@ -4,7 +4,7 @@ namespace League\Bundle\OAuth2ServerBundle\EventListener; -use Symfony\Bundle\Security\Core\Security; +use Symfony\Bundle\SecurityBundle\Security; use Symfony\Component\Security\Core\Security as LegacySecurity; if (class_exists(Security::class)) { From 35fbaf3805e4e2bbba07f824358168b0f1bd9414 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 30 Dec 2023 01:01:01 +0100 Subject: [PATCH 5/5] Don't test Symfony 7.x on PHP <8.2 --- .github/workflows/unit-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 073b7906..f2116e6f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,11 +14,13 @@ jobs: strategy: fail-fast: false matrix: - #Stable supported versions php: ['8.1', '8.2', '8.3'] symfony: ['5.4.*', '6.4.*', '7.0.*'] composer-flags: ['--prefer-stable'] can-fail: [false] + exclude: + - php: "8.1" + symfony: "7.0.*" name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}" @@ -29,9 +31,8 @@ jobs: - name: "checkout" uses: "actions/checkout@v4" - - name: "build the PHP8 environment" + - name: "build the PHP environment" run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.3.1' php" - if: startsWith(matrix.php, '8') - name: "install dependencies" run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"