From 815c5404e86ddb3b9a16b0f156b687f11111b000 Mon Sep 17 00:00:00 2001 From: Stewie Marsh Date: Mon, 19 Feb 2024 21:06:56 +0000 Subject: [PATCH] Laravel 11 Support (#204) * feat: Add Laravel 11 Support * chore: migrate phpunit configuration --- .github/workflows/run-tests.yml | 10 ++++++-- .gitignore | 1 + composer.json | 41 ++++++++++++++++++--------------- phpunit.xml.dist | 22 ++++++++---------- 4 files changed, 40 insertions(+), 34 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dc31deb..05992bb 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,10 +13,16 @@ jobs: fail-fast: false matrix: php: [8.3, 8.2, 8.1] - laravel: [10.*, 9.*,] + laravel: [11.*, 10.*, 9.*,] dependency-version: [prefer-lowest, prefer-stable] os: [ubuntu-latest] + exclude: + - laravel: 11.* + php: 8.1 include: + - laravel: 11.* + testbench: ^9.0 + carbon: ^3.0 - laravel: 10.* testbench: ^8.0 carbon: ^2.63 @@ -28,7 +34,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.gitignore b/.gitignore index ded1109..baa164e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ vendor node_modules .php_cs.cache .php-cs-fixer.cache +.phpunit.cache diff --git a/composer.json b/composer.json index a05ca7c..962e5de 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,11 @@ { "name": "spatie/laravel-webhook-client", "description": "Receive webhooks in Laravel apps", + "license": "MIT", "keywords": [ "spatie", "laravel-webhook-client" ], - "homepage": "https://github.com/spatie/laravel-webhook-client", - "license": "MIT", "authors": [ { "name": "Freek Van der Herten", @@ -15,22 +14,25 @@ "role": "Developer" } ], + "homepage": "https://github.com/spatie/laravel-webhook-client", "require": { - "php": "^8.1", - "illuminate/bus": "^9.0|^10.0", - "illuminate/database": "^9.0|^10.0", - "illuminate/support": "^9.0|^10.0", + "php": "^8.1 || ^8.2", + "illuminate/bus": "^9.0 || ^10.0 || ^11.0", + "illuminate/database": "^9.0 || ^10.0 || ^11.0", + "illuminate/support": "^9.0 || ^10.0 || ^11.0", "spatie/laravel-package-tools": "^1.11" }, "require-dev": { - "larastan/larastan": "^1.0.4|^2.2", - "orchestra/testbench": "^7.0|^8.0", + "larastan/larastan": "^1.0.4 || ^2.2", + "orchestra/testbench": "^7.0 || ^8.0 || ^9.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^9.3 || ^10.5", "spatie/laravel-ray": "^1.24" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Spatie\\WebhookClient\\": "src" @@ -41,25 +43,26 @@ "Spatie\\WebhookClient\\Tests\\": "tests" } }, - "scripts": { - "psalm": "vendor/bin/psalm", - "test": "vendor/bin/phpunit", - "test-coverage": "vendor/bin/phpunit --coverage-html coverage", - "analyse": "vendor/bin/phpstan analyse" - }, "config": { - "sort-packages": true, "allow-plugins": { "phpstan/extension-installer": true - } + }, + "sort-packages": true }, "extra": { + "branch-alias": { + "dev-master": "11.x-dev" + }, "laravel": { "providers": [ "Spatie\\WebhookClient\\WebhookClientServiceProvider" ] } }, - "minimum-stability": "dev", - "prefer-stable": true + "scripts": { + "analyse": "vendor/bin/phpstan analyse", + "psalm": "vendor/bin/psalm", + "test": "vendor/bin/phpunit", + "test-coverage": "vendor/bin/phpunit --coverage-html coverage" + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index feea720..246cb59 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,31 +1,27 @@ - - - src/ - - tests + + + src/ + +