Skip to content

Commit 0692645

Browse files
committed
feat: upgrade php-casbin 4.0
BREAKING CHANGE: upgrade to PHP 8.1 and PHP-Casbin 4.0
1 parent 957470b commit 0692645

File tree

4 files changed

+31
-26
lines changed

4 files changed

+31
-26
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
strategy:
3838
fail-fast: true
3939
matrix:
40-
php: [ 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 ]
40+
php: [ 8.1, 8.2, 8.3 ]
4141
stability: [ prefer-lowest, prefer-stable ]
4242

4343
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ composer.lock
66
*.iml
77

88
# coverage report
9-
/build
9+
/build
10+
11+
.phpunit.*

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
"test": "vendor/bin/phpunit"
2222
},
2323
"require": {
24-
"casbin/casbin": "~3.1",
25-
"laminas/laminas-db": "^2.11"
24+
"php": ">=8.1",
25+
"casbin/casbin": "~4.0",
26+
"laminas/laminas-db": "^2.19"
2627
},
2728
"require-dev": {
28-
"phpunit/phpunit": "~5.7|~6.0|~7.0",
29-
"php-coveralls/php-coveralls": "^2.1"
29+
"phpunit/phpunit": "~10.0",
30+
"php-coveralls/php-coveralls": "^2.4"
3031
},
3132
"autoload": {
3233
"psr-4": {

phpunit.xml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
backupGlobals="false" backupStaticAttributes="false"
44
bootstrap="vendor/autoload.php"
55
colors="true"
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
99
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="DB_DATABASE" value="casbin"/>
27-
</php>
10+
stopOnFailure="false"
11+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
12+
<coverage processUncoveredFiles="true">
13+
<include>
14+
<directory suffix=".php">./src</directory>
15+
</include>
16+
<report>
17+
<clover outputFile="build/logs/clover.xml"/>
18+
<html outputDirectory="build/html"/>
19+
</report>
20+
</coverage>
21+
<testsuites>
22+
<testsuite name="Application Test Suite">
23+
<directory>./tests/</directory>
24+
</testsuite>
25+
</testsuites>
26+
<logging/>
27+
<php>
28+
<env name="DB_DATABASE" value="casbin"/>
29+
</php>
2830
</phpunit>

0 commit comments

Comments
 (0)