Skip to content

Commit

Permalink
Merge pull request #52 from chadicus/develop
Browse files Browse the repository at this point in the history
Add Support for PHP 8
  • Loading branch information
chadicus authored May 9, 2023
2 parents b89d262 + 9eef063 commit 50bee83
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
7 changes: 3 additions & 4 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 4 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@
"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": "[email protected]",
"role": "Developer"
}
],
"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"
"laminas/laminas-diactoros": "^1.8 || ^2.0"
},
"config" : {
"sort-packages": true
},
"require-dev": {
"chadicus/coding-standard": "^1.3",
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^5.7 || ^6.5 || ^9.6 || ^10.1",
"squizlabs/php_codesniffer": "^3.7"
},
"autoload": {
"psr-4": {"Chadicus\\Slim\\OAuth2\\Http\\" : "src"}
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<file>.</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<arg value="p" />
<rule ref="./vendor/chadicus/coding-standard/Chadicus"/>
<rule ref="PSR2" />
</ruleset>
4 changes: 2 additions & 2 deletions src/ResponseBridge.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Chadicus\Slim\OAuth2\Http;

use Laminas\Diactoros\Response;
use Laminas\Diactoros\Stream;
use OAuth2;
use Zend\Diactoros\Response;
use Zend\Diactoros\Stream;

/**
* Static utility class for bridging OAuth2 responses to PSR-7 responses.
Expand Down
7 changes: 4 additions & 3 deletions tests/RequestBridgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
namespace ChadicusTest\Slim\OAuth2\Http;

use Chadicus\Slim\OAuth2\Http\RequestBridge;
use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\UploadedFile;
use Laminas\Diactoros\ServerRequest;
use Laminas\Diactoros\UploadedFile;
use PHPUnit\Framework\TestCase;

/**
* Unit tests for the \Chadicus\Slim\OAuth2\Http\RequestBridge class.
*
* @coversDefaultClass \Chadicus\Slim\OAuth2\Http\RequestBridge
* @covers ::<private>
*/
final class RequestBridgeTest extends \PHPUnit_Framework_TestCase
final class RequestBridgeTest extends TestCase
{
/**
* Verify basic behavior of toOAuth2()
Expand Down
3 changes: 2 additions & 1 deletion tests/ResponseBridgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

use Chadicus\Slim\OAuth2\Http\ResponseBridge;
use OAuth2\Response;
use PHPUnit\Framework\TestCase;

/**
* Unit tests for the \Chadicus\Slim\OAuth2\Http\ResponseBridge class.
*
* @coversDefaultClass \Chadicus\Slim\OAuth2\Http\ResponseBridge
* @covers ::<private>
*/
final class ResponseBridgeTest extends \PHPUnit_Framework_TestCase
final class ResponseBridgeTest extends TestCase
{
/**
* Verify basic behavior of fromOAuth2()
Expand Down

0 comments on commit 50bee83

Please sign in to comment.