Skip to content

Commit 7c0cf89

Browse files
committed
Fixed (mostly) yaml code blocks
Initial idea was to fix the highlighting. While doing that, others things also got a fix: * indenting * missing formats * some `...` in XML elements * missing comments in other formats
1 parent 2a43a97 commit 7c0cf89

36 files changed

+168
-122
lines changed

components/config/definition.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ applied to it (like: "the value for ``auto_connect`` must be a boolean value"):
2121
default_connection: mysql
2222
connections:
2323
mysql:
24-
host: localhost
25-
driver: mysql
24+
host: localhost
25+
driver: mysql
2626
username: user
2727
password: pass
2828
sqlite:
29-
host: localhost
30-
driver: sqlite
31-
memory: true
29+
host: localhost
30+
driver: sqlite
31+
memory: true
3232
username: user
3333
password: pass
3434
@@ -473,9 +473,9 @@ in this config:
473473
.. code-block:: yaml
474474
475475
connection:
476-
name: my_mysql_connection
477-
host: localhost
478-
driver: mysql
476+
name: my_mysql_connection
477+
host: localhost
478+
driver: mysql
479479
username: user
480480
password: pass
481481

components/dependency_injection/parameters.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ making the class of a service a parameter:
134134
135135
services:
136136
mailer:
137-
class: '%mailer.class%'
138-
arguments: ['%mailer.transport%']
137+
class: "%mailer.class%"
138+
arguments: ["%mailer.transport%"]
139139
140140
.. code-block:: xml
141141

components/dependency_injection/parentservices.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The service config for these classes would look something like this:
6262
my_email_formatter:
6363
# ...
6464
newsletter_manager:
65-
class: "%newsletter_manager.class%"
65+
class: "%newsletter_manager.class%"
6666
calls:
6767
- [setMailer, ["@my_mailer"]]
6868
- [setEmailFormatter, ["@my_email_formatter"]]
@@ -196,7 +196,7 @@ a parent for a service.
196196
- [setEmailFormatter, ["@my_email_formatter"]]
197197
198198
newsletter_manager:
199-
class: "%newsletter_manager.class%"
199+
class: "%newsletter_manager.class%"
200200
parent: mail_manager
201201
202202
greeting_card_manager:
@@ -321,13 +321,13 @@ to the ``NewsletterManager`` class, the config would look like this:
321321
- [setEmailFormatter, ["@my_email_formatter"]]
322322
323323
newsletter_manager:
324-
class: "%newsletter_manager.class%"
324+
class: "%newsletter_manager.class%"
325325
parent: mail_manager
326326
calls:
327327
- [setMailer, ["@my_alternative_mailer"]]
328328
329329
greeting_card_manager:
330-
class: "%greeting_card_manager.class%"
330+
class: "%greeting_card_manager.class%"
331331
parent: mail_manager
332332
333333
.. code-block:: xml

components/dependency_injection/types.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Another possibility is just setting public fields of the class directly::
184184
my_mailer:
185185
# ...
186186
newsletter_manager:
187-
class: NewsletterManager
187+
class: NewsletterManager
188188
properties:
189189
mailer: "@my_mailer"
190190

cookbook/assetic/apply_to_option.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ An example configuration might look like this:
2020
assetic:
2121
filters:
2222
coffee:
23-
bin: /usr/bin/coffee
24-
node: /usr/bin/node
25-
node_paths: [ /usr/lib/node_modules/ ]
23+
bin: /usr/bin/coffee
24+
node: /usr/bin/node
25+
node_paths: [/usr/lib/node_modules/]
2626
2727
.. code-block:: xml
2828
@@ -130,10 +130,10 @@ applied to all ``.coffee`` files:
130130
assetic:
131131
filters:
132132
coffee:
133-
bin: /usr/bin/coffee
134-
node: /usr/bin/node
135-
node_paths: [ /usr/lib/node_modules/ ]
136-
apply_to: "\.coffee$"
133+
bin: /usr/bin/coffee
134+
node: /usr/bin/node
135+
node_paths: [/usr/lib/node_modules/]
136+
apply_to: "\.coffee$"
137137
138138
.. code-block:: xml
139139

