From 03ee8320752b3d2af4ce405cecd3f48864c95c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alfaiate?= Date: Tue, 9 Jan 2024 15:15:05 +0700 Subject: [PATCH 1/2] Symfony 7 compatibility --- .github/workflows/build.yml | 21 +++++++++++++++++---- composer.json | 10 +++++----- src/Validator/Constraints/IsTrue.php | 4 ++-- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f954f79..8ade384 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,13 +14,13 @@ jobs: strategy: fail-fast: true matrix: - php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] - symfony: [2.8, 3.4, 4.4, 5.2, 6.0] + php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + symfony: [2.8, 3.4, 4.4, 5.2, 6.0, 7.0] exclude: + # Symfony 5 requires PHP >= 7.2 - php: 7.1 symfony: 5.2 - - php: 8.0 - symfony: 3.4 + # Symfony 6 requires PHP >= 8.0 - php: 7.1 symfony: 6.0 - php: 7.2 @@ -29,6 +29,19 @@ jobs: symfony: 6.0 - php: 7.4 symfony: 6.0 + # Symfony 7 requires PHP >= 8.2 + - php: 7.1 + symfony: 7.0 + - php: 7.2 + symfony: 7.0 + - php: 7.3 + symfony: 7.0 + - php: 7.4 + symfony: 7.0 + - php: 8.0 + symfony: 7.0 + - php: 8.1 + symfony: 7.0 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index a45a77e..e946dc4 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ "require": { "php": "^7.1 || ^8.0", "google/recaptcha": "^1.1", - "symfony/form": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/security-bundle": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/validator": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/yaml": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0", + "symfony/form": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/security-bundle": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/validator": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", "twig/twig": "^1.40 || ^2.9 || ^3.0" }, "require-dev": { diff --git a/src/Validator/Constraints/IsTrue.php b/src/Validator/Constraints/IsTrue.php index 1e0d0f4..38e4909 100644 --- a/src/Validator/Constraints/IsTrue.php +++ b/src/Validator/Constraints/IsTrue.php @@ -24,9 +24,9 @@ public function __construct(array $options = null, string $message = null, strin } /** - * @return string|string[] + * {@inheritdoc} */ - public function getTargets() + public function getTargets(): string { return Constraint::PROPERTY_CONSTRAINT; } From 01ce73cb266099bc90caafdbbb138a33a5d5700d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alfaiate?= Date: Tue, 9 Jan 2024 15:40:15 +0700 Subject: [PATCH 2/2] Upgrade actions --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ade384..1985a58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: symfony: 7.0 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -57,7 +57,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache composer dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}