Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/ContainerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int|string, mixed> $arguments
*
* @return list<mixed>
*/
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
{
Expand Down
12 changes: 0 additions & 12 deletions tests/unit/ContainerResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down