Skip to content

Commit 5aa952b

Browse files
committed
BREAKING CHANGE: upgrade to PHP 8.0 and PHP-Casbin 4.0
1 parent 0408d3d commit 5aa952b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: true
2121
matrix:
22-
php: [ 7.1, 7.2, 7.3, 7.4, 8.0 ]
22+
php: [ 8.0, 8.1, 8.2, 8.3 ]
2323
stability: [ prefer-lowest, prefer-stable ]
2424

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

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
],
1919
"license": "Apache-2.0",
2020
"require": {
21-
"casbin/casbin": "^3.0",
22-
"doctrine/dbal": "^2.9|^3.0|^4.0"
21+
"php": ">=8.0",
22+
"casbin/casbin": "^4.0",
23+
"doctrine/dbal": "^3.9|^4.0"
2324
},
2425
"require-dev": {
25-
"phpunit/phpunit": "~7.0|~8.0",
26-
"php-coveralls/php-coveralls": "^2.1"
26+
"phpunit/phpunit": "~9.0",
27+
"php-coveralls/php-coveralls": "^2.7"
2728
},
2829
"autoload": {
2930
"psr-4": {

src/Adapter.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ public function initTable()
102102
$schema = new Schema();
103103
$table = $schema->createTable($this->policyTableName);
104104
$table->addColumn('id', 'integer', array('autoincrement' => true));
105-
$table->addColumn('p_type', 'string', ['notnull' => false]);
106-
$table->addColumn('v0', 'string', ['notnull' => false]);
107-
$table->addColumn('v1', 'string', ['notnull' => false]);
108-
$table->addColumn('v2', 'string', ['notnull' => false]);
109-
$table->addColumn('v3', 'string', ['notnull' => false]);
110-
$table->addColumn('v4', 'string', ['notnull' => false]);
111-
$table->addColumn('v5', 'string', ['notnull' => false]);
105+
$table->addColumn('p_type', 'string', ['notnull' => false, 'length' => 32]);
106+
$table->addColumn('v0', 'string', ['notnull' => false, 'length' => 255]);
107+
$table->addColumn('v1', 'string', ['notnull' => false, 'length' => 255]);
108+
$table->addColumn('v2', 'string', ['notnull' => false, 'length' => 255]);
109+
$table->addColumn('v3', 'string', ['notnull' => false, 'length' => 255]);
110+
$table->addColumn('v4', 'string', ['notnull' => false, 'length' => 255]);
111+
$table->addColumn('v5', 'string', ['notnull' => false, 'length' => 255]);
112112
$table->setPrimaryKey(['id']);
113113
$sm->createTable($table);
114114
}

tests/DebugStackLogger.php

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace CasbinAdapter\DBAL\Tests;
55

6-
use Doctrine\DBAL\Logging\DebugStack;
76
use Doctrine\DBAL\Logging\SQLLogger;
87

98
class DebugStackLogger implements SQLLogger

0 commit comments

Comments
 (0)