Skip to content

Commit

Permalink
Merge pull request #9 from Dobmod/feature-upgrade-to-php8
Browse files Browse the repository at this point in the history
BREAKING CHANGE: upgrade to PHP 8.0 and PHP-Casbin 4.0
  • Loading branch information
leeqvip authored Oct 29, 2024
2 parents 77f644d + ab59cbd commit 8aacd17
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 61 deletions.
37 changes: 9 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,17 @@ jobs:
# medoo: [ ]
# stability: [ prefer-lowest, prefer-stable ]
include:
# medoo 1.7
- php: 7.1
medoo: 1.7.*
phpunit: ~7.0
- php: 7.2
medoo: 1.7.*
phpunit: ~7.0
- php: 7.3
medoo: 1.7.*
phpunit: ~7.0

# medoo 2.0
- php: 7.3
medoo: 2.0.*
phpunit: ~7.0
- php: 7.4
medoo: 2.0.*
phpunit: ~7.0
# medoo 2.1
- php: 8.0
medoo: 2.0.*
medoo: 2.1.*
phpunit: ~9.0

# medoo 2.1
- php: 7.3
- php: 8.1
medoo: 2.1.*
phpunit: ~8.0
- php: 7.4
phpunit: ~9.0
- php: 8.2
medoo: 2.1.*
phpunit: ~8.0
- php: 8.0
phpunit: ~9.0
- php: 8.3
medoo: 2.1.*
phpunit: ~9.0

Expand Down Expand Up @@ -106,9 +87,9 @@ jobs:
needs: [ test, upload-coverage ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '14.17'
node-version: 'lts/*'

- name: Run semantic-release
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ composer.lock
.idea/
*.iml

.phpunit*
# coverage report
/build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Medoo Adapter for Casbin

[![Build Status](https://travis-ci.org/php-casbin/medoo-adapter.svg?branch=master)](https://travis-ci.org/php-casbin/medoo-adapter)
[![Build Status](https://github.com/php-casbin/medoo-adapter/actions/workflows/build.yml/badge.svg)](https://github.com/php-casbin/medoo-adapter/actions/workflows/build.yml)
[![Coverage Status](https://coveralls.io/repos/github/php-casbin/medoo-adapter/badge.svg)](https://coveralls.io/github/php-casbin/medoo-adapter)
[![Latest Stable Version](https://poser.pugx.org/casbin/medoo-adapter/v/stable)](https://packagist.org/packages/casbin/medoo-adapter)
[![Total Downloads](https://poser.pugx.org/casbin/medoo-adapter/downloads)](https://packagist.org/packages/casbin/medoo-adapter)
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
],
"license": "Apache-2.0",
"require": {
"php": ">=7.1.0",
"casbin/casbin": "~3.1",
"catfan/medoo": "~1.7|~2.0"
"php": ">=8.0",
"casbin/casbin": "~4.0",
"catfan/medoo": "~2.1"
},
"require-dev": {
"phpunit/phpunit": "~7.0|~8.0|~9.0",
"php-coveralls/php-coveralls": "^2.4"
"phpunit/phpunit": "~9.0",
"php-coveralls/php-coveralls": "^2.7"
},
"autoload": {
"psr-4": {
Expand Down
54 changes: 27 additions & 27 deletions phpunit.xml.dist → phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?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="DB_DATABASE" value="casbin"/>
</php>
<?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="DB_DATABASE" value="casbin"/>
</php>
</phpunit>

0 comments on commit 8aacd17

Please sign in to comment.