You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2.3:
[DependencyInjection] Removed extra strtolower calls
[Validator] Fixed Choice when an empty array is used in the "choices" option
Fixed tests
[StringUtil] Fixed singularification of 'selfies'
Fix Portuguese (Portugal) translation for Security
improved exception when missing required component
CS: unalign =
Show a better error when the port is in use
CS: unalign =>
[FrameworkBundle] Check for 'xlf' instead of 'xliff'
Add better phpdoc message for getListeners method of the EventDispatcher
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
src/Symfony/Component/Validator/Constraints/ChoiceValidator.php
Copy file name to clipboardExpand all lines: Tests/ContainerBuilderTest.php
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,13 @@ public function testAliases()
190
190
$this->assertTrue($builder->has('bar'), '->setAlias() defines a new service');
191
191
$this->assertTrue($builder->get('bar') === $builder->get('foo'), '->setAlias() creates a service that is an alias to another one');
192
192
193
+
try {
194
+
$builder->setAlias('foobar', 'foobar');
195
+
$this->fail('->setAlias() throws an InvalidArgumentException if the alias references itself');
196
+
} catch (\InvalidArgumentException$e) {
197
+
$this->assertEquals('An alias can not reference itself, got a circular reference on "foobar".', $e->getMessage(), '->setAlias() throws an InvalidArgumentException if the alias references itself');
198
+
}
199
+
193
200
try {
194
201
$builder->getAlias('foobar');
195
202
$this->fail('->getAlias() throws an InvalidArgumentException if the alias does not exist');
0 commit comments