Skip to content

Commit

Permalink
Laravel 11 Support (#204)
Browse files Browse the repository at this point in the history
* feat: Add Laravel 11 Support

* chore: migrate phpunit configuration
  • Loading branch information
sweptsquash authored Feb 19, 2024
1 parent 9ada0d6 commit 815c540
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 34 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ vendor
node_modules
.php_cs.cache
.php-cs-fixer.cache
.phpunit.cache
41 changes: 22 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand All @@ -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"
}
}
22 changes: 9 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
colors="true" processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>

0 comments on commit 815c540

Please sign in to comment.