Skip to content

More use single quotes for YAML strings #5992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2015
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
2 changes: 1 addition & 1 deletion best_practices/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ following ``translator`` configuration option and set your application locale:
# app/config/config.yml
framework:
# ...
translator: { fallbacks: ["%locale%"] }
translator: { fallbacks: ['%locale%'] }

# app/config/parameters.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion best_practices/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ name is irrelevant because you never use it in your own code):
services:
app.twig.app_extension:
class: AppBundle\Twig\AppExtension
arguments: ["@markdown"]
arguments: ['@markdown']
public: false
tags:
- { name: twig.extension }
Expand Down
12 changes: 6 additions & 6 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ straightforward. Parameters make defining services more organized and flexible:
services:
my_mailer:
class: Acme\HelloBundle\Mailer
arguments: ["%my_mailer.transport%"]
arguments: ['%my_mailer.transport%']

.. code-block:: xml

Expand Down Expand Up @@ -353,7 +353,7 @@ directories don't exist, create them.
services:
my_mailer:
class: Acme\HelloBundle\Mailer
arguments: ["%my_mailer.transport%"]
arguments: ['%my_mailer.transport%']

.. code-block:: xml

Expand Down Expand Up @@ -614,7 +614,7 @@ the service container gives you a much more appealing option:

newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
arguments: ["@my_mailer"]
arguments: ['@my_mailer']

.. code-block:: xml

Expand Down Expand Up @@ -700,7 +700,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
calls:
- [setMailer, ["@my_mailer"]]
- [setMailer, ['@my_mailer']]

.. code-block:: xml

Expand Down Expand Up @@ -762,7 +762,7 @@ it exists and do nothing if it doesn't:
services:
newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
arguments: ["@?my_mailer"]
arguments: ['@?my_mailer']

.. code-block:: xml

Expand Down Expand Up @@ -872,7 +872,7 @@ Configuring the service container is easy:
services:
newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
arguments: ["@mailer", "@templating"]
arguments: ['@mailer', '@templating']

.. code-block:: xml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# app/config/config.yml
imports:
- { resource: "%kernel.root_dir%/parameters.yml" }
- { resource: '%kernel.root_dir%/parameters.yml' }

.. code-block:: xml

Expand Down
8 changes: 4 additions & 4 deletions components/dependency_injection/configurators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,20 @@ The service config for the above classes would look something like this:

email_configurator:
class: EmailConfigurator
arguments: ["@email_formatter_manager"]
arguments: ['@email_formatter_manager']
# ...

newsletter_manager:
class: NewsletterManager
calls:
- [setMailer, ["@my_mailer"]]
configurator: ["@email_configurator", configure]
configurator: ['@email_configurator', configure]

greeting_card_manager:
class: GreetingCardManager
calls:
- [setMailer, ["@my_mailer"]]
configurator: ["@email_configurator", configure]
- [setMailer, ['@my_mailer']]
configurator: ['@email_configurator', configure]

.. code-block:: xml

Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ config files:
services:
mailer:
class: Mailer
arguments: ["%mailer.transport%"]
arguments: ['%mailer.transport%']
newsletter_manager:
class: NewsletterManager
calls:
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ the parameter value in one place if needed.

.. code-block:: yaml

arguments: ["http://symfony.com/?foo=%%s&bar=%%d"]
arguments: ['http://symfony.com/?foo=%%s&bar=%%d']

.. code-block:: xml

Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ For example you may add the following transports as services:
acme_mailer.transport.smtp:
class: \Swift_SmtpTransport
arguments:
- "%mailer_host%"
- '%mailer_host%'
tags:
- { name: acme_mailer.transport }
acme_mailer.transport.sendmail:
Expand Down Expand Up @@ -220,7 +220,7 @@ To answer this, change the service declaration:
acme_mailer.transport.smtp:
class: \Swift_SmtpTransport
arguments:
- "%mailer_host%"
- '%mailer_host%'
tags:
- { name: acme_mailer.transport, alias: foo }
acme_mailer.transport.sendmail:
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ service container configuration:
# ...
newsletter_manager:
class: NewsletterManager
arguments: ["@my_mailer"]
arguments: ['@my_mailer']

