From 75a05b99293280e87833b51208db0ab99e16531c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20Clavi=C3=A9?= Date: Fri, 20 Nov 2020 12:14:04 +0100 Subject: [PATCH 1/3] Remove psalm dev dependency It is installed with the github action, and you should have it globally installed --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 95a9ebe..014aad2 100644 --- a/composer.json +++ b/composer.json @@ -61,8 +61,6 @@ "php-http/message": "^1.0", "symfony/http-client": "^4.3 || ^5.0", - "symfony/var-dumper": "^2.8 || ^3.3 || ^4.0", - - "vimeo/psalm": "^3.8" + "symfony/var-dumper": "^2.8 || ^3.3 || ^4.0" } } From be38ffc65e1dd083091d4dd0e7ea99cff39a58de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20Clavi=C3=A9?= Date: Fri, 20 Nov 2020 12:19:25 +0100 Subject: [PATCH 2/3] Remove EOL versions of Symfony --- composer.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 014aad2..96b4a76 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "beberlei/assert": "^3.2", - "symfony/property-access": "^3.1 || ^4.0 || ^5.0", + "symfony/property-access": "^3.4 || ^4.4 || ^5.1", "psr/http-client": "^1.0", "psr/http-client-implementation": "^1.0", @@ -46,8 +46,7 @@ "conflict": { "php-http/discovery": "< 1.11", - "behat/behat": "< 3.7", - "symfony/dependency-injection": "< 2.8" + "behat/behat": "< 3.7" }, "prefer-stable": true, @@ -60,7 +59,7 @@ "php-http/message": "^1.0", - "symfony/http-client": "^4.3 || ^5.0", - "symfony/var-dumper": "^2.8 || ^3.3 || ^4.0" + "symfony/http-client": "^4.4 || ^5.1", + "symfony/var-dumper": "^3.4 || ^4.4 || ^5.1" } } From 0a30db8cfa305bcd767993e38efb72f4409f4308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20Clavi=C3=A9?= Date: Fri, 20 Nov 2020 12:22:20 +0100 Subject: [PATCH 3/3] Remove dependency on psr's container Behat already extends and implements it --- composer.json | 4 +--- src/Container.php | 15 ++++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 96b4a76..1edf857 100644 --- a/composer.json +++ b/composer.json @@ -35,9 +35,7 @@ "psr/http-factory-implementation": "^1.0", "php-http/discovery": "^1.11", - "php-http/client-common": "^2.0", - - "psr/container": "^1.0" + "php-http/client-common": "^2.0" }, "suggest": { diff --git a/src/Container.php b/src/Container.php index d9a68e2..dae8900 100644 --- a/src/Container.php +++ b/src/Container.php @@ -1,22 +1,21 @@ services[HttpHistory::class] = $history; } - public function has($id) + /** @param string $id */ + public function has($id): bool { return in_array($id, self::SERVICES, true); } - public function get($id) + /** @param string $id */ + public function get($id): object { if (array_key_exists($id, $this->services)) { return $this->services[$id];