This commit is contained in:
Fabien Potencier 2017-04-20 11:21:47 -06:00
parent f730ffae49
commit 26bc96ea77
2 changed files with 2 additions and 2 deletions

View File

@ -643,7 +643,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
foreach ($container->getAutomaticInstanceofDefinitions() as $interface => $childDefinition) {
if (isset($this->automaticInstanceofDefinitions[$interface])) {
throw new InvalidArgumentException(sprintf('%s has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface));
throw new InvalidArgumentException(sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface));
}
$this->automaticInstanceofDefinitions[$interface] = $childDefinition;

View File

@ -578,7 +578,7 @@ class ContainerBuilderTest extends TestCase
/**
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
* @expectedExceptionMessage AInterface has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.
* @expectedExceptionMessage "AInterface" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.
*/
public function testMergeThrowsExceptionForDuplicateAutomaticInstanceofDefinitions()
{