.. code-block:: xml

Expand Down
8 changes: 4 additions & 4 deletions components/yaml/yaml_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ YAML uses indentation with one or more spaces to describe nested collections:

.. code-block:: yaml

"symfony 1.0":
'symfony 1.0':
PHP: 5.0
Propel: 1.2
"symfony 1.2":
'symfony 1.2':
PHP: 5.2
Propel: 1.3

Expand Down Expand Up @@ -279,8 +279,8 @@ You can mix and match styles to achieve a better readability:

.. code-block:: yaml

"symfony 1.0": { PHP: 5.0, Propel: 1.2 }
"symfony 1.2": { PHP: 5.2, Propel: 1.3 }
'symfony 1.0': { PHP: 5.0, Propel: 1.2 }
'symfony 1.2': { PHP: 5.2, Propel: 1.3 }

Comments
--------
Expand Down
2 changes: 1 addition & 1 deletion cookbook/controller/service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ argument:
services:
app.hello_controller:
class: AppBundle\Controller\HelloController
arguments: ["@templating"]
arguments: ['@templating']

.. code-block:: xml

Expand Down
6 changes: 3 additions & 3 deletions cookbook/doctrine/mongodb_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ need to change/add some parameters in the main configuration file:
mongo_client:
class: MongoClient
# if using a username and password
arguments: ["mongodb://%mongodb_username%:%mongodb_password%@%mongodb_host%:27017"]
arguments: ['mongodb://%mongodb_username%:%mongodb_password%@%mongodb_host%:27017']
# if not using a username and password
arguments: ["mongodb://%mongodb_host%:27017"]
arguments: ['mongodb://%mongodb_host%:27017']
session.handler.mongo:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler
arguments: ["@mongo_client", "%mongo.session.options%"]
arguments: ['@mongo_client', '%mongo.session.options%']

.. code-block:: xml

Expand Down
8 changes: 4 additions & 4 deletions cookbook/doctrine/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To use it, you just need to change some parameters in the main configuration fil

session.handler.pdo:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
arguments: ["@pdo", "%pdo.db_options%"]
arguments: ['@pdo', '%pdo.db_options%']

.. code-block:: xml

Expand Down Expand Up @@ -152,9 +152,9 @@ of your project's data, you can use the connection settings from the
pdo:
class: PDO
arguments:
- "mysql:host=%database_host%;port=%database_port%;dbname=%database_name%"
- "%database_user%"
- "%database_password%"
- 'mysql:host=%database_host%;port=%database_port%;dbname=%database_name%'
- '%database_user%'
- '%database_password%'

.. code-block:: xml

Expand Down
4 changes: 2 additions & 2 deletions cookbook/event_dispatcher/before_after_filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ your listener to be called just before any controller is executed.
services:
app.tokens.action_listener:
class: AppBundle\EventListener\TokenListener
arguments: ["%tokens%"]
arguments: ['%tokens%']
tags:
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }

Expand Down Expand Up @@ -252,7 +252,7 @@ event:
services:
app.tokens.action_listener:
class: AppBundle\EventListener\TokenListener
arguments: ["%tokens%"]
arguments: ['%tokens%']
tags:
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
- { name: kernel.event_listener, event: kernel.response, method: onKernelResponse }
Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/create_custom_field_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ the ``genders`` parameter value as the first argument to its to-be-created
app.form.type.gender:
class: AppBundle\Form\Type\GenderType
arguments:
- "%genders%"
- '%genders%'
tags:
- { name: form.type, alias: gender }

Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ it's recognized as a custom field type:
services:
app.type.issue_selector:
class: AppBundle\Form\IssueSelectorType
arguments: ["@doctrine.orm.entity_manager"]
arguments: ['@doctrine.orm.entity_manager']
tags:
- { name: form.type, alias: issue_selector }

Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ it with :ref:`dic-tags-form-type`.
services:
app.form.friend_message:
class: AppBundle\Form\Type\FriendMessageFormType
arguments: ["@security.context"]
arguments: ['@security.context']
tags:
- { name: form.type, alias: friend_message }

