Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable PHP down to version 7.1 #1049

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
php-version: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
php-version: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ We support the following versions of PHP:
* PHP 8.3
* PHP 8.2
* PHP 8.1
* PHP 8.0
* PHP 7.4
* PHP 7.3
* PHP 7.2
* PHP 7.1

## Provider Clients

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"sort-packages": true
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "^7.1 || >=8.0.0 <8.5.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.0"
"guzzlehttp/guzzle": "^6.0 || ^7.0"
},
"require-dev": {
"mockery/mockery": "^1.6",
"mockery/mockery": "^1.3.5",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpunit/phpunit": "^10.5 || ^11.5",
"phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11",
"squizlabs/php_codesniffer": "^3.11"
},
"keywords": [
Expand Down
3 changes: 3 additions & 0 deletions test/src/Grant/GrantFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

class GrantFactoryTest extends TestCase
{
/**
* @dataProvider providerGetGrantDefaults
*/
#[DataProvider('providerGetGrantDefaults')]
public function testGetGrantDefaults($name)
{
Expand Down
3 changes: 3 additions & 0 deletions test/src/Grant/GrantTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ abstract public static function providerGetAccessToken();
*/
abstract protected function getParamExpectation();

/**
* @dataProvider providerGetAccessToken
*/
#[DataProvider('providerGetAccessToken')]
public function testGetAccessToken($grant, array $params = [])
{
Expand Down
2 changes: 2 additions & 0 deletions test/src/OptionProvider/HttpBasicAuthOptionProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public static function providerTestGetAccessTokenOptionsException()

/**
* @param array $params
*
* @dataProvider providerTestGetAccessTokenOptionsException
*/
#[DataProvider('providerTestGetAccessTokenOptionsException')]
public function testGetAccessTokenOptionsException($params)
Expand Down
15 changes: 15 additions & 0 deletions test/src/Provider/AbstractProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ public function testSetRedirectHandler()
$this->assertNotFalse($state);
}

/**
* @dataProvider userPropertyProvider
*/
#[DataProvider('userPropertyProvider')]
public function testGetUserProperties($name = null, $email = null, $id = null)
{
Expand Down Expand Up @@ -340,6 +343,9 @@ public function testSetGetPkceCode()
$this->assertEquals($pkceCode, $provider->getPkceCode());
}

/**
* @dataProvider pkceMethodProvider
*/
#[DataProvider('pkceMethodProvider')]
public function testPkceMethod($pkceMethod, $pkceCode, $expectedChallenge)
{
Expand Down Expand Up @@ -604,6 +610,9 @@ public static function getAccessTokenMethodProvider()
];
}

/**
* @dataProvider getAccessTokenMethodProvider
*/
#[DataProvider('getAccessTokenMethodProvider')]
public function testGetAccessToken($method)
{
Expand Down Expand Up @@ -724,6 +733,9 @@ public static function parseResponseProvider()
];
}

/**
* @dataProvider parseResponseProvider
*/
#[DataProvider('parseResponseProvider')]
public function testParseResponse($body, $type, $parsed, $statusCode = 200)
{
Expand Down Expand Up @@ -774,6 +786,9 @@ public static function getAppendQueryProvider()
];
}

/**
* @dataProvider getAppendQueryProvider
*/
#[DataProvider('getAppendQueryProvider')]
public function testAppendQuery($expected, $url, $query)
{
Expand Down
2 changes: 2 additions & 0 deletions test/src/Provider/GenericProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public function testCheckResponse()
/**
* @param array $error The error response to parse
* @param array $extraOptions Any extra options to configure the generic provider with.
*
* @dataProvider checkResponseThrowsExceptionProvider
*/
#[DataProvider('checkResponseThrowsExceptionProvider')]
public function testCheckResponseThrowsException(array $error, array $extraOptions = [])
Expand Down
Loading