Skip to content

Commit a237b71

Browse files
committed
fix: Compatible with Laravel 10
1 parent 774857a commit a237b71

File tree

3 files changed

+42
-40
lines changed

3 files changed

+42
-40
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ jobs:
101101
- php: 8.0
102102
laravel: 9.*
103103
phpunit: ~9.0
104+
# Laravel 10.x
105+
- php: 8.1
106+
laravel: 10.*
107+
phpunit: ~9.0
104108

105109
name: Laravel${{ matrix.laravel }}-PHP${{ matrix.php }}
106110

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
"license": "Apache-2.0",
2222
"require": {
2323
"php": ">=7.1.0",
24-
"illuminate/support": "~5.5|~6.0|~7.0|~8.0|~9.0",
25-
"illuminate/database": "~5.5|~6.0|~7.0|~8.0|~9.0",
26-
"illuminate/console": "~5.5|~6.0|~7.0|~8.0|~9.0",
24+
"illuminate/support": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
25+
"illuminate/database": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
26+
"illuminate/console": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
2727
"casbin/casbin": "~3.1",
2828
"casbin/psr3-bridge": "^1.1"
2929
},
3030
"require-dev": {
3131
"phpunit/phpunit": "~7.0|~8.0|~9.0",
3232
"php-coveralls/php-coveralls": "^2.4",
3333
"mockery/mockery": "^1.0",
34-
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0"
34+
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0"
3535
},
3636
"autoload": {
3737
"psr-4": {

phpunit.xml

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
11-
<testsuites>
12-
<testsuite name="Application Test Suite">
13-
<directory>./tests/</directory>
14-
</testsuite>
15-
</testsuites>
16-
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">./src</directory>
19-
</whitelist>
20-
</filter>
21-
<logging>
22-
<log type="coverage-clover" target="build/logs/clover.xml"/>
23-
<log type="coverage-html" target="build/html"/>
24-
</logging>
25-
<php>
26-
<env name="APP_ENV" value="testing"/>
27-
<env name="BCRYPT_ROUNDS" value="4"/>
28-
<env name="CACHE_DRIVER" value="array"/>
29-
<env name="MAIL_DRIVER" value="array"/>
30-
<env name="QUEUE_CONNECTION" value="sync"/>
31-
<env name="SESSION_DRIVER" value="array"/>
32-
33-
<env name="DB_DATABASE" value="lauthz"/>
34-
<env name="DB_USERNAME" value="root"/>
35-
</php>
36-
</phpunit>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
backupGlobals="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false"
8+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
9+
<testsuites>
10+
<testsuite name="Application Test Suite">
11+
<directory>./tests/</directory>
12+
</testsuite>
13+
</testsuites>
14+
<filter>
15+
<whitelist processUncoveredFilesFromWhitelist="true">
16+
<directory suffix=".php">./src</directory>
17+
</whitelist>
18+
</filter>
19+
<logging>
20+
<log type="coverage-clover" target="build/logs/clover.xml"/>
21+
<log type="coverage-html" target="build/html"/>
22+
</logging>
23+
<php>
24+
<env name="APP_ENV" value="testing"/>
25+
<env name="BCRYPT_ROUNDS" value="4"/>
26+
<env name="CACHE_DRIVER" value="array"/>
27+
<env name="MAIL_DRIVER" value="array"/>
28+
<env name="QUEUE_CONNECTION" value="sync"/>
29+
<env name="SESSION_DRIVER" value="array"/>
30+
31+
<env name="DB_DATABASE" value="lauthz"/>
32+
<env name="DB_USERNAME" value="root"/>
33+
</php>
34+
</phpunit>

0 commit comments

Comments
 (0)