Expand Down
6 changes: 3 additions & 3 deletions cookbook/logging/channels_handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ in all environments, or just ``config_prod.yml`` to happen only in ``prod``:
# log all messages (since debug is the lowest level)
level: debug
type: stream
path: "%kernel.logs_dir%/security.log"
path: '%kernel.logs_dir%/security.log'
channels: [security]

# an example of *not* logging security channel messages for this handler
main:
# ...
# channels: ["!security"]
# channels: ['!security']

.. code-block:: xml

Expand Down Expand Up @@ -139,7 +139,7 @@ need to tag your services:

# app/config/config.yml
monolog:
channels: ["foo", "bar"]
channels: ['foo', 'bar']

.. code-block:: xml

Expand Down
2 changes: 1 addition & 1 deletion cookbook/logging/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ option of your handler to ``rotating_file``:
handlers:
main:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%.log"
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
# max number of log files to keep
# defaults to zero, which means infinite files
Expand Down
2 changes: 1 addition & 1 deletion cookbook/logging/monolog_email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ get logged on the server as well as the emails being sent:
members: [streamed, buffered]
streamed:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
buffered:
type: buffer
Expand Down
2 changes: 1 addition & 1 deletion cookbook/profiler/matchers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ won't use it directly:
services:
app.super_admin_matcher:
class: AppBundle\Profiler\SuperAdminMatcher
arguments: ["@security.context"]
arguments: ['@security.context']
public: false

.. code-block:: xml
Expand Down
6 changes: 3 additions & 3 deletions cookbook/security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@ to service ids that do not exist yet: ``wsse.security.authentication.provider``
wsse.security.authentication.provider:
class: AppBundle\Security\Authentication\Provider\WsseProvider
arguments:
- "" # User Provider
- "%kernel.cache_dir%/security/nonces"
- '' # User Provider
- '%kernel.cache_dir%/security/nonces'
public: false

wsse.security.authentication.listener:
class: AppBundle\Security\Firewall\WsseListener
arguments: ["@security.context", "@security.authentication.manager"]
arguments: ['@security.context', '@security.authentication.manager']
public: false

.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/remember_me.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option:
main:
# ...
remember_me:
key: "%secret%"
key: '%secret%'
lifetime: 604800 # 1 week in seconds
path: /
# by default, the feature is enabled by checking a
Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/securing_services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Then in your service configuration, you can inject the service:
services:
newsletter_manager:
class: AppBundle\Newsletter\NewsletterManager
arguments: ["@security.context"]
arguments: ['@security.context']

.. code-block:: xml

Expand Down
4 changes: 2 additions & 2 deletions cookbook/service_container/scopes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Changing the scope of a service should be done in its definition:
greeting_card_manager:
class: AppBundle\Mail\GreetingCardManager
scope: request
arguments: ["@request"]
arguments: ['@request']

.. code-block:: xml

Expand Down Expand Up @@ -304,7 +304,7 @@ The service config for this class would look something like this:
services:
my_mailer:
class: AppBundle\Mail\Mailer
arguments: ["@service_container"]
arguments: ['@service_container']
# scope: container can be omitted as it is the default

.. code-block:: xml
Expand Down
4 changes: 2 additions & 2 deletions cookbook/session/locale_sticky_session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Then register the listener:
services:
app.locale_listener:
class: AppBundle\EventListener\LocaleListener
arguments: ["%kernel.default_locale%"]
arguments: ['%kernel.default_locale%']
tags:
- { name: kernel.event_subscriber }

Expand Down Expand Up @@ -171,7 +171,7 @@ Then register the listener:
services:
app.user_locale_listener:
class: AppBundle\EventListener\UserLocaleListener
arguments: ["@session"]
arguments: ['@session']
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }

Expand Down
2 changes: 1 addition & 1 deletion cookbook/web_services/php_soap_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ a ``HelloService`` object properly:
services:
hello_service:
class: Acme\SoapBundle\Services\HelloService
arguments: ["@mailer"]
arguments: ['@mailer']

.. code-block:: xml

Expand Down
Loading