Skip to content

Commit 98dba54

Browse files
authored
Update dependencies for php8 compatibility (#103)
* Update dependencies for php8 * Updating travis for php 8 and support updated versions of php 7 * Updating dist to support php8 * Update atoum * Update code with new version of atoum * Updating dependencies for prefer-lowest * Update symfony config to avoid deprecate message * Update symdony dependency injection to avoid deprecate * Remove deprecate get class from reflection * Upgrade minimum json schema
1 parent 1c0b3ce commit 98dba54

File tree

9 files changed

+28
-25
lines changed

9 files changed

+28
-25
lines changed

.atoum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
use \mageekguy\atoum;
2+
use atoum\atoum;
33

44
$runner->addTestsFromDirectory(__DIR__.'/tests/Units');
55

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
language: php
2-
dist: trusty
2+
dist: bionic
33
cache:
44
directories:
55
- vendor
66
php:
7-
- 5.6
8-
- 7
9-
- 7.1
7+
- 7.2
8+
- 7.3
9+
- 7.4
10+
- 8.0
1011
- nightly
1112
env:
1213
matrix:

composer.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,26 @@
2020
},
2121
"minimum-stability": "dev",
2222
"require": {
23-
"php": ">=5.6.0",
24-
"behat/behat": "~3.0",
25-
"atoum/atoum": "~1.0|~2.0|~3.0|3.0.x-dev",
26-
"symfony/property-access": "~2.5|~3.0|~4.0",
27-
"justinrainbow/json-schema": ">=3.0 <6.0",
23+
"php": ">=7.2",
24+
"behat/behat": "^3.8",
25+
"atoum/atoum": "^4",
26+
"symfony/property-access": "~4.0",
27+
"justinrainbow/json-schema": ">=5.2.10 <6.0",
2828
"psr/http-message": "^1.0",
29-
"php-http/discovery": "^1.0",
30-
"php-http/client-common": "^1.2",
31-
"php-http/message": "^1.3",
32-
"tolerance/tolerance": "^0.4",
33-
"mtdowling/jmespath.php": "^2.3"
29+
"php-http/discovery": "^1.13",
30+
"php-http/client-common": "^2.3",
31+
"php-http/message": "^1.11",
32+
"tolerance/tolerance": "^0.4.2",
33+
"mtdowling/jmespath.php": "^2.3",
34+
"symfony/config": "^4.4.12 | ~5.0",
35+
"symfony/dependency-injection": "^4.4.12 | ~5.0"
3436
},
3537
"require-dev": {
3638
"silex/silex": "~2.0",
37-
"symfony/process": "~2.1|~3.0",
39+
"symfony/process": "~4.0",
3840
"guzzlehttp/psr7": "^1.3",
3941
"php-http/mock-client": "^1.0",
40-
"php-http/guzzle6-adapter": "^1.1.1"
42+
"php-http/guzzle7-adapter": "^0.1.1"
4143
},
4244
"config": {
4345
"optimize-autoloader": true,

features/bootstrap/FeatureContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use mageekguy\atoum\asserter;
3+
use atoum\atoum\asserter;
44
use Behat\Behat\Context\Context;
55
use Behat\Behat\Context\SnippetAcceptingContext;
66
use Behat\Gherkin\Node\PyStringNode;

features/send_request_until.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Feature: Send request until
3737
<?php
3838
use Behat\Behat\Context\Context;
3939
use Ubirak\RestApiBehatExtension\Rest\RestApiBrowser;
40-
use mageekguy\atoum\asserter;
40+
use atoum\atoum\asserter;
4141
4242
class FeatureContext implements Context
4343
{
@@ -89,7 +89,7 @@ Feature: Send request until
8989
<?php
9090
use Behat\Behat\Context\Context;
9191
use Ubirak\RestApiBehatExtension\Rest\RestApiBrowser;
92-
use mageekguy\atoum\asserter;
92+
use atoum\atoum\asserter;
9393
9494
class FeatureContext implements Context
9595
{

src/Json/JsonContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Ubirak\RestApiBehatExtension\Json;
44

5-
use mageekguy\atoum\asserter\generator as asserter;
5+
use atoum\atoum\asserter\generator as asserter;
66
use Behat\Behat\Context\Context;
77
use Behat\Behat\Context\SnippetAcceptingContext;
88
use Behat\Gherkin\Node\PyStringNode;

src/Json/JsonInspectorResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function resolveArguments(\ReflectionClass $classReflection, array $argum
2222

2323
$parameters = $constructor->getParameters();
2424
foreach ($parameters as $parameter) {
25-
if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Ubirak\RestApiBehatExtension\Json\JsonInspector') {
25+
if (null !== $parameter->getType() && ((string)$parameter->getType()) === 'Ubirak\RestApiBehatExtension\Json\JsonInspector') {
2626
$arguments[$parameter->name] = $this->jsonInspector;
2727
}
2828
}

src/Rest/RestApiBrowserResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function resolveArguments(\ReflectionClass $classReflection, array $argum
2222

2323
$parameters = $constructor->getParameters();
2424
foreach ($parameters as $parameter) {
25-
if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Ubirak\RestApiBehatExtension\Rest\RestApiBrowser') {
25+
if (null !== $parameter->getType() && ((string)$parameter->getType()) === 'Ubirak\RestApiBehatExtension\Rest\RestApiBrowser') {
2626
$arguments[$parameter->name] = $this->restApiBrowser;
2727
}
2828
}

src/RestApiContext.php

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

33
namespace Ubirak\RestApiBehatExtension;
44

5-
use mageekguy\atoum\asserter;
5+
use atoum\atoum\asserter;
66
use Behat\Behat\Context\Context;
77
use Behat\Behat\Context\SnippetAcceptingContext;
88
use Behat\Gherkin\Node\PyStringNode;
@@ -50,7 +50,7 @@ public function iSendARequestWithBody($method, $url, PyStringNode $body)
5050
/**
5151
* @When I send a POST request to :url as HTML form with body:
5252
*/
53-
public function iSendAPostRequestToAsHtmlFormWithBody($url, TableNode $body)
53+
public function iSendAPostRequestToAsHtmlFormWithBody($url, TableNode $body)
5454
{
5555
$formElements = [];
5656
foreach ($body as $element) {

0 commit comments

Comments
 (0)