Skip to content

Commit 5dd531c

Browse files
committed
Remove deprecated resolveNamed
1 parent 542379d commit 5dd531c

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

src/ContainerResolver.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,6 @@ public function resolve(ReflectionFunctionAbstract $reflection, array $arguments
123123
return $resolved;
124124
}
125125

126-
/**
127-
* Resolve arguments, with named arguments taking precedence over the container.
128-
*
129-
* @deprecated Use {@see resolve()} instead; it now handles named arguments directly.
130-
*
131-
* @param array<int|string, mixed> $arguments
132-
*
133-
* @return list<mixed>
134-
*/
135-
public function resolveNamed(ReflectionFunctionAbstract $reflection, array $arguments): array
136-
{
137-
return $this->resolve($reflection, $arguments);
138-
}
139-
140126
/** Reflect any callable into its ReflectionFunctionAbstract. */
141127
public static function reflectCallable(callable $callable): ReflectionFunctionAbstract
142128
{

tests/unit/ContainerResolverTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,6 @@ public function itShouldReflectStaticMethodString(): void
144144
self::assertSame('createFromFormat', $reflection->getName());
145145
}
146146

147-
#[Test]
148-
public function itShouldKeepDeprecatedResolveNamedAsAnAliasOfResolve(): void
149-
{
150-
$resolver = new ContainerResolver(new ArrayContainer([SampleService::class => new SampleService()]));
151-
$constructor = $this->constructorOf(ServiceConsumer::class);
152-
153-
self::assertSame(
154-
$resolver->resolve($constructor, ['value' => 'explicit']),
155-
$resolver->resolveNamed($constructor, ['value' => 'explicit']),
156-
);
157-
}
158-
159147
#[Test]
160148
public function itShouldExpandVariadicArguments(): void
161149
{

0 commit comments

Comments
 (0)