diff --git a/.atoum.php b/.atoum.php index 3addb22..049c3c8 100644 --- a/.atoum.php +++ b/.atoum.php @@ -1,5 +1,5 @@ addTestsFromDirectory(__DIR__.'/tests/Units'); diff --git a/.travis.yml b/.travis.yml index 2e48189..76df6b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/composer.json b/composer.json index f0ea52c..1251cc1 100644 --- a/composer.json +++ b/composer.json @@ -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, diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index eabcdcc..9aa5955 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -1,6 +1,6 @@ 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; } } diff --git a/src/Rest/RestApiBrowserResolver.php b/src/Rest/RestApiBrowserResolver.php index a34ee2e..b9c4102 100644 --- a/src/Rest/RestApiBrowserResolver.php +++ b/src/Rest/RestApiBrowserResolver.php @@ -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; } } diff --git a/src/RestApiContext.php b/src/RestApiContext.php index 3a2b7d1..b31a679 100644 --- a/src/RestApiContext.php +++ b/src/RestApiContext.php @@ -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; @@ -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) {