From 70da21dc946dacff73ac6f8ccd918906ef5f6a43 Mon Sep 17 00:00:00 2001 From: Alexandre Gomes Gaigalas Date: Thu, 25 Jun 2026 19:22:59 -0300 Subject: [PATCH] Remove deprecated resolveNamed --- src/ContainerResolver.php | 14 -------------- tests/unit/ContainerResolverTest.php | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/src/ContainerResolver.php b/src/ContainerResolver.php index 6fa5cb4..16df916 100644 --- a/src/ContainerResolver.php +++ b/src/ContainerResolver.php @@ -123,20 +123,6 @@ public function resolve(ReflectionFunctionAbstract $reflection, array $arguments return $resolved; } - /** - * Resolve arguments, with named arguments taking precedence over the container. - * - * @deprecated Use {@see resolve()} instead; it now handles named arguments directly. - * - * @param array $arguments - * - * @return list - */ - public function resolveNamed(ReflectionFunctionAbstract $reflection, array $arguments): array - { - return $this->resolve($reflection, $arguments); - } - /** Reflect any callable into its ReflectionFunctionAbstract. */ public static function reflectCallable(callable $callable): ReflectionFunctionAbstract { diff --git a/tests/unit/ContainerResolverTest.php b/tests/unit/ContainerResolverTest.php index d42949c..27b8950 100644 --- a/tests/unit/ContainerResolverTest.php +++ b/tests/unit/ContainerResolverTest.php @@ -144,18 +144,6 @@ public function itShouldReflectStaticMethodString(): void self::assertSame('createFromFormat', $reflection->getName()); } - #[Test] - public function itShouldKeepDeprecatedResolveNamedAsAnAliasOfResolve(): void - { - $resolver = new ContainerResolver(new ArrayContainer([SampleService::class => new SampleService()])); - $constructor = $this->constructorOf(ServiceConsumer::class); - - self::assertSame( - $resolver->resolve($constructor, ['value' => 'explicit']), - $resolver->resolveNamed($constructor, ['value' => 'explicit']), - ); - } - #[Test] public function itShouldExpandVariadicArguments(): void {