From d705480f7e66bdef2734272feb2c1514fb54e3c5 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 7 Feb 2024 10:49:03 +0000 Subject: [PATCH 1/2] feat: add support for Laravel 11 --- .github/workflows/run-tests.yml | 7 ++++--- composer.json | 18 +++++++++--------- ecs.php | 1 - phpcs.xml | 31 ------------------------------- phpstan-baseline.neon | 26 ++++++++++++++++++++++++++ renovate.json | 9 --------- 6 files changed, 39 insertions(+), 53 deletions(-) delete mode 100644 phpcs.xml delete mode 100644 renovate.json diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 3565da8..b639521 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,18 +10,19 @@ jobs: test: runs-on: ${{ matrix.os }} env: - PREVENT_OUTPUT: true FIXER_ACCESS_KEY: ${{ secrets.FIXER_ACCESS_KEY }} strategy: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.2] - laravel: [10.*] + php: [8.2, 8.3] + laravel: [10.*, 11.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 3d0e356..953aeca 100644 --- a/composer.json +++ b/composer.json @@ -17,18 +17,18 @@ ], "require": { "php": "^8.2", - "illuminate/contracts": "^10.0", - "nunomaduro/termwind": "^1.15", - "spatie/laravel-package-tools": "^1.14" + "illuminate/contracts": "^10.0 || ^11.0", + "nunomaduro/termwind": "^1.15 || ^2.0", + "spatie/laravel-package-tools": "^1.16" }, "require-dev": { "guzzlehttp/guzzle": "^7.5", - "nunomaduro/collision": "^7.0", - "nunomaduro/larastan": "^2.4", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", - "worksome/coding-style": "^2.3" + "nunomaduro/collision": "^7.0 || ^8.1", + "larastan/larastan": "^2.6", + "orchestra/testbench": "^8.0 || ^9.0", + "pestphp/pest": "^2.33", + "pestphp/pest-plugin-laravel": "^2.2", + "worksome/coding-style": "^2.8" }, "autoload": { "psr-4": { diff --git a/ecs.php b/ecs.php index 1916269..520de6a 100644 --- a/ecs.php +++ b/ecs.php @@ -5,7 +5,6 @@ use Symplify\EasyCodingStandard\Config\ECSConfig; use Worksome\CodingStyle\WorksomeEcsConfig; - return static function (ECSConfig $ecsConfig): void { $ecsConfig->paths([ __DIR__ . '/src', diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100644 index 94886cb..0000000 --- a/phpcs.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - Worksome Coding Standard - - ./src - ./tests - - - - - - - - - .*Test.php - - - - - - - - - */*.blade.php - - - - - - - diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e69de29..555f695 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -0,0 +1,26 @@ +parameters: + ignoreErrors: + - + message: "#^Illuminate\\\\Support\\\\Facades\\\\Blade facade should not be used\\.$#" + count: 1 + path: src/Commands/ViewLatestRatesCommand.php + + - + message: "#^Parameter \\#1 \\$value of function intval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/ExchangeRateProviders/FixerProvider.php + + - + message: "#^Worksome\\\\Exchange\\\\Facades\\\\Exchange facade should not be used\\.$#" + count: 1 + path: src/Facades/Exchange.php + + - + message: "#^Parameter \\#1 \\$value of function intval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/Support/ExchangeRateManager.php + + - + message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 2 + path: src/Support/ExchangeRateManager.php diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 60cde65..0000000 --- a/renovate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": [ - "config:base" - ], - "rangeStrategy": "auto", - "semanticCommits": "enabled", - "branchConcurrentLimit": 10, - "reviewersFromCodeOwners": true -} From 9f75f3d6606c07fcbf66389ded9993a931b97142 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 7 Feb 2024 10:49:47 +0000 Subject: [PATCH 2/2] ci: update action dependencies --- .github/workflows/phpstan.yml | 2 +- .github/workflows/run-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 591ab8a..524abf6 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -11,7 +11,7 @@ jobs: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b639521..db20839 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2