Skip to content

Commit 7f39bbd

Browse files
authored
Merge pull request #6 from php-casbin/develop
feat: upgrade php-casbin 4.0
2 parents 957470b + a9d6930 commit 7f39bbd

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

.github/workflows/build.yml renamed to .github/workflows/phpunit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: PHPUnit
22

33
on:
44
push:
@@ -37,14 +37,14 @@ 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 }}
4444

4545
steps:
4646
- name: Checkout code
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848

4949
- name: Setup PHP
5050
uses: shivammathur/setup-php@v2
@@ -87,10 +87,10 @@ jobs:
8787
runs-on: ubuntu-latest
8888
needs: [ test, upload-coverage ]
8989
steps:
90-
- uses: actions/checkout@v2
91-
- uses: actions/setup-node@v1
90+
- uses: actions/checkout@v4
91+
- uses: actions/setup-node@v4
9292
with:
93-
node-version: '12'
93+
node-version: 'lts/*'
9494

9595
- name: Run semantic-release
9696
env:

.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.*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Laminas-db Adapter for PHP-Casbin
22

3-
[![Build Status](https://travis-ci.org/php-casbin/laminas-db-adapter.svg?branch=master)](https://travis-ci.org/php-casbin/laminas-db-adapter)
3+
[![PHPUnit](https://github.com/php-casbin/laminas-db-adapter/actions/workflows/phpunit.yml/badge.svg)](https://github.com/php-casbin/laminas-db-adapter/actions/workflows/phpunit.yml)
44
[![Coverage Status](https://coveralls.io/repos/github/php-casbin/laminas-db-adapter/badge.svg)](https://coveralls.io/github/php-casbin/laminas-db-adapter)
55
[![Latest Stable Version](https://poser.pugx.org/casbin/laminas-db-adapter/v/stable)](https://packagist.org/packages/casbin/laminas-db-adapter)
66
[![Total Downloads](https://poser.pugx.org/casbin/laminas-db-adapter/downloads)](https://packagist.org/packages/casbin/laminas-db-adapter)

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)