Skip to content

Commit 00b950f

Browse files
Laravel 11.x Compatibility (#13)
* Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 * wip --------- Co-authored-by: Ryan Chandler <ryangjchandler@gmail.com>
1 parent aba4ca8 commit 00b950f

File tree

5 files changed

+44
-50
lines changed

5 files changed

+44
-50
lines changed

.github/workflows/run-tests.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,37 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [main]
8+
branches:
9+
- main
810

911
jobs:
1012
test:
1113
runs-on: ${{ matrix.os }}
14+
1215
strategy:
1316
fail-fast: true
1417
matrix:
1518
os: [ubuntu-latest, windows-latest]
1619
php: ['8.0', 8.1, 8.2]
17-
laravel: [9.*, 10.*]
20+
laravel: ['9.*', '10.*', '11.*']
1821
stability: [prefer-lowest, prefer-stable]
1922
include:
2023
- laravel: 9.*
2124
testbench: ^7.22
2225
- laravel: 10.*
2326
testbench: ^8.0
27+
- laravel: 11.*
28+
testbench: ^9.0
2429
exclude:
2530
- laravel: 10.*
2631
php: '8.0'
32+
- laravel: 11.*
33+
php: '8.0'
34+
- laravel: 11.*
35+
php: 8.1
2736

2837
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2938

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.idea
22
.php_cs
33
.php_cs.cache
4-
.phpunit.result.cache
4+
*.cache
55
build
66
composer.lock
77
coverage

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.0",
20-
"spatie/laravel-package-tools": "^1.4.3",
21-
"illuminate/contracts": "^9.0|^10.0"
19+
"php": "^8.2",
20+
"spatie/laravel-package-tools": "^1.16",
21+
"illuminate/contracts": "^11.0"
2222
},
2323
"require-dev": {
24-
"brianium/paratest": "^6.2",
25-
"nunomaduro/collision": "^6.0|^7.0",
26-
"orchestra/testbench": "^7.0|^8.0",
27-
"phpunit/phpunit": "^9.3|^10.0",
24+
"brianium/paratest": "^7.4",
25+
"nunomaduro/collision": "^8.0",
26+
"orchestra/testbench": "^9.0",
27+
"phpunit/phpunit": "^10.0",
2828
"spatie/laravel-ray": "^1.9",
29-
"vimeo/psalm": "^4.4"
29+
"vimeo/psalm": "^4.4|^5.22"
3030
},
3131
"autoload": {
3232
"psr-4": {

phpunit.xml.dist

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
executionOrder="random"
15-
failOnWarning="true"
16-
failOnRisky="true"
17-
failOnEmptyTestSuite="true"
18-
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
21-
<testsuites>
22-
<testsuite name="RyanChandler Test Suite">
23-
<directory>tests</directory>
24-
</testsuite>
25-
</testsuites>
26-
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
30-
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
34-
</report>
35-
</coverage>
36-
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
38-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<testsuites>
4+
<testsuite name="RyanChandler Test Suite">
5+
<directory>tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<coverage>
9+
<report>
10+
<html outputDirectory="build/coverage"/>
11+
<text outputFile="build/coverage.txt"/>
12+
<clover outputFile="build/logs/clover.xml"/>
13+
</report>
14+
</coverage>
15+
<logging>
16+
<junit outputFile="build/report.junit.xml"/>
17+
</logging>
18+
<source>
19+
<include>
20+
<directory suffix=".php">./src</directory>
21+
</include>
22+
</source>
3923
</phpunit>

tests/TestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ protected function getPackageProviders($app)
2727
public function getEnvironmentSetUp($app)
2828
{
2929
config()->set('database.default', 'testing');
30+
config()->set('cache.default', 'file');
3031

3132
/*
3233
include_once __DIR__.'/../database/migrations/create_blade-cache-directive_table.php.stub';
3334
(new \CreatePackageTable())->up();
3435
*/
35-
36+
3637
$app['config']->set('view.paths', [__DIR__ . '/resources/views']);
3738
}
3839
}

0 commit comments

Comments
 (0)