Skip to content

Commit c050d78

Browse files
authored
feature KnpLabs#934 Allow PHP8 (acrobat)
This PR was merged into the 3.0.x-dev branch. Discussion ---------- Also switch the psr cache dev dependency to `symfony/cache` to allow php8 testing Commits ------- 2599aad Allow PHP8 and switch psr cache dev dependency to symfony/cache to allow php8 testing
2 parents c61e360 + 2599aad commit c050d78

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php-versions: ['7.1', '7.2', '7.3', '7.4']
14+
php-versions: ['7.2', '7.3', '7.4', '8.0']
1515

1616
steps:
1717
- uses: actions/checkout@v2
@@ -48,7 +48,7 @@ jobs:
4848

4949
- uses: shivammathur/setup-php@v2
5050
with:
51-
php-version: 7.1
51+
php-version: 7.2
5252
coverage: none
5353

5454
- name: Install Composer Dependencies

composer.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.1",
20+
"php": "^7.2 || ^8.0",
21+
"php-http/cache-plugin": "^1.7.1",
2122
"php-http/client-common": "^2.3",
22-
"php-http/cache-plugin": "^1.7",
23-
"php-http/discovery": "^1.11",
24-
"php-http/httplug": "^2.1",
25-
"php-http/multipart-stream-builder": "^1.1",
23+
"php-http/discovery": "^1.12",
24+
"php-http/httplug": "^2.2",
25+
"php-http/multipart-stream-builder": "^1.1.2",
2626
"psr/cache": "^1.0",
2727
"psr/http-client-implementation": "^1.0",
2828
"psr/http-factory-implementation": "^1.0",
2929
"psr/http-message": "^1.0"
3030
},
3131
"require-dev": {
32-
"cache/array-adapter": "^1.0.1",
33-
"guzzlehttp/psr7": "^1.5.2",
32+
"symfony/cache": "^5.1.8",
33+
"guzzlehttp/psr7": "^1.7",
3434
"http-interop/http-factory-guzzle": "^1.0",
35-
"php-http/guzzle6-adapter": "^2.0.1",
36-
"php-http/mock-client": "^1.4",
37-
"phpstan/phpstan": "^0.12.32",
38-
"phpstan/extension-installer": "^1.0.4",
39-
"phpstan/phpstan-deprecation-rules": "^0.12.4",
40-
"phpunit/phpunit": "^7.5.15 || ^8.4 || ^9.0"
35+
"guzzlehttp/guzzle": "^7.2",
36+
"php-http/mock-client": "^1.4.1",
37+
"phpstan/phpstan": "^0.12.57",
38+
"phpstan/extension-installer": "^1.0.5",
39+
"phpstan/phpstan-deprecation-rules": "^0.12.5",
40+
"phpunit/phpunit": "^8.5 || ^9.4"
4141
},
4242
"autoload": {
4343
"psr-4": { "Github\\": "lib/Github/" }

test/Github/Tests/Functional/CacheTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Github\Tests\Functional;
44

5-
use Cache\Adapter\PHPArray\ArrayCachePool;
65
use Github\Client;
76
use GuzzleHttp\Psr7\Response;
7+
use Symfony\Component\Cache\Adapter\ArrayAdapter;
88

99
/**
1010
* @group functional
@@ -23,7 +23,7 @@ public function shouldServeCachedResponse()
2323
$mockClient->addResponse($this->getCurrentUserResponse('octocat'));
2424

2525
$github = Client::createWithHttpClient($mockClient);
26-
$github->addCache(new ArrayCachePool(), ['default_ttl'=>600]);
26+
$github->addCache(new ArrayAdapter(), ['default_ttl'=>600]);
2727

2828
$github->authenticate('fake_token_aaa', Client::AUTH_ACCESS_TOKEN);
2929
$userA = $github->currentUser()->show();
@@ -43,7 +43,7 @@ public function shouldVaryOnAuthorization()
4343
$mockClient->addResponse($this->getCurrentUserResponse('octocat'));
4444

4545
$github = Client::createWithHttpClient($mockClient);
46-
$github->addCache(new ArrayCachePool(), ['default_ttl'=>600]);
46+
$github->addCache(new ArrayAdapter(), ['default_ttl'=>600]);
4747

4848
$github->authenticate('fake_token_aaa', Client::AUTH_ACCESS_TOKEN);
4949
$userA = $github->currentUser()->show();

0 commit comments

Comments
 (0)