Skip to content

Commit d656bbf

Browse files
authored
Merge pull request #9 from mtvbrianking/2.x
Guzzle 7 support
2 parents 126d158 + a83077f commit d656bbf

7 files changed

Lines changed: 30 additions & 28 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea
22
.php_cs.cache
3+
.phpunit.result.cache
34
composer.lock
45
coverage
56
coverage.clover

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
language: php
44

55
php:
6-
- 5.6
7-
- 7.2
6+
- 7.3
87

98
# Default stage = test,
109
# Runs for both default php versions - above.
@@ -24,7 +23,7 @@ jobs:
2423

2524
name: Documentation
2625

27-
php: 7.2
26+
php: 7.3
2827

2928
install:
3029
- curl -O http://get.sensiolabs.org/sami.phar

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=5.6.4",
23+
"php": ">=7.2.5",
2424
"ext-json": "*",
25-
"guzzlehttp/guzzle": "^6.3"
25+
"guzzlehttp/guzzle": "^7.0"
2626
},
2727
"require-dev": {
28-
"friendsofphp/php-cs-fixer": "^2.14",
29-
"mockery/mockery": "0.9.*",
30-
"phpunit/phpunit": "~5.0"
28+
"friendsofphp/php-cs-fixer": "^2.16",
29+
"mockery/mockery": "1.3.*",
30+
"phpunit/phpunit": "^8.5.5"
3131
},
3232
"suggest": {
3333
"monolog/monolog": "For comprehensive logging."

phpunit.xml.dist

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
backupGlobals="false"
5+
backupStaticAttributes="false"
6+
bootstrap="vendor/autoload.php"
7+
colors="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
11+
processIsolation="false"
12+
stopOnFailure="true">
13+
<coverage processUncoveredFiles="true">
14+
<include>
15+
<directory suffix=".php">./src</directory>
16+
</include>
17+
</coverage>
1118
<testsuites>
1219
<testsuite name="Bmatovu OAuth Negotiator Test Suite">
13-
<directory>tests</directory>
20+
<directory>./tests</directory>
1421
</testsuite>
1522
</testsuites>
16-
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">src/</directory>
19-
</whitelist>
20-
</filter>
2123
</phpunit>

src/OAuth2Middleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private function onFulfilled(RequestInterface $request, array $options, callable
227227
*/
228228
private function onRejected(RequestInterface $request, array $options, callable $handler)
229229
{
230-
return function ($reason) use ($request, $options) {
230+
return function ($reason) {
231231
return \GuzzleHttp\Promise\rejection_for($reason);
232232
};
233233
}

tests/OAuth2MiddlewareTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class OAuth2MiddlewareTest extends TestCase
2020
{
2121
protected $testTokenFile;
2222

23-
public function setUp()
23+
public function setUp(): void
2424
{
2525
$this->testTokenFile = tempnam(sys_get_temp_dir(), 'phpunit_test_');
2626
}
2727

28-
public function tearDown()
28+
public function tearDown(): void
2929
{
3030
if (file_exists($this->testTokenFile)) {
3131
unlink($this->testTokenFile);

tests/Repositories/FileTokenTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FileTokenTest extends TestCase
2323
/**
2424
* {@inheritdoc}
2525
*/
26-
public function setUp()
26+
public function setUp(): void
2727
{
2828
$this->testTokenFile = tempnam(sys_get_temp_dir(), 'phpunit_test_');
2929

@@ -33,7 +33,7 @@ public function setUp()
3333
/**
3434
* {@inheritdoc}
3535
*/
36-
public function tearDown()
36+
public function tearDown(): void
3737
{
3838
if (file_exists($this->testTokenFile)) {
3939
unlink($this->testTokenFile);

0 commit comments

Comments
 (0)