Skip to content

Commit

Permalink
fix: Compatible with Laravel 10
Browse files Browse the repository at this point in the history
  • Loading branch information
leeqvip committed Feb 16, 2023
1 parent 774857a commit a7a222a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 41 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
- php: 8.0
laravel: 9.*
phpunit: ~9.0
# Laravel 10.x
- php: 8.1
laravel: 10.*
phpunit: ~10.0

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

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
"license": "Apache-2.0",
"require": {
"php": ">=7.1.0",
"illuminate/support": "~5.5|~6.0|~7.0|~8.0|~9.0",
"illuminate/database": "~5.5|~6.0|~7.0|~8.0|~9.0",
"illuminate/console": "~5.5|~6.0|~7.0|~8.0|~9.0",
"illuminate/support": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/database": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/console": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0",
"casbin/casbin": "~3.1",
"casbin/psr3-bridge": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "~7.0|~8.0|~9.0",
"phpunit/phpunit": "~7.0|~8.0|~9.0|~10.0",
"php-coveralls/php-coveralls": "^2.4",
"mockery/mockery": "^1.0",
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0"
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0"
},
"autoload": {
"psr-4": {
Expand Down
72 changes: 36 additions & 36 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-html" target="build/html"/>
</logging>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>

<env name="DB_DATABASE" value="lauthz"/>
<env name="DB_USERNAME" value="root"/>
</php>
</phpunit>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/html"/>
</report>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>

<env name="DB_DATABASE" value="lauthz"/>
<env name="DB_USERNAME" value="root"/>
</php>
</phpunit>

0 comments on commit a7a222a

Please sign in to comment.