Skip to content

Commit 00d1666

Browse files
committed
Allow PHP8 and switch psr cache dev dependency to symfony/cache to allow php8 testing
1 parent c61e360 commit 00d1666

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.1",
20+
"php": "^7.2|^8.0",
2121
"php-http/client-common": "^2.3",
2222
"php-http/cache-plugin": "^1.7",
2323
"php-http/discovery": "^1.11",
@@ -29,15 +29,15 @@
2929
"psr/http-message": "^1.0"
3030
},
3131
"require-dev": {
32-
"cache/array-adapter": "^1.0.1",
32+
"symfony/cache": "^5.1",
3333
"guzzlehttp/psr7": "^1.5.2",
3434
"http-interop/http-factory-guzzle": "^1.0",
35-
"php-http/guzzle6-adapter": "^2.0.1",
35+
"guzzlehttp/guzzle": "^7.0.1",
3636
"php-http/mock-client": "^1.4",
3737
"phpstan/phpstan": "^0.12.32",
3838
"phpstan/extension-installer": "^1.0.4",
3939
"phpstan/phpstan-deprecation-rules": "^0.12.4",
40-
"phpunit/phpunit": "^7.5.15 || ^8.4 || ^9.0"
40+
"phpunit/phpunit": "^8.4 || ^9.0"
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)