Skip to content

Commit

Permalink
Update dependencies for php8 compatibility (#103)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
adalessa authored Mar 4, 2021
1 parent 1c0b3ce commit 98dba54
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .atoum.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
use \mageekguy\atoum;
use atoum\atoum;

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

Expand Down
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: php
dist: trusty
dist: bionic
cache:
directories:
- vendor
php:
- 5.6
- 7
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- nightly
env:
matrix:
Expand Down
26 changes: 14 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,26 @@
},
"minimum-stability": "dev",
"require": {
"php": ">=5.6.0",
"behat/behat": "~3.0",
"atoum/atoum": "~1.0|~2.0|~3.0|3.0.x-dev",
"symfony/property-access": "~2.5|~3.0|~4.0",
"justinrainbow/json-schema": ">=3.0 <6.0",
"php": ">=7.2",
"behat/behat": "^3.8",
"atoum/atoum": "^4",
"symfony/property-access": "~4.0",
"justinrainbow/json-schema": ">=5.2.10 <6.0",
"psr/http-message": "^1.0",
"php-http/discovery": "^1.0",
"php-http/client-common": "^1.2",
"php-http/message": "^1.3",
"tolerance/tolerance": "^0.4",
"mtdowling/jmespath.php": "^2.3"
"php-http/discovery": "^1.13",
"php-http/client-common": "^2.3",
"php-http/message": "^1.11",
"tolerance/tolerance": "^0.4.2",
"mtdowling/jmespath.php": "^2.3",
"symfony/config": "^4.4.12 | ~5.0",
"symfony/dependency-injection": "^4.4.12 | ~5.0"
},
"require-dev": {
"silex/silex": "~2.0",
"symfony/process": "~2.1|~3.0",
"symfony/process": "~4.0",
"guzzlehttp/psr7": "^1.3",
"php-http/mock-client": "^1.0",
"php-http/guzzle6-adapter": "^1.1.1"
"php-http/guzzle7-adapter": "^0.1.1"
},
"config": {
"optimize-autoloader": true,
Expand Down
2 changes: 1 addition & 1 deletion features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use mageekguy\atoum\asserter;
use atoum\atoum\asserter;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
Expand Down
4 changes: 2 additions & 2 deletions features/send_request_until.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: Send request until
<?php
use Behat\Behat\Context\Context;
use Ubirak\RestApiBehatExtension\Rest\RestApiBrowser;
use mageekguy\atoum\asserter;
use atoum\atoum\asserter;
class FeatureContext implements Context
{
Expand Down Expand Up @@ -89,7 +89,7 @@ Feature: Send request until
<?php
use Behat\Behat\Context\Context;
use Ubirak\RestApiBehatExtension\Rest\RestApiBrowser;
use mageekguy\atoum\asserter;
use atoum\atoum\asserter;
class FeatureContext implements Context
{
Expand Down
2 changes: 1 addition & 1 deletion src/Json/JsonContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Ubirak\RestApiBehatExtension\Json;

use mageekguy\atoum\asserter\generator as asserter;
use atoum\atoum\asserter\generator as asserter;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
Expand Down
2 changes: 1 addition & 1 deletion src/Json/JsonInspectorResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function resolveArguments(\ReflectionClass $classReflection, array $argum

$parameters = $constructor->getParameters();
foreach ($parameters as $parameter) {
if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Ubirak\RestApiBehatExtension\Json\JsonInspector') {
if (null !== $parameter->getType() && ((string)$parameter->getType()) === 'Ubirak\RestApiBehatExtension\Json\JsonInspector') {
$arguments[$parameter->name] = $this->jsonInspector;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/RestApiBrowserResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function resolveArguments(\ReflectionClass $classReflection, array $argum

$parameters = $constructor->getParameters();
foreach ($parameters as $parameter) {
if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Ubirak\RestApiBehatExtension\Rest\RestApiBrowser') {
if (null !== $parameter->getType() && ((string)$parameter->getType()) === 'Ubirak\RestApiBehatExtension\Rest\RestApiBrowser') {
$arguments[$parameter->name] = $this->restApiBrowser;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/RestApiContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Ubirak\RestApiBehatExtension;

use mageekguy\atoum\asserter;
use atoum\atoum\asserter;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
Expand Down Expand Up @@ -50,7 +50,7 @@ public function iSendARequestWithBody($method, $url, PyStringNode $body)
/**
* @When I send a POST request to :url as HTML form with body:
*/
public function iSendAPostRequestToAsHtmlFormWithBody($url, TableNode $body)
public function iSendAPostRequestToAsHtmlFormWithBody($url, TableNode $body)
{
$formElements = [];
foreach ($body as $element) {
Expand Down

0 comments on commit 98dba54

Please sign in to comment.