Skip to content

Commit 8e27d55

Browse files
committed
build: add support for laravel 10
1 parent 6c8e0a1 commit 8e27d55

File tree

3 files changed

+29
-37
lines changed

3 files changed

+29
-37
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
php: [ '8.1' ]
15-
laravel: [ '9' ]
15+
laravel: [ '10' ]
1616

1717
steps:
1818
- name: Checkout Code
@@ -28,21 +28,20 @@ jobs:
2828
- name: Setup Problem Matchers
2929
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3030

31-
- name: Select Laravel 9
31+
- name: Select Laravel ${{ matrix.laravel }}
3232
uses: nick-invision/retry@v1
3333
with:
3434
timeout_minutes: 5
3535
max_attempts: 5
36-
command: composer require "laravel/framework:9.*" --no-update --no-interaction
37-
if: "matrix.laravel == '9'"
36+
command: composer require "laravel/framework:10.*" --no-update --no-interaction
37+
if: "matrix.laravel == '10'"
3838

3939
- name: Install PHP 8.1 Dependencies
4040
uses: nick-invision/retry@v1
4141
with:
4242
timeout_minutes: 5
4343
max_attempts: 5
4444
command: composer update --no-interaction --no-progress --ignore-platform-req=php
45-
if: "matrix.php >= 8.1"
4645

4746
- name: Execute PHPUnit
4847
run: vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@
1919
],
2020
"require": {
2121
"php": "^8.1",
22-
"illuminate/contracts": "^9.0",
23-
"illuminate/database": "^9.0",
24-
"illuminate/support": "^9.0",
25-
"illuminate/console": "^9.0",
26-
"illuminate/cache": "^9.0",
27-
"illuminate/events": "^9.0",
28-
"psr/log": "^1.0"
22+
"laravel/framework": "^v10.48.18",
23+
"psr/log": "^3.0"
2924
},
3025
"require-dev": {
31-
"phpunit/phpunit": "^9.0",
32-
"orchestra/testbench": "^7.0",
26+
"phpunit/phpunit": "^10.0",
27+
"orchestra/testbench": "^8.0",
3328
"mockery/mockery": "^1.0",
3429
"laravel/legacy-factories": "^1.1"
3530
},

phpunit.xml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
bootstrap="vendor/autoload.php"
4-
backupGlobals="false"
5-
backupStaticAttributes="false"
6-
colors="true"
7-
verbose="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
12-
stopOnFailure="false">
13-
<filter>
14-
<whitelist>
15-
<directory>./src</directory>
16-
<exclude>
17-
<directory>./vendor</directory>
18-
<directory>./tests</directory>
19-
</exclude>
20-
</whitelist>
21-
</filter>
22-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
stopOnError="true"
7+
stopOnFailure="true"
8+
stopOnRisky="true"
9+
>
2310
<testsuites>
2411
<testsuite name="Suit test">
2512
<directory>./tests/</directory>
13+
<exclude>./tests/Models/OwnerTest.php</exclude>
14+
<exclude>./tests/Models/PermissionOwnerTest.php</exclude>
15+
<exclude>./tests/Models/RoleOwnerTest.php</exclude>
2616
</testsuite>
2717
</testsuites>
28-
2918
<php>
3019
<env name="DB_CONNECTION" value="sqlite"/>
3120
</php>
32-
</phpunit>
21+
<source>
22+
<include>
23+
<directory>./src</directory>
24+
</include>
25+
<exclude>
26+
<directory>./vendor</directory>
27+
<directory>./tests</directory>
28+
</exclude>
29+
</source>
30+
</phpunit>

0 commit comments

Comments
 (0)