diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27339b4..5b375a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.3' + coverage: none + tools: composer:v2, psalm - - name: Install Psalm - run: composer require --dev vimeo/psalm:dev-master@dev --no-suggest + - name: Install dependencies + run: composer update --prefer-dist --no-progress --ansi - name: Psalm - run: vendor/bin/psalm --output-format=github --shepherd + run: psalm --output-format=github --shepherd diff --git a/README.md b/README.md index e0550b1..4387f46 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Behapi ====== Behat extension to help write describe features related to HTTP APIs. -PHP 7.3, Behat 3.5 and a discoverable php-http client are required to make +PHP 7.3, Behat 3.7 and a discoverable php-http client are required to make this extension work. Installing this extension requires you to require `taluu/behapi` and an @@ -11,9 +11,6 @@ implementation of a http client (providing `psr/http-factory-implementation ^1.0` and `psr/http-message-implementation ^1.0`). -This still requires the interop container, while Behat doesn't have 1st class -support for the psr-11. - You can find some examples on the `examples/` directory. Howto diff --git a/composer.json b/composer.json index fb72e41..95a9ebe 100644 --- a/composer.json +++ b/composer.json @@ -34,10 +34,10 @@ "psr/http-factory": "^1.0", "psr/http-factory-implementation": "^1.0", - "php-http/discovery": "^1.0", + "php-http/discovery": "^1.11", "php-http/client-common": "^2.0", - "container-interop/container-interop": "^1.0" + "psr/container": "^1.0" }, "suggest": { @@ -45,7 +45,8 @@ }, "conflict": { - "behat/behat": "< 3.5", + "php-http/discovery": "< 1.11", + "behat/behat": "< 3.7", "symfony/dependency-injection": "< 2.8" }, diff --git a/src/Container.php b/src/Container.php index 9d99ad3..d9a68e2 100644 --- a/src/Container.php +++ b/src/Container.php @@ -69,7 +69,7 @@ public function get($id) private function getPluginClientBuilder(): PluginClientBuilder { $builder = new PluginClientBuilder; - $uriFactory = Psr17FactoryDiscovery::findUrlFactory(); + $uriFactory = Psr17FactoryDiscovery::findUriFactory(); $baseUri = $uriFactory->createUri($this->baseUrl); $httpHistory = $this->services[HttpHistory::class];