From 09340cd35fe0a20f0a1a105a8f8b94bd7d86c797 Mon Sep 17 00:00:00 2001 From: Dobando <1692898084@qq.com> Date: Sat, 25 May 2024 16:43:35 +0800 Subject: [PATCH 1/2] perf: updated version of phpunit and fixed workflow issues --- .gitignore | 3 ++- README.md | 2 +- composer.json | 11 ++++++++--- tests/AdapterTest.php | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 39ae54f..a547c02 100755 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ composer.lock *.iml # coverage report -/build \ No newline at end of file +/build +.phpunit* \ No newline at end of file diff --git a/README.md b/README.md index 0694eaa..c527fbc 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Yii-Permission -[![Build Status](https://travis-ci.org/php-casbin/yii-permission.svg?branch=master)](https://travis-ci.org/php-casbin/yii-permission) +[![Build Status](https://github.com/php-casbin/yii-permission/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/php-casbin/yii-permission/actions/workflows/build.yml) [![Coverage Status](https://coveralls.io/repos/github/php-casbin/yii-permission/badge.svg)](https://coveralls.io/github/php-casbin/yii-permission) [![Latest Stable Version](https://poser.pugx.org/casbin/yii-permission/v/stable)](https://packagist.org/packages/casbin/yii-permission) [![Total Downloads](https://poser.pugx.org/casbin/yii-permission/downloads)](https://packagist.org/packages/casbin/yii-permission) diff --git a/composer.json b/composer.json index 779fceb..a551a85 100755 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "casbin/casbin": "~3.1" }, "require-dev": { - "phpunit/phpunit": "~7.0", + "phpunit/phpunit": "~7.0|~8.0|~9.0|~10.5", "php-coveralls/php-coveralls": "^2.1", "yiisoft/yii2-app-basic": "~2.0.14" }, @@ -42,5 +42,10 @@ "type": "composer", "url": "https://asset-packagist.org" } - ] -} \ No newline at end of file + ], + "config": { + "allow-plugins": { + "yiisoft/yii2-composer": true + } + } +} diff --git a/tests/AdapterTest.php b/tests/AdapterTest.php index 9dd8b83..cdc95c1 100755 --- a/tests/AdapterTest.php +++ b/tests/AdapterTest.php @@ -382,7 +382,7 @@ protected function refreshApplication() /** * This method is called before each test. */ - protected function setUp()/* The :void return type declaration that should be here would cause a BC issue */ + protected function setUp(): void/* The :void return type declaration that should be here would cause a BC issue */ { if (!$this->app) { $this->refreshApplication(); @@ -394,7 +394,7 @@ protected function setUp()/* The :void return type declaration that should be he /** * This method is called after each test. */ - protected function tearDown()/* The :void return type declaration that should be here would cause a BC issue */ + protected function tearDown(): void/* The :void return type declaration that should be here would cause a BC issue */ { } From dea597e4ebb234239fda47c1595e8f9dddff0e55 Mon Sep 17 00:00:00 2001 From: Dobando <1692898084@qq.com> Date: Sat, 25 May 2024 19:32:04 +0800 Subject: [PATCH 2/2] chore: updated nodejs version in workflow --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b096b44..7009fcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,9 +74,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: