From 37d79a95c4a4f47f538642e2f631dd09bce0a08d Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:23:38 -0400 Subject: [PATCH 1/8] Switch to PSR2 coding standard --- composer.json | 4 ++-- phpcs.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index a92cdb0..c5cc00a 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "sort-packages": true }, "require-dev": { - "chadicus/coding-standard": "^1.3", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.7" }, "autoload": { "psr-4": {"Chadicus\\Slim\\OAuth2\\Http\\" : "src"} diff --git a/phpcs.xml b/phpcs.xml index 9dca1f8..1079567 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -3,5 +3,5 @@ . */vendor/* - + From 58cb6891e5f598ecb23c907c19c0a3c01029485d Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:25:01 -0400 Subject: [PATCH 2/8] Add PHP 8 to workflow builds --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5ac89e8..7725cc2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['5.3', '7.0', '7.1', '7.2', '7.3', '7.4'] + php-versions: ['5.3', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout uses: actions/checkout@v2 From ddbaf232a51021f2c367b55ed59aa299f06edc2a Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:25:45 -0400 Subject: [PATCH 3/8] Fix typo in workflow --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 7725cc2..a4d7244 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['5.3', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout uses: actions/checkout@v2 From 4c3a02f8d04ffd47d5babe73bf278440f10b4899 Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:25:55 -0400 Subject: [PATCH 4/8] Allow PHP 8 in composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c5cc00a..c5f7a4a 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "license": "MIT", "require": { - "php": "^5.6 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", "bshaffer/oauth2-server-php": "^1.8", "zendframework/zend-diactoros": ">=1.3.2" }, From a60e6f0bc8f08c15f129c6b8177bf94b5bd4a2e4 Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:30:51 -0400 Subject: [PATCH 5/8] Switch from zendframework to laminas for message package --- composer.json | 2 +- src/ResponseBridge.php | 4 ++-- tests/RequestBridgeTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index c5f7a4a..e31f295 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^5.6 || ^7.0 || ^8.0", "bshaffer/oauth2-server-php": "^1.8", - "zendframework/zend-diactoros": ">=1.3.2" + "laminas/laminas-diactoros": "^1.8 || ^2.0" }, "config" : { "sort-packages": true diff --git a/src/ResponseBridge.php b/src/ResponseBridge.php index 53aa658..18dd0aa 100644 --- a/src/ResponseBridge.php +++ b/src/ResponseBridge.php @@ -1,9 +1,9 @@ Date: Tue, 9 May 2023 14:32:09 -0400 Subject: [PATCH 6/8] Remove authors from composer config --- composer.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/composer.json b/composer.json index e31f295..8cf1333 100644 --- a/composer.json +++ b/composer.json @@ -2,13 +2,6 @@ "name": "chadicus/slim-oauth2-http", "description": "Bridge components for PSR-7 and bshaffer's OAuth2 Server http messages.", "keywords": ["slim", "oauth2", "http", "message", "psr7", "request", "response", "bridge"], - "authors": [ - { - "name": "Chad Gray", - "email": "chadwickgray@gmail.com", - "role": "Developer" - } - ], "license": "MIT", "require": { "php": "^5.6 || ^7.0 || ^8.0", From b1e02424e36d0b4897d9d7c84b417cb2756365f8 Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:36:48 -0400 Subject: [PATCH 7/8] Allow newer versions of PHPUnit --- composer.json | 2 +- tests/RequestBridgeTest.php | 3 ++- tests/ResponseBridgeTest.php | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8cf1333..d9d6a99 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "sort-packages": true }, "require-dev": { - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^5.7 || ^6.5 || ^9.6 || ^10.1", "squizlabs/php_codesniffer": "^3.7" }, "autoload": { diff --git a/tests/RequestBridgeTest.php b/tests/RequestBridgeTest.php index e1e82ec..0d0c875 100644 --- a/tests/RequestBridgeTest.php +++ b/tests/RequestBridgeTest.php @@ -5,6 +5,7 @@ use Chadicus\Slim\OAuth2\Http\RequestBridge; use Laminas\Diactoros\ServerRequest; use Laminas\Diactoros\UploadedFile; +use PHPUnit\Framework\TestCase; /** * Unit tests for the \Chadicus\Slim\OAuth2\Http\RequestBridge class. @@ -12,7 +13,7 @@ * @coversDefaultClass \Chadicus\Slim\OAuth2\Http\RequestBridge * @covers :: */ -final class RequestBridgeTest extends \PHPUnit_Framework_TestCase +final class RequestBridgeTest extends TestCase { /** * Verify basic behavior of toOAuth2() diff --git a/tests/ResponseBridgeTest.php b/tests/ResponseBridgeTest.php index afdbde0..5dde0aa 100644 --- a/tests/ResponseBridgeTest.php +++ b/tests/ResponseBridgeTest.php @@ -4,6 +4,7 @@ use Chadicus\Slim\OAuth2\Http\ResponseBridge; use OAuth2\Response; +use PHPUnit\Framework\TestCase; /** * Unit tests for the \Chadicus\Slim\OAuth2\Http\ResponseBridge class. @@ -11,7 +12,7 @@ * @coversDefaultClass \Chadicus\Slim\OAuth2\Http\ResponseBridge * @covers :: */ -final class ResponseBridgeTest extends \PHPUnit_Framework_TestCase +final class ResponseBridgeTest extends TestCase { /** * Verify basic behavior of fromOAuth2() From 9eef06370e3b68a5168ac1ad79604e5b4269b506 Mon Sep 17 00:00:00 2001 From: chadicus Date: Tue, 9 May 2023 14:44:39 -0400 Subject: [PATCH 8/8] Update scrutinizer config --- .scrutinizer.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 22c365a..5d88809 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,13 +3,12 @@ filter: - 'vendor/*' before_commands: - 'composer install --prefer-source' -build: - tests: - override: - - phpcs-run --standard=./vendor/chadicus/coding-standard/Chadicus/ruleset.xml tools: php_analyzer: true php_mess_detector: true + php_code_sniffer: + config: + standard: PSR2 sensiolabs_security_checker: true php_loc: excluded_dirs: