Skip to content

Commit

Permalink
fix: add laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
leeqvip committed Mar 24, 2024
1 parent fd16463 commit 4729fe5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,14 @@ jobs:
- php: 8.1
laravel: 10.*
phpunit: ~9.0

# Laravel 11.x
- php: 8.2
laravel: 11.*
phpunit: ~10.5
- php: 8.3
laravel: 11.*
phpunit: ~10.5

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

steps:
Expand All @@ -130,8 +137,13 @@ jobs:
composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
if: ${{ matrix.laravel != '11.*' }}
run: ./vendor/bin/phpunit -v

- name: Run test suite laravel 11
if: ${{ matrix.laravel == '11.*' }}
run: ./vendor/bin/phpunit --display-notices

- name: Run Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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|~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",
"illuminate/support": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0|~11.0",
"illuminate/database": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0|~11.0",
"illuminate/console": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0|~11.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.5",
"php-coveralls/php-coveralls": "^2.4",
"mockery/mockery": "^1.0",
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0"
"laravel/laravel": "~5.5|~6.0|~7.0|~8.0|~9.0|~10.0|~11.0"
},
"autoload": {
"psr-4": {
Expand Down
18 changes: 18 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,28 @@
<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>

<coverage includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/html" lowUpperBound="50" highLowerBound="90"/>
</report>
</coverage>

<source>
<include>
<directory>./src</directory>
</include>
</source>

<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected function initConfig()
$this->app['config']->set('database.default', 'mysql');
$this->app['config']->set('database.connections.mysql.charset', 'utf8');
$this->app['config']->set('database.connections.mysql.collation', 'utf8_unicode_ci');
$this->app['config']->set('cache.default', 'array');
// $app['config']->set('lauthz.log.enabled', true);
}

Expand Down

0 comments on commit 4729fe5

Please sign in to comment.