Skip to content

Commit

Permalink
Laravel 11.x Compatibility (#71)
Browse files Browse the repository at this point in the history
* Bump dependencies for Laravel 11

* Update GitHub Actions for Laravel 11

* swap to pest

---------

Co-authored-by: Michael Dyrynda <[email protected]>
  • Loading branch information
laravel-shift and michaeldyrynda authored Mar 18, 2024
1 parent a857578 commit 467aa81
Show file tree
Hide file tree
Showing 6 changed files with 341 additions and 299 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.2, 8.1]
laravel: [10.0]
php: [8.3, 8.2, 8.1]
laravel: [10.0, '11.0']
exclude:
- laravel: '11.0'
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }}

Expand All @@ -23,7 +27,7 @@ jobs:

- name: Cache dependencies
uses: actions/cache@v2
with:
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

Expand All @@ -40,4 +44,4 @@ jobs:
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/pest
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
"type": "utility",
"require": {
"php": "^8.1",
"illuminate/database": "^10.0",
"illuminate/events": "^10.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^10.0"
"illuminate/database": "^10.0 || ^11.0",
"illuminate/events": "^10.0 || ^11.0"
},
"autoload": {
"psr-4": {
Expand All @@ -33,6 +30,13 @@
"config": {
"extra": {
"sort-packages": true
},
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"require-dev": {
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-drift": "^2.5"
}
}
26 changes: 15 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" testdox="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">app/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
Loading

0 comments on commit 467aa81

Please sign in to comment.