From ad937613fafc445dff18a4f1eed5da132c21da9a Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:39:52 +0200 Subject: [PATCH 1/9] Fix PHP 8.5 compatibility --- src/CascadeContainer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CascadeContainer.php b/src/CascadeContainer.php index b7e72e2..e5cada5 100644 --- a/src/CascadeContainer.php +++ b/src/CascadeContainer.php @@ -35,8 +35,8 @@ final class CascadeContainer implements ContainerInterface * @param DependencyResolverInterface|null $resolver */ public function __construct( - ContainerInterface | array | null $parent = null, - DependencyResolverInterface $resolver = null, + ContainerInterface | array | null $parent = null, + DependencyResolverInterface | null $resolver = null, ) { if (is_array($parent)) { foreach ($parent as $id => $instance) { From 1481a102930ce9a018d6b599ce716e725d35b969 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:40:25 +0200 Subject: [PATCH 2/9] Cleanup unnecessary phpDoc notations --- src/CascadeContainer.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/CascadeContainer.php b/src/CascadeContainer.php index e5cada5..6b1ee61 100644 --- a/src/CascadeContainer.php +++ b/src/CascadeContainer.php @@ -54,8 +54,6 @@ public function __construct( /** * Create a new nested isolated layer of the CascadeContainer. * Anything defined in the nested layer will not affect the parent container. - * - * @return CascadeContainer */ public function cascade(): self { @@ -105,10 +103,6 @@ public function has(string $id): bool /** * Bind the given instance as a service to the service container. - * - * @param string $id - * @param mixed $instance - * @return void */ public function set(string $id, mixed $instance): void { @@ -136,10 +130,6 @@ public function alias(string $id, string $alias): void * use `->deferred()`. * * @see deferred() - * - * @param string $id - * @param callable $constructor - * @return void */ public function factory(string $id, callable $constructor): void { @@ -153,10 +143,6 @@ public function factory(string $id, callable $constructor): void * * Unlike factories, the deferred resolver will be invoked only once -- for the very first time, * and then its result will be remembered as a regular service instance defined in the container. - * - * @param string $id - * @param callable $resolver - * @return void */ public function deferred(string $id, callable $resolver): void { @@ -171,8 +157,6 @@ public function deferred(string $id, callable $resolver): void * It can be either found in the container or constructed on the fly, * recursively auto-resolving the required parameters. * - * @param string $id - * @return mixed * @throws \Psr\Container\ContainerExceptionInterface * @throws \Psr\Container\NotFoundExceptionInterface */ @@ -191,10 +175,6 @@ public function resolve(string $id): mixed * - Whatever the callback function returns will replace the previous instance. * - If the service being extended is defined via a deferred resolver, the extension will become a deferred resolver too. * - If the service being extended is defined as a factory, the extension will become a factory too. - * - * @param string $id - * @param callable $extension - * @return void */ public function extend(string $id, callable $extension): void { @@ -240,9 +220,10 @@ public function extend(string $id, callable $extension): void * Even if the container already has the instance bound, * it will still be instantiated. * - * @param class-string $className + * @template T + * @param class-string $className * @param array $bindings - * @return object + * @return T * * @throws ClassCannotBeInstantiated * @throws CannotAutowireDependencyArgument From c6ad987a21d87e7372a9e67915d9b954588b1a0a Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:40:32 +0200 Subject: [PATCH 3/9] Add php 8.5 to the test matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90608f0..ebc58b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] steps: - uses: actions/checkout@master From 9ccd36478fd0d74629640dafe051a34177a85423 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:47:13 +0200 Subject: [PATCH 4/9] Fix tests target typo in the Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a49f09d..11b2803 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -.PHONY: test +.PHONY: tests -test: vendor +tests: vendor php vendor/bin/pest vendor: composer.json composer.phar From f0c570efa71c9af6da549373e4583879305c0838 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:51:52 +0200 Subject: [PATCH 5/9] Update composer.phar installation script --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 11b2803..4bad495 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,6 @@ vendor: composer.json composer.phar composer.phar: php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" + php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" php composer-setup.php php -r "unlink('composer-setup.php');" \ No newline at end of file From 9a9f599b2f1afc672fa03f25a8c6ff1d83d0bc07 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 12:54:14 +0200 Subject: [PATCH 6/9] Drop unnecessary Pest config customizations --- tests/Pest.php | 15 --------------- tests/TestCase.php | 10 ---------- 2 files changed, 25 deletions(-) delete mode 100644 tests/Pest.php delete mode 100644 tests/TestCase.php diff --git a/tests/Pest.php b/tests/Pest.php deleted file mode 100644 index a1d52b9..0000000 --- a/tests/Pest.php +++ /dev/null @@ -1,15 +0,0 @@ -extend(\Tests\TestCase::class)->in('Feature'); - diff --git a/tests/TestCase.php b/tests/TestCase.php deleted file mode 100644 index cfb05b6..0000000 --- a/tests/TestCase.php +++ /dev/null @@ -1,10 +0,0 @@ - Date: Fri, 15 May 2026 13:04:02 +0200 Subject: [PATCH 7/9] Drop support for PHP <8.2 --- .github/workflows/test.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebc58b3..8ebe78e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + php: [ '8.2', '8.3', '8.4', '8.5' ] steps: - uses: actions/checkout@master diff --git a/composer.json b/composer.json index 0304f79..0ad4f81 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "technically/array-container": "^2.0" }, "require-dev": { - "pestphp/pest": "^1.0|^2.0|^3.0" + "pestphp/pest": "^2.0|^3.0|^4.0" }, "license": "MIT", "autoload": { From 7a43ddb4b4ab3e8789ccf4088aae4bdf154849e4 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 13:04:07 +0200 Subject: [PATCH 8/9] Simplify Makefile --- Makefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 4bad495..e1cead7 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,5 @@ tests: vendor php vendor/bin/pest -vendor: composer.json composer.phar - php composer.phar install - -composer.phar: - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" - php composer-setup.php - php -r "unlink('composer-setup.php');" \ No newline at end of file +vendor: composer.json + composer install From 6910d5ebd36eee5093f30b8355e0b13133f95626 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Fri, 15 May 2026 13:16:56 +0200 Subject: [PATCH 9/9] Update requirements in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7266e3..376110e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ - [PSR Container][psr-11] compatibility - [Semantic Versioning](http://semver.org/) -- PHP 8.0+ +- PHP 8.2+ - Minimal yet elegant API ### Features