cookbook/assetic/uglifyjs.rst

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ your JavaScripts:
7575
7676
<!-- app/config/config.xml -->
7777
<assetic:config>
78+
<!-- bin: the path to the uglifyjs executable -->
7879
<assetic:filter
7980
name="uglifyjs2"
8081
bin="/usr/local/bin/uglifyjs" />
@@ -86,6 +87,7 @@ your JavaScripts:
8687
$container->loadFromExtension('assetic', array(
8788
'filters' => array(
8889
'uglifyjs2' => array(
90+
// the path to the uglifyjs executable
8991
'bin' => '/usr/local/bin/uglifyjs',
9092
),
9193
),

cookbook/bundles/override.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ in the core FrameworkBundle:
5353
5454
# app/config/config.yml
5555
parameters:
56-
translator.class: Acme\HelloBundle\Translation\Translator
56+
translator.class: Acme\HelloBundle\Translation\Translator
5757
5858
.. code-block:: xml
5959

cookbook/bundles/prepend_extension.rst

-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ for ``acme_hello`` is set to ``non_default``:
9999
.. code-block:: yaml
100100
101101
# app/config/config.yml
102-
103102
acme_something:
104103
# ...
105104
use_acme_goodbye: false
@@ -112,7 +111,6 @@ for ``acme_hello`` is set to ``non_default``:
112111
.. code-block:: xml
113112
114113
<!-- app/config/config.xml -->
115-
116114
<acme-something:config use-acme-goodbye="false">
117115
<acme-something:entity-manager-name>non_default</acme-something:entity-manager-name>
118116
</acme-something:config>
@@ -122,7 +120,6 @@ for ``acme_hello`` is set to ``non_default``:
122120
.. code-block:: php
123121
124122
// app/config/config.php
125-
126123
$container->loadFromExtension('acme_something', array(
127124
...,
128125
'use_acme_goodbye' => false,

cookbook/configuration/apache_router.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To test that it's working, let's create a very basic route for the AcmeDemoBundl
6060
6161
# app/config/routing.yml
6262
hello:
63-
path: /hello/{name}
63+
path: /hello/{name}
6464
defaults: { _controller: AcmeDemoBundle:Demo:hello }
6565
6666
.. code-block:: xml

cookbook/configuration/environments.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,21 @@ easily and transparently:
6464
6565
imports:
6666
- { resource: config.yml }
67+
6768
# ...
6869
6970
.. code-block:: xml
7071
7172
<imports>
7273
<import resource="config.xml" />
7374
</imports>
75+
7476
<!-- ... -->
7577
7678
.. code-block:: php
7779
7880
$loader->import('config.php');
81+
7982
// ...
8083
8184
To share common configuration, each environment's configuration file
@@ -188,12 +191,12 @@ environment by using this code and changing the environment string.
188191
189192
doctrine:
190193
dbal:
191-
logging: "%kernel.debug%"
194+
logging: "%kernel.debug%"
192195
# ...
193196
194197
.. code-block:: xml
195198
196-
<doctrine:dbal logging="%kernel.debug%" ... />
199+
<doctrine:dbal logging="%kernel.debug%" />
197200
198201
.. code-block:: php
199202

cookbook/configuration/pdo_session_storage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ configuration format of your choice):
2929
framework:
3030
session:
3131
# ...
32-
handler_id: session.handler.pdo
32+
handler_id: session.handler.pdo
3333
3434
parameters:
3535
pdo.db_options:

cookbook/controller/service.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Then you can define it as a service as follows:
6060
6161
services:
6262
acme.hello.controller:
63-
class: "%acme.controller.hello.class%"
63+
class: "%acme.controller.hello.class%"
6464
6565
.. code-block:: xml
6666
@@ -112,8 +112,8 @@ the route ``_controller`` value:
112112
113113
# app/config/routing.yml
114114
hello:
115-
path: /hello
116-
defaults: { _controller: acme.hello.controller:indexAction }
115+
path: /hello
116+
defaults: { _controller: acme.hello.controller:indexAction }
117117
118118
.. code-block:: xml
119119

cookbook/doctrine/dbal.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document
9292
doctrine:
9393
dbal:
9494
types:
95-
custom_first: Acme\HelloBundle\Type\CustomFirst
95+
custom_first: Acme\HelloBundle\Type\CustomFirst
9696
custom_second: Acme\HelloBundle\Type\CustomSecond
9797
9898
.. code-block:: xml
@@ -143,7 +143,7 @@ mapping type:
143143
dbal:
144144
connections:
145145
default:
146-
// Other connections parameters
146+
# other connections parameters
147147
mapping_types:
148148
enum: string
149149
@@ -160,6 +160,7 @@ mapping type:
160160
<doctrine:dbal>
161161
<doctrine:dbal default-connection="default">
162162
<doctrine:connection>
163+
<!-- other connections parameters -->
163164
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
164165
</doctrine:connection>
165166
</doctrine:dbal>
@@ -173,6 +174,7 @@ mapping type:
173174
'dbal' => array(
174175
'connections' => array(
175176
'default' => array(
177+
// other connection parameers
176178
'mapping_types' => array(
177179
'enum' => 'string',
178180
),

cookbook/doctrine/multiple_entity_managers.rst

+5-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following configuration code shows how you can configure two entity managers
2424
2525
doctrine:
2626
dbal:
27-
default_connection: default
27+
default_connection: default
2828
connections:
2929
default:
3030
driver: "%database_driver%"
@@ -44,22 +44,21 @@ The following configuration code shows how you can configure two entity managers
4444
charset: UTF8
4545
4646
orm:
47-
default_entity_manager: default
47+
default_entity_manager: default
4848
entity_managers:
4949
default:
50-
connection: default
50+
connection: default
5151
mappings:
52-
AcmeDemoBundle: ~
52+
AcmeDemoBundle: ~
5353
AcmeStoreBundle: ~
5454
customer:
55-
connection: customer
55+
connection: customer
5656
mappings:
5757
AcmeCustomerBundle: ~
5858
5959
.. code-block:: xml
6060
6161
<?xml version="1.0" encoding="UTF-8"?>
62-
6362
<srv:container xmlns="http://symfony.com/schema/dic/doctrine"
6463
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6564
xmlns:srv="http://symfony.com/schema/dic/services"

cookbook/doctrine/resolve_target_entity.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ about the replacement:
114114
115115
# app/config/config.yml
116116
doctrine:
117-
# ....
117+
# ...
118118
orm:
119-
# ....
119+
# ...
120120
resolve_target_entities:
121121
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: Acme\AppBundle\Entity\Customer
122122

cookbook/email/dev_environment.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ via the ``delivery_address`` option:
6565
6666
# app/config/config_dev.yml
6767
swiftmailer:
68-
delivery_address: [email protected]
68+
delivery_address: [email protected]
6969
7070
.. code-block:: xml
7171
@@ -76,8 +76,7 @@ via the ``delivery_address`` option:
7676
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd
7777
-->
7878
79-
<swiftmailer:config
80-
delivery-address="[email protected]" />
79+
<swiftmailer:config delivery-address="[email protected]" />
8180
8281
.. code-block:: php
8382

cookbook/email/gmail.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ You're done!
5959
6060
# app/config/parameters.yml
6161
parameters:
62-
...
62+
# ...
6363
mailer_transport: gmail
6464
mailer_host: ~
6565
mailer_user: your_gmail_username

cookbook/form/dynamic_form_modification.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,7 @@ it with :ref:`dic-tags-form-type`.
407407
class: Acme\DemoBundle\Form\Type\FriendMessageFormType
408408
arguments: ["@security.context"]
409409
tags:
410-
-
411-
name: form.type
412-
alias: acme_friend_message
410+
- { name: form.type, alias: acme_friend_message }
413411
414412
.. code-block:: xml
415413

0 commit comments

Comments
 (0)