Skip to content

Shouldn't be using invalid yaml in the code or docs for Plain Style Scalars starting with % #1770

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

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ information. By convention, this information is usually configured in an
# app/config/config.yml
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
dbname: %database_name%
user: %database_user%
password: %database_password%
driver: "%database_driver%"
host: "%database_host%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"

By separating the database information into a separate file, you can
easily keep different versions of the file on each server. You can also
Expand Down
8 changes: 4 additions & 4 deletions book/propel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ information. By convention, this information is usually configured in an

propel:
dbal:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%
driver: "%database_driver%"
user: "%database_user%"
password: "%database_password%"
dsn: "%database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%"

Now that Propel knows about your database, Symfony2 can create the database for
you:
Expand Down
12 changes: 6 additions & 6 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ straightforward. Parameters make defining services more organized and flexible:

services:
my_mailer:
class: %my_mailer.class%
class: "%my_mailer.class%"
arguments: [%my_mailer.transport%]

.. code-block:: xml
Expand Down Expand Up @@ -358,7 +358,7 @@ directories don't exist, create them.

services:
my_mailer:
class: %my_mailer.class%
class: "%my_mailer.class%"
arguments: [%my_mailer.transport%]

.. code-block:: xml
Expand Down Expand Up @@ -592,7 +592,7 @@ the service container gives us a much more appealing option:
my_mailer:
# ...
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
arguments: [@my_mailer]

.. code-block:: xml
Expand Down Expand Up @@ -679,7 +679,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
my_mailer:
# ...
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
calls:
- [ setMailer, [ @my_mailer ] ]

Expand Down Expand Up @@ -744,7 +744,7 @@ it exists and do nothing if it doesn't:

services:
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
arguments: [@?my_mailer]

.. code-block:: xml
Expand Down Expand Up @@ -843,7 +843,7 @@ Configuring the service container is easy:

services:
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
arguments: [@mailer, @templating]

.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ the service itself gets loaded. To do so, you can use the ``file`` directive.
services:
foo:
class: Example\Foo\Bar
file: %kernel.root_dir%/src/path/to/file/foo.php
file: "%kernel.root_dir%/src/path/to/file/foo.php"

.. code-block:: xml

Expand Down
14 changes: 7 additions & 7 deletions components/dependency_injection/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class:
newsletter_factory.class: NewsletterFactory
services:
newsletter_manager:
class: %newsletter_manager.class%
factory_class: %newsletter_factory.class%
class: "%newsletter_manager.class%"
factory_class: "%newsletter_factory.class%"
factory_method: get
.. code-block:: xml
Expand Down Expand Up @@ -92,9 +92,9 @@ factory itself as a service:
newsletter_factory.class: NewsletterFactory
services:
newsletter_factory:
class: %newsletter_factory.class%
class: "%newsletter_factory.class%"
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
factory_service: newsletter_factory
factory_method: get
Expand Down Expand Up @@ -156,9 +156,9 @@ in the previous example takes the ``templating`` service as an argument:
newsletter_factory.class: NewsletterFactory
services:
newsletter_factory:
class: %newsletter_factory.class%
class: "%newsletter_factory.class%"
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
factory_service: newsletter_factory
factory_method: get
arguments:
Expand Down Expand Up @@ -201,4 +201,4 @@ in the previous example takes the ``templating`` service as an argument:
'newsletter_factory'
)->setFactoryMethod(
'get'
);
);
20 changes: 10 additions & 10 deletions components/dependency_injection/parentservices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ The service config for these classes would look something like this:
my_email_formatter:
# ...
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
calls:
- [ setMailer, [ @my_mailer ] ]
- [ setEmailFormatter, [ @my_email_formatter] ]

greeting_card_manager:
class: %greeting_card_manager.class%
class: "%greeting_card_manager.class%"
calls:
- [ setMailer, [ @my_mailer ] ]
- [ setEmailFormatter, [ @my_email_formatter] ]
Expand Down Expand Up @@ -191,18 +191,18 @@ a parent for a service.
my_email_formatter:
# ...
mail_manager:
class: %mail_manager.class%
class: "%mail_manager.class%"
abstract: true
calls:
- [ setMailer, [ @my_mailer ] ]
- [ setEmailFormatter, [ @my_email_formatter] ]

newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
parent: mail_manager

greeting_card_manager:
class: %greeting_card_manager.class%
class: "%greeting_card_manager.class%"
parent: mail_manager

.. code-block:: xml
Expand Down Expand Up @@ -317,20 +317,20 @@ to the ``NewsletterManager`` class, the config would look like this:
my_email_formatter:
# ...
mail_manager:
class: %mail_manager.class%
class: "%mail_manager.class%"
abstract: true
calls:
- [ setMailer, [ @my_mailer ] ]
- [ setEmailFormatter, [ @my_email_formatter] ]

newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
parent: mail_manager
calls:
- [ setMailer, [ @my_alternative_mailer ] ]

greeting_card_manager:
class: %greeting_card_manager.class%
class: "%greeting_card_manager.class%"
parent: mail_manager

