Skip to content

enclose YAML strings containing % with quotes #4030

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 2 commits into from
Jul 29, 2014
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 book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ file:
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config ...>
<framework:config>
<framework:templating>
<framework:form>
<framework:resource>AcmeTaskBundle:Form</framework:resource>
Expand Down
6 changes: 3 additions & 3 deletions book/http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,13 @@ First, to use ESI, be sure to enable it in your application configuration:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config ...>
<framework:config>
<!-- ... -->
<framework:esi enabled="true" />
</framework:config>

</container>

.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion book/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ If you enable the web profiler, you also need to mount the profiler routes:
.. code-block:: yaml

_profiler:
resource: @WebProfilerBundle/Resources/config/routing/profiler.xml
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler

.. code-block:: xml
Expand Down
6 changes: 3 additions & 3 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ the service container gives you a much more appealing option:
</parameters>

<services>
<service id="my_mailer" ...>
<service id="my_mailer">
<!-- ... -->
</service>
<service id="newsletter_manager" class="%newsletter_manager.class%">
Expand Down Expand Up @@ -726,7 +726,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
</parameters>

<services>
<service id="my_mailer" ...>
<service id="my_mailer">
<!-- ... -->
</service>
<service id="newsletter_manager" class="%newsletter_manager.class%">
Expand Down Expand Up @@ -794,7 +794,7 @@ it exists and do nothing if it doesn't:
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="my_mailer" ...>
<service id="my_mailer">
<!-- ... -->
</service>
<service id="newsletter_manager" class="%newsletter_manager.class%">
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/configurators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ The service config for the above classes would look something like this:
.. code-block:: xml

<services>
<service id="my_mailer" ...>
<service id="my_mailer">
<!-- ... -->
</service>
<service id="email_formatter_manager" class="EmailFormatterManager">
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/using_parameters_in_dic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Now, examine the results to see this closely:
# true, as expected

my_bundle:
logging: %kernel.debug%
logging: "%kernel.debug%"
# true/false (depends on 2nd parameter of AppKernel),
# as expected, because %kernel.debug% inside configuration
# gets evaluated before being passed to the extension
Expand Down
8 changes: 4 additions & 4 deletions cookbook/form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ we talk about next!).
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

<entity name="Acme\TaskBundle\Entity\Task" ...>
<entity name="Acme\TaskBundle\Entity\Task">
<!-- ... -->
<one-to-many field="tags" target-entity="Tag">
<cascade>
Expand Down Expand Up @@ -609,7 +609,7 @@ First, add a "delete this tag" link to each tag form:
jQuery(document).ready(function() {
// Get the ul that holds the collection of tags
$collectionHolder = $('ul.tags');

// add a delete link to all of the existing tag form li elements
$collectionHolder.find('li').each(function() {
addTagFormDeleteLink($(this));
Expand Down Expand Up @@ -667,9 +667,9 @@ the relationship between the removed ``Tag`` and ``Task`` object.
is handling the "update" of your Task::

// src/Acme/TaskBundle/Controller/TaskController.php

use Doctrine\Common\Collections\ArrayCollection;

// ...
public function editAction($id, Request $request)
{
Expand Down
6 changes: 3 additions & 3 deletions cookbook/templating/global_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This is possible inside your ``app/config/config.yml`` file:
.. code-block:: xml

<!-- app/config/config.xml -->
<twig:config ...>
<twig:config>
<!-- ... -->
<twig:global key="ga_tracking">UA-xxxxx-x</twig:global>
</twig:config>
Expand Down Expand Up @@ -67,7 +67,7 @@ system, which lets you isolate or reuse the value:
.. code-block:: xml

<!-- app/config/config.xml -->
<twig:config ...>
<twig:config>
<twig:global key="ga_tracking">%ga_tracking%</twig:global>
</twig:config>

Expand Down Expand Up @@ -111,7 +111,7 @@ This should feel familiar, as it's the same syntax you use in service configurat
.. code-block:: xml

<!-- app/config/config.xml -->
<twig:config ...>
<twig:config>
<!-- ... -->
<twig:global key="user_management">@acme_user.user_management</twig:global>
</twig:config>
Expand Down
8 changes: 4 additions & 4 deletions reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Full default configuration
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 @@ -106,7 +106,7 @@ Full default configuration
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 @@ -416,7 +416,7 @@ Shortened Configuration Syntax
------------------------------

When you are only using one entity manager, all config options available
can be placed directly under ``doctrine.orm`` config level.
can be placed directly under ``doctrine.orm`` config level.

.. code-block:: yaml

Expand Down
22 changes: 11 additions & 11 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ have installed `PhpStormOpener`_ and use PHPstorm, you will do something like:

framework:
ide: "pstorm://%%f:%%l"

.. code-block:: xml

<?xml version="1.0" charset="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/service"
xmlns:framework="http://symfony.com/schema/dic/symfony">

<framework:config ide="pstorm://%%f:%%l" />

</container>

.. code-block:: php

$container->loadFromExtension('framework', array(
'ide' => 'pstorm://%%f:%%l',
));
Expand Down Expand Up @@ -536,7 +536,7 @@ Full default Configuration
gc_divisor: ~
gc_probability: ~
gc_maxlifetime: ~
save_path: %kernel.cache_dir%/sessions
save_path: "%kernel.cache_dir%/sessions"

# serializer configuration
serializer:
Expand All @@ -545,7 +545,7 @@ Full default Configuration
# templating configuration
templating:
assets_version: ~
assets_version_format: %%s?%%s
assets_version_format: "%%s?%%s"
hinclude_default_template: ~
form:
resources:
Expand All @@ -566,7 +566,7 @@ Full default Configuration
# Prototype
name:
version: ~
version_format: %%s?%%s
version_format: "%%s?%%s"
base_urls:
http: []
ssl: []
Expand All @@ -586,8 +586,8 @@ Full default Configuration
# annotation configuration
annotations:
cache: file
file_cache_dir: %kernel.cache_dir%/annotations
debug: %kernel.debug%
file_cache_dir: "%kernel.cache_dir%/annotations"
debug: "%kernel.debug%"

.. _`protocol-relative`: http://tools.ietf.org/html/rfc3986#section-4.2
.. _`PhpStormOpener`: https://github.com/pinepain/PhpStormOpener