From bfc53f6dd6c7de79e881b306fa1081e58e5c3c54 Mon Sep 17 00:00:00 2001 From: Guilherme Saade Date: Thu, 16 Feb 2023 07:43:17 -0300 Subject: [PATCH] L10 compatibility (#12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump dependencies for Laravel 10 * Update GitHub Actions for Laravel 10 * drop < L9 support * use `dispatch_sync` instead of `dispatch_now` * migrate phpunit configuration * update matrix format --------- Co-authored-by: Samuel Ć tancl --- .github/workflows/ci.yml | 8 ++++-- composer.json | 5 ++-- phpunit.xml | 60 +++++++++++++++++----------------------- src/JobPipeline.php | 2 +- 4 files changed, 36 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b69cb53..222a8b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - laravel: [6, 8, 9] + include: + - laravel: 9 + php: 8.0 + - laravel: 10 + php: 8.1 steps: - name: Checkout code @@ -17,7 +21,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: ${{matrix.php}} - name: Start Redis uses: supercharge/redis-github-action@1.1.0 diff --git a/composer.json b/composer.json index 5b3d8c2..3a18139 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,11 @@ } }, "require": { - "illuminate/support": "^6.0|^8.0|^9.0" + "php": "^8.0", + "illuminate/support": "^9.0|^10.0" }, "require-dev": { - "orchestra/testbench": "^4.0|^6.0|^7.0", + "orchestra/testbench": "^7.0|^8.0", "spatie/valuestore": "^1.2", "ext-redis": "*" }, diff --git a/phpunit.xml b/phpunit.xml index c888838..40b645f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,35 +1,27 @@ - - - - ./tests - - - - - ./src - - ./src/routes.php - - - - - - - - - - - - - - - \ No newline at end of file + + + + ./src + + + ./src/routes.php + + + + + ./tests + + + + + + + + + + + + + + diff --git a/src/JobPipeline.php b/src/JobPipeline.php index 2497748..a3f7bc3 100644 --- a/src/JobPipeline.php +++ b/src/JobPipeline.php @@ -93,7 +93,7 @@ class JobPipeline implements ShouldQueue if ($this->shouldBeQueued) { dispatch($executable); } else { - dispatch_now($executable); + dispatch_sync($executable); } }; }