From de1921e99cf03ffd0dd7e3ab208e36f88192b443 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 17 Jun 2020 11:33:48 -0500 Subject: [PATCH 1/5] feat: add return type hints This patch adds a return type hint to `ContainerInterface::has()`, per the already documented specification, in preparation for a v3 release. No other methods were eligible, as they specified `mixed`. See https://www.php-fig.org/blog/2019/10/upgrading-psr-interfaces/ Signed-off-by: Matthew Weier O'Phinney --- composer.json | 2 +- src/ContainerInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7a943a7..2de2952 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } } } diff --git a/src/ContainerInterface.php b/src/ContainerInterface.php index cf8e7fd..b2cad40 100644 --- a/src/ContainerInterface.php +++ b/src/ContainerInterface.php @@ -32,5 +32,5 @@ public function get(string $id); * * @return bool */ - public function has(string $id); + public function has(string $id): bool; } From f9a98959fed3d903492d9e292ce66c18483c7427 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 12 Oct 2020 09:09:04 -0500 Subject: [PATCH 2/5] fix: update dev-master to 2.0.x-dev, not 3.0.x-dev I'd misread the original by-laws around typehint addition to require two new major versions, when it's just a minor version and a major version. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2de2952..7a943a7 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.0.x-dev" } } } From 68f5200c33f18c018db17eb869d4b0f97da17cad Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 5 Mar 2021 10:02:18 -0600 Subject: [PATCH 3/5] fix: alias master branch to 2.0.x Not sure why merting #28 did not pick this up... --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 95a96a4..4bc837a 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } } } From 19764b1677626ba3db35c033c329f9d603e87f26 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 8 Mar 2021 10:32:22 +0100 Subject: [PATCH 4/5] Remove Throwable interface from exceptions (port of #31 to 2.x) --- src/ContainerExceptionInterface.php | 2 +- src/NotFoundExceptionInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ContainerExceptionInterface.php b/src/ContainerExceptionInterface.php index 4501e1c..cf10b8b 100644 --- a/src/ContainerExceptionInterface.php +++ b/src/ContainerExceptionInterface.php @@ -5,6 +5,6 @@ /** * Base interface representing a generic exception in a container. */ -interface ContainerExceptionInterface extends \Throwable +interface ContainerExceptionInterface { } diff --git a/src/NotFoundExceptionInterface.php b/src/NotFoundExceptionInterface.php index 650bf46..3ac8891 100644 --- a/src/NotFoundExceptionInterface.php +++ b/src/NotFoundExceptionInterface.php @@ -5,6 +5,6 @@ /** * No entry was found in the container. */ -interface NotFoundExceptionInterface extends ContainerExceptionInterface +interface NotFoundExceptionInterface { } From 2ae37329ee82f91efadc282cc2d527fd6065a5ef Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 24 Mar 2021 14:40:57 +0100 Subject: [PATCH 5/5] Partially revert 19764b1 --- src/NotFoundExceptionInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NotFoundExceptionInterface.php b/src/NotFoundExceptionInterface.php index 3ac8891..650bf46 100644 --- a/src/NotFoundExceptionInterface.php +++ b/src/NotFoundExceptionInterface.php @@ -5,6 +5,6 @@ /** * No entry was found in the container. */ -interface NotFoundExceptionInterface +interface NotFoundExceptionInterface extends ContainerExceptionInterface { }