From 3419bb0926791b47504fa9446529e17ed83c4040 Mon Sep 17 00:00:00 2001 From: Vincent Boon Date: Fri, 29 Mar 2024 11:27:08 +0100 Subject: [PATCH 1/2] Support Laravel 11 --- .github/workflows/analyse.yml | 8 +++++--- .github/workflows/coverage.yml | 8 +++++--- .github/workflows/style.yml | 4 ++-- .github/workflows/tests.yml | 15 ++++++++++----- composer.json | 6 +++--- phpstan.neon | 2 +- src/Actions/Akeneo/FormatAttributeValues.php | 2 +- 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index c2d144c..f8a0fe8 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -9,18 +9,20 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.2] - laravel: [10.*] + php: [8.3] + laravel: [10.*, 11.*] stability: [prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 943bc77..c85cbf7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,18 +9,20 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.2] - laravel: [10.*] + php: [8.3] + laravel: [10.*, 11.*] stability: [prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index efaf7fc..e9a5c3d 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -11,12 +11,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo coverage: none diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 138e94c..bf6eb0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,19 +8,24 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04, ubuntu-22.04] - php: [8.1, 8.2] - laravel: [10.*] - stability: [prefer-stable] + os: [ubuntu-latest] + php: [8.1, 8.2, 8.3] + laravel: [10.*, 11.*] + stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 81099f0..e5a0267 100644 --- a/composer.json +++ b/composer.json @@ -20,13 +20,13 @@ "php": "^8.1", "justbetter/laravel-akeneo-client": "^1.1", "justbetter/laravel-error-logger": "^2.3", - "laravel/framework": "^10.0", + "laravel/framework": "^10.0|^11.0", "spatie/laravel-activitylog": "^4.7" }, "require-dev": { + "larastan/larastan": "^2.9", "laravel/pint": "^1.10", - "nunomaduro/larastan": "^2.6", - "orchestra/testbench": "^8.11", + "orchestra/testbench": "^8.0|^9.0", "phpstan/phpstan-mockery": "^1.1", "phpunit/phpunit": "^10.1" }, diff --git a/phpstan.neon b/phpstan.neon index 4438590..75d23d6 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ includes: - - ./vendor/nunomaduro/larastan/extension.neon + - ./vendor/larastan/larastan/extension.neon - ./vendor/phpstan/phpstan-mockery/extension.neon parameters: diff --git a/src/Actions/Akeneo/FormatAttributeValues.php b/src/Actions/Akeneo/FormatAttributeValues.php index 76b377d..f67aafb 100644 --- a/src/Actions/Akeneo/FormatAttributeValues.php +++ b/src/Actions/Akeneo/FormatAttributeValues.php @@ -57,7 +57,7 @@ public function format(string $attributeCode, mixed $value): array return $values; } - public function value(mixed $data, string $scope = null, string $locale = null): array + public function value(mixed $data, ?string $scope = null, ?string $locale = null): array { return [ 'data' => $data, From 74d921c34de2fcfa6e118bec6bccbbeb2f1ca88d Mon Sep 17 00:00:00 2001 From: Vincent Boon Date: Fri, 29 Mar 2024 11:28:43 +0100 Subject: [PATCH 2/2] Adjust test action --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bf6eb0c..d5c031c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: os: [ubuntu-latest] php: [8.1, 8.2, 8.3] laravel: [10.*, 11.*] - stability: [prefer-lowest, prefer-stable] + stability: [prefer-stable] include: - laravel: 10.* testbench: 8.*