Skip to content

Commit 13c909b

Browse files
authored
Allow PHP 5.6 and 7.0 to be installed (#182)
* Allow PHP 5.6 and 7.0 to be installed * Skip listener, use integration * Remove typehints
1 parent 89c1092 commit 13c909b

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: php
22

33
php:
4+
- 5.6
5+
- 7.0
46
- 7.1
57
- 7.2
68

@@ -20,10 +22,10 @@ env:
2022

2123
matrix:
2224
include:
23-
- php: 7.1
25+
- php: 5.6
2426
env: setup=lowest symfony="^2.1"
25-
- php: 7.1
26-
- env: setup=lowest symfony="^3"
27+
- php: 5.6
28+
env: setup=lowest symfony="^3"
2729
- php: 7.1
2830
env: setup=lowest symfony="^4"
2931

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"classmap": ["src/Omnipay.php"]
3939
},
4040
"require": {
41-
"php": "^7.1",
41+
"php": "^5.6|^7",
4242
"php-http/client-implementation": "^1",
4343
"php-http/message": "^1.5",
4444
"php-http/discovery": "^1.2.1",

phpunit.xml.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
<directory>./tests/</directory>
1515
</testsuite>
1616
</testsuites>
17-
<listeners>
18-
<listener class="Mockery\Adapter\Phpunit\TestListener" file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" />
19-
</listeners>
2017
<filter>
2118
<whitelist>
2219
<directory>./src</directory>

src/Common/Http/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public function __construct($httpClient = null, RequestFactory $requestFactory =
4545
* @throws \Http\Client\Exception
4646
*/
4747
public function request(
48-
string $method,
48+
$method,
4949
$uri,
5050
array $headers = [],
5151
$body = null,
52-
string $protocolVersion = '1.1'
53-
) : ResponseInterface {
52+
$protocolVersion = '1.1'
53+
) {
5454
$request = $this->requestFactory->createRequest($method, $uri, $headers, $body, $protocolVersion);
5555

5656
return $this->sendRequest($request);

src/Common/Http/ClientInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ interface ClientInterface
2525
* @return ResponseInterface
2626
*/
2727
public function request(
28-
string $method,
28+
$method,
2929
$uri,
3030
array $headers = [],
3131
$body = null,
32-
string $protocolVersion = '1.1'
33-
) : ResponseInterface;
32+
$protocolVersion = '1.1'
33+
);
3434
}

src/Common/Http/Exception.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ abstract class Exception extends \RuntimeException
1010
/** @var RequestInterface */
1111
protected $request;
1212

13-
public function __construct(string $message, RequestInterface $request, Throwable $previous = null)
13+
public function __construct($message, RequestInterface $request, $previous = null)
1414
{
1515
$this->request = $request;
1616

@@ -24,7 +24,7 @@ public function __construct(string $message, RequestInterface $request, Throwabl
2424
*
2525
* @return RequestInterface
2626
*/
27-
public function getRequest(): RequestInterface
27+
public function getRequest()
2828
{
2929
return $this->request;
3030
}

0 commit comments

Comments
 (0)