From e36fea8a633169947e7b0ef7d57d8afe04c18a1f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Oct 2015 13:56:51 +0100 Subject: [PATCH] fixed YAML files missing quotes when a string starts with @ --- .../Tests/Functional/app/Fragment/routing.yml | 2 +- .../Tests/Functional/app/Profiler/routing.yml | 2 +- .../Tests/Functional/app/Session/routing.yml | 2 +- .../Tests/Functional/app/CsrfFormLogin/config.yml | 2 +- .../Tests/Functional/app/CsrfFormLogin/routing.yml | 2 +- .../Tests/Functional/app/StandardFormLogin/routing.yml | 4 ++-- .../Component/DependencyInjection/Dumper/YamlDumper.php | 6 +++--- .../DependencyInjection/Tests/Fixtures/yaml/services2.yml | 4 ++-- .../DependencyInjection/Tests/Fixtures/yaml/services6.yml | 6 +++--- .../DependencyInjection/Tests/Fixtures/yaml/services9.yml | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml index c119432a48..8a9bd84b14 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml @@ -1,2 +1,2 @@ _fragmenttest_bundle: - resource: @TestBundle/Resources/config/routing.yml + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml index 508a6b2f5c..d4b77c3f70 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml @@ -1,2 +1,2 @@ _sessiontest_bundle: - resource: @TestBundle/Resources/config/routing.yml + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml index 508a6b2f5c..d4b77c3f70 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml @@ -1,2 +1,2 @@ _sessiontest_bundle: - resource: @TestBundle/Resources/config/routing.yml + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml index e0347e1dc4..d77013a219 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml @@ -6,7 +6,7 @@ services: class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginFormType scope: request arguments: - - @request + - '@request' tags: - { name: form.type, alias: user_login } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml index e2e84d9fe5..ecfae00918 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml @@ -1,2 +1,2 @@ _csrf_form_login_bundle: - resource: @CsrfFormLoginBundle/Resources/config/routing.yml + resource: '@CsrfFormLoginBundle/Resources/config/routing.yml' diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml index 6c408c150d..0920ea1d70 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml @@ -1,5 +1,5 @@ _form_login_bundle: - resource: @FormLoginBundle/Resources/config/routing.yml + resource: '@FormLoginBundle/Resources/config/routing.yml' _form_login_localized: - resource: @FormLoginBundle/Resources/config/localized_routing.yml + resource: '@FormLoginBundle/Resources/config/localized_routing.yml' diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index c5f98b6202..eca056dea1 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -157,10 +157,10 @@ class YamlDumper extends Dumper private function addServiceAlias($alias, $id) { if ($id->isPublic()) { - return sprintf(" %s: @%s\n", $alias, $id); - } else { - return sprintf(" %s:\n alias: %s\n public: false", $alias, $id); + return sprintf(" %s: '@%s'\n", $alias, $id); } + + return sprintf(" %s:\n alias: %s\n public: false", $alias, $id); } /** diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml index 3c127466af..b62d5ccfb5 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml @@ -6,7 +6,7 @@ parameters: - 0 - 1000.3 bar: foo - escape: @@escapeme - foo_bar: @foo_bar + escape: '@@escapeme' + foo_bar: '@foo_bar' MixedCase: MixedCaseKey: value diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml index 7ba9453bdd..d9dc85265f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml @@ -6,7 +6,7 @@ services: scope.prototype: { class: FooClass, scope: prototype } constructor: { class: FooClass, factory_method: getInstance } file: { class: FooClass, file: %path%/foo.php } - arguments: { class: FooClass, arguments: [foo, @foo, [true, false]] } + arguments: { class: FooClass, arguments: [foo, '@foo', [true, false]] } configurator1: { class: FooClass, configurator: sc_configure } configurator2: { class: FooClass, configurator: [@baz, configure] } configurator3: { class: FooClass, configurator: [BazClass, configureStatic] } @@ -18,8 +18,8 @@ services: method_call2: class: FooClass calls: - - [ setBar, [ foo, @foo, [true, false] ] ] - alias_for_foo: @foo + - [ setBar, [ foo, '@foo', [true, false] ] ] + alias_for_foo: '@foo' another_alias_for_foo: alias: foo public: false diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml index cda41b2cce..c6181ed549 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml @@ -69,5 +69,5 @@ services: calls: - [setRequest, ['@?request']] - alias_for_foo: @foo - alias_for_alias: @foo + alias_for_foo: '@foo' + alias_for_alias: '@foo'