.. code-block:: xml
Expand Down Expand Up @@ -449,13 +449,13 @@ If you had the following config:
another_filter:
# ...
mail_manager:
class: %mail_manager.class%
class: "%mail_manager.class%"
abstract: true
calls:
- [ setFilter, [ @my_filter ] ]

newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
parent: mail_manager
calls:
- [ setFilter, [ @another_filter ] ]
Expand Down
6 changes: 3 additions & 3 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then, define the chain as a service:

services:
acme_mailer.transport_chain:
class: %acme_mailer.transport_chain.class%
class: "%acme_mailer.transport_chain.class%"

.. code-block:: xml

Expand Down Expand Up @@ -79,7 +79,7 @@ As an example we 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 @@ -211,7 +211,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
4 changes: 2 additions & 2 deletions cookbook/configuration/external_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ You can now reference these parameters wherever you need them.
dbal:
driver pdo_mysql
dbname: symfony2_project
user: %database.user%
password: %database.password%
user: "%database.user%"
password: "%database.password%"

.. code-block:: xml

Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ may need to modify the paths inside these files::
# ...
assetic:
# ...
read_from: %kernel.root_dir%/../../public_html
read_from: "%kernel.root_dir%/../../public_html"

Now you just need to dump the assets again and your application should
work:
Expand Down
4 changes: 2 additions & 2 deletions cookbook/configuration/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ parameter.ini by referencing the database-related parameters defined there:
class: PDO
arguments:
- "mysql:dbname=%database_name%"
- %database_user%
- %database_password%
- "%database_user%"
- "%database_password%"

.. code-block:: xml

Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/custom_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Now we make the user provider available as a service.

services:
webservice_user_provider:
class: %webservice_user_provider.class%
class: "%webservice_user_provider.class%"

.. code-block:: xml

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 @@ -79,7 +79,7 @@ Then in your service configuration, you can inject the service:

services:
newsletter_manager:
class: %newsletter_manager.class%
class: "%newsletter_manager.class%"
arguments: [@security.context]

.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion cookbook/service_container/scopes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ The service config for this class would look something like this:
my_mailer.class: Acme\HelloBundle\Mail\Mailer
services:
my_mailer:
class: %my_mailer.class%
class: "%my_mailer.class%"
arguments:
- "@service_container"
# scope: container can be omitted as it is the default
Expand Down
2 changes: 1 addition & 1 deletion cookbook/templating/global_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ system, which lets you isolate or reuse the value:
# app/config/config.yml
twig:
globals:
ga_tracking: %ga_tracking%
ga_tracking: "%ga_tracking%"

The same variable is available exactly as before.

Expand Down
8 changes: 4 additions & 4 deletions reference/configuration/assetic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Full Default Configuration
.. code-block:: yaml

assetic:
debug: %kernel.debug%
debug: "%kernel.debug%"
use_controller:
enabled: %kernel.debug%
enabled: "%kernel.debug%"
profiler: false
read_from: %kernel.root_dir%/../web
write_to: %assetic.read_from%
read_from: "%kernel.root_dir%/../web"
write_to: "%assetic.read_from%"
java: /usr/bin/java
node: /usr/bin/node
ruby: /usr/bin/ruby
Expand Down
14 changes: 7 additions & 7 deletions reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Configuration Reference
MultipleActiveResultSets: ~
driver: pdo_mysql
platform_service: ~
logging: %kernel.debug%
profiling: %kernel.debug%
logging: "%kernel.debug%"
profiling: "%kernel.debug%"
driver_class: ~
wrapper_class: ~
options:
Expand Down Expand Up @@ -103,7 +103,7 @@ Configuration Reference
orm:
default_entity_manager: ~
auto_generate_proxy_classes: false
proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies
proxy_dir: "%kernel.cache_dir%/doctrine/orm/Proxies"
proxy_namespace: Proxies
# search for the "ResolveTargetEntityListener" class for a cookbook about this
resolve_target_entities: []
Expand Down Expand Up @@ -239,7 +239,7 @@ the ORM resolves to:
# the standard distribution overrides this to be true in debug, false otherwise
auto_generate_proxy_classes: false
proxy_namespace: Proxies
proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies
proxy_dir: "%kernel.cache_dir%/doctrine/orm/Proxies"
default_entity_manager: default
metadata_cache_driver: array
query_cache_driver: array
Expand Down Expand Up @@ -337,12 +337,12 @@ can configure. The following block shows all possible configuration keys:
driver_class: MyNamespace\MyDriverImpl
options:
foo: bar
path: %kernel.data_dir%/data.sqlite
path: "%kernel.data_dir%/data.sqlite"
memory: true
unix_socket: /tmp/mysql.sock
wrapper_class: MyDoctrineDbalConnectionWrapper
charset: UTF8
logging: %kernel.debug%
logging: "%kernel.debug%"
platform_service: MyOwnDatabasePlatformService
mapping_types:
enum: string
Expand Down Expand Up @@ -405,4 +405,4 @@ which is the first one defined or the one configured via the
Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
service where ``[name]`` if the name of the connection.

.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/index.html
.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/index.html
Loading