Skip to content

Commit 0a3acae

Browse files
committed
minor #5955 use single quotes for YAML strings (snoek09)
This PR was squashed before being merged into the 2.3 branch (closes #5955). Discussion ---------- use single quotes for YAML strings | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #5935 Commits ------- 81b96b6 use single quotes for YAML strings
2 parents e48c528 + 81b96b6 commit 0a3acae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+125
-125
lines changed

best_practices/business-logic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ the class namespace as a parameter:
145145
146146
services:
147147
app.slugger:
148-
class: "%slugger.class%"
148+
class: '%slugger.class%'
149149
150150
This practice is cumbersome and completely unnecessary for your own services:
151151

best_practices/controllers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ configuration to the main routing configuration file:
4343
4444
# app/config/routing.yml
4545
app:
46-
resource: "@AppBundle/Controller/"
46+
resource: '@AppBundle/Controller/'
4747
type: annotation
4848
4949
This configuration will load annotations from any controller stored inside the

book/configuration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ format you prefer:
2121
- { resource: security.yml }
2222
2323
framework:
24-
secret: "%secret%"
25-
router: { resource: "%kernel.root_dir%/config/routing.yml" }
24+
secret: '%secret%'
25+
router: { resource: '%kernel.root_dir%/config/routing.yml' }
2626
# ...
2727
2828
# Twig Configuration
2929
twig:
30-
debug: "%kernel.debug%"
31-
strict_variables: "%kernel.debug%"
30+
debug: '%kernel.debug%'
31+
strict_variables: '%kernel.debug%'
3232
3333
# ...
3434
@@ -226,7 +226,7 @@ the configuration file for the ``dev`` environment.
226226
- { resource: config.yml }
227227
228228
framework:
229-
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
229+
router: { resource: '%kernel.root_dir%/config/routing_dev.yml' }
230230
profiler: { only_exceptions: false }
231231
232232
# ...

book/doctrine.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ information. By convention, this information is usually configured in an
6464
# app/config/config.yml
6565
doctrine:
6666
dbal:
67-
driver: "%database_driver%"
68-
host: "%database_host%"
69-
dbname: "%database_name%"
70-
user: "%database_user%"
71-
password: "%database_password%"
67+
driver: '%database_driver%'
68+
host: '%database_host%'
69+
dbname: '%database_name%'
70+
user: '%database_user%'
71+
password: '%database_password%'
7272
7373
.. code-block:: xml
7474
@@ -162,7 +162,7 @@ for you:
162162
doctrine:
163163
dbal:
164164
driver: pdo_sqlite
165-
path: "%kernel.root_dir%/sqlite.db"
165+
path: '%kernel.root_dir%/sqlite.db'
166166
charset: UTF8
167167
168168
.. code-block:: xml

book/page_creation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,14 @@ is ``app/config/config.yml``:
477477
# ...
478478
479479
framework:
480-
secret: "%secret%"
480+
secret: '%secret%'
481481
router:
482-
resource: "%kernel.root_dir%/config/routing.yml"
482+
resource: '%kernel.root_dir%/config/routing.yml'
483483
# ...
484484
485485
twig:
486-
debug: "%kernel.debug%"
487-
strict_variables: "%kernel.debug%"
486+
debug: '%kernel.debug%'
487+
strict_variables: '%kernel.debug%'
488488
489489
# ...
490490

book/routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ file:
168168
# app/config/config.yml
169169
framework:
170170
# ...
171-
router: { resource: "%kernel.root_dir%/config/routing.yml" }
171+
router: { resource: '%kernel.root_dir%/config/routing.yml' }
172172
173173
.. code-block:: xml
174174
@@ -1181,7 +1181,7 @@ configuration:
11811181
11821182
# app/config/routing.yml
11831183
app:
1184-
resource: "@AppBundle/Controller/"
1184+
resource: '@AppBundle/Controller/'
11851185
type: annotation # required to enable the Annotation reader for this resource
11861186
11871187
.. code-block:: xml
@@ -1232,7 +1232,7 @@ directory are parsed and put into the routing.
12321232
12331233
# app/config/routing.yml
12341234
app:
1235-
resource: "@AcmeOtherBundle/Resources/config/routing.yml"
1235+
resource: '@AcmeOtherBundle/Resources/config/routing.yml'
12361236
12371237
.. code-block:: xml
12381238
@@ -1271,7 +1271,7 @@ suppose you want to prefix all routes in the AppBundle with ``/site`` (e.g.
12711271
12721272
# app/config/routing.yml
12731273
app:
1274-
resource: "@AppBundle/Controller/"
1274+
resource: '@AppBundle/Controller/'
12751275
type: annotation
12761276
prefix: /site
12771277

book/service_container.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ parameter and uses it in the service definition.
259259
260260
# app/config/parameters.yml
261261
parameters:
262-
# This will be parsed as string "@securepass"
263-
mailer_password: "@@securepass"
262+
# This will be parsed as string '@securepass'
263+
mailer_password: '@@securepass'
264264
265265
.. note::
266266

@@ -398,7 +398,7 @@ configuration.
398398
399399
# app/config/config.yml
400400
imports:
401-
- { resource: "@AcmeHelloBundle/Resources/config/services.yml" }
401+
- { resource: '@AcmeHelloBundle/Resources/config/services.yml' }
402402
403403
.. code-block:: xml
404404
@@ -475,7 +475,7 @@ invokes the service container extension inside the FrameworkBundle:
475475
secret: xxxxxxxxxx
476476
form: true
477477
csrf_protection: true
478-
router: { resource: "%kernel.root_dir%/config/routing.yml" }
478+
router: { resource: '%kernel.root_dir%/config/routing.yml' }
479479
# ...
480480
481481
.. code-block:: xml

book/translation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ not empty, add the following:
615615
AppBundle\Entity\Author:
616616
properties:
617617
name:
618-
- NotBlank: { message: "author.name.not_blank" }
618+
- NotBlank: { message: 'author.name.not_blank' }
619619
620620
.. code-block:: xml
621621

book/validation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ rules). In order to validate an object, simply map one or more constraints
302302
to its class and then pass it to the ``validator`` service.
303303

304304
Behind the scenes, a constraint is simply a PHP object that makes an assertive
305-
statement. In real life, a constraint could be: "The cake must not be burned".
305+
statement. In real life, a constraint could be: 'The cake must not be burned'.
306306
In Symfony, constraints are similar: they are assertions that a condition
307307
is true. Given a value, a constraint will tell you if that value
308308
adheres to the rules of the constraint.
@@ -639,7 +639,7 @@ this method must return ``true``:
639639
AppBundle\Entity\Author:
640640
getters:
641641
passwordLegal:
642-
- "True": { message: "The password cannot match your first name" }
642+
- 'True': { message: 'The password cannot match your first name' }
643643
644644
.. code-block:: xml
645645
@@ -945,8 +945,8 @@ username and the password are different only if all other validation passes
945945
- Strict
946946
getters:
947947
passwordLegal:
948-
- "True":
949-
message: "The password cannot match your username"
948+
- 'True':
949+
message: 'The password cannot match your username'
950950
groups: [Strict]
951951
properties:
952952
username:

components/dependency_injection/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ service by asking for the ``bar`` service like this::
128128
services:
129129
foo:
130130
class: Example\Foo
131-
bar: "@foo"
131+
bar: '@foo'

0 commit comments

Comments
 (0)