Skip to content

Commit

Permalink
Fixed (mostly) yaml code blocks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wouterj committed Jan 21, 2014
1 parent 2a43a97 commit 7c0cf89
Show file tree
Hide file tree
Showing 36 changed files with 168 additions and 122 deletions.
16 changes: 8 additions & 8 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ applied to it (like: "the value for ``auto_connect`` must be a boolean value"):
default_connection: mysql
connections:
mysql:
host: localhost
driver: mysql
host: localhost
driver: mysql
username: user
password: pass
sqlite:
host: localhost
driver: sqlite
memory: true
host: localhost
driver: sqlite
memory: true
username: user
password: pass
Expand Down Expand Up @@ -473,9 +473,9 @@ in this config:
.. code-block:: yaml
connection:
name: my_mysql_connection
host: localhost
driver: mysql
name: my_mysql_connection
host: localhost
driver: mysql
username: user
password: pass
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ making the class of a service a parameter:
services:
mailer:
class: '%mailer.class%'
arguments: ['%mailer.transport%']
class: "%mailer.class%"
arguments: ["%mailer.transport%"]
.. code-block:: xml
Expand Down
8 changes: 4 additions & 4 deletions components/dependency_injection/parentservices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ 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"]]
Expand Down Expand Up @@ -196,7 +196,7 @@ a parent for a service.
- [setEmailFormatter, ["@my_email_formatter"]]
newsletter_manager:
class: "%newsletter_manager.class%"
class: "%newsletter_manager.class%"
parent: mail_manager
greeting_card_manager:
Expand Down Expand Up @@ -321,13 +321,13 @@ to the ``NewsletterManager`` class, the config would look like this:
- [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
2 changes: 1 addition & 1 deletion components/dependency_injection/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Another possibility is just setting public fields of the class directly::
my_mailer:
# ...
newsletter_manager:
class: NewsletterManager
class: NewsletterManager
properties:
mailer: "@my_mailer"
Expand Down
14 changes: 7 additions & 7 deletions cookbook/assetic/apply_to_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ An example configuration might look like this:
assetic:
filters:
coffee:
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [ /usr/lib/node_modules/ ]
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [/usr/lib/node_modules/]
.. code-block:: xml
Expand Down Expand Up @@ -130,10 +130,10 @@ applied to all ``.coffee`` files:
assetic:
filters:
coffee:
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [ /usr/lib/node_modules/ ]
apply_to: "\.coffee$"
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [/usr/lib/node_modules/]
apply_to: "\.coffee$"
.. code-block:: xml
Expand Down
2 changes: 2 additions & 0 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ your JavaScripts:
<!-- app/config/config.xml -->
<assetic:config>
<!-- bin: the path to the uglifyjs executable -->
<assetic:filter
name="uglifyjs2"
bin="/usr/local/bin/uglifyjs" />
Expand All @@ -86,6 +87,7 @@ your JavaScripts:
$container->loadFromExtension('assetic', array(
'filters' => array(
'uglifyjs2' => array(
// the path to the uglifyjs executable
'bin' => '/usr/local/bin/uglifyjs',
),
),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ in the core FrameworkBundle:
# app/config/config.yml
parameters:
translator.class: Acme\HelloBundle\Translation\Translator
translator.class: Acme\HelloBundle\Translation\Translator
.. code-block:: xml
Expand Down
3 changes: 0 additions & 3 deletions cookbook/bundles/prepend_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ for ``acme_hello`` is set to ``non_default``:
.. code-block:: yaml
# app/config/config.yml
acme_something:
# ...
use_acme_goodbye: false
Expand All @@ -112,7 +111,6 @@ for ``acme_hello`` is set to ``non_default``:
.. code-block:: xml
<!-- app/config/config.xml -->
<acme-something:config use-acme-goodbye="false">
<acme-something:entity-manager-name>non_default</acme-something:entity-manager-name>
</acme-something:config>
Expand All @@ -122,7 +120,6 @@ for ``acme_hello`` is set to ``non_default``:
.. code-block:: php
// app/config/config.php
$container->loadFromExtension('acme_something', array(
...,
'use_acme_goodbye' => false,
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/apache_router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To test that it's working, let's create a very basic route for the AcmeDemoBundl
# app/config/routing.yml
hello:
path: /hello/{name}
path: /hello/{name}
defaults: { _controller: AcmeDemoBundle:Demo:hello }
.. code-block:: xml
Expand Down
7 changes: 5 additions & 2 deletions cookbook/configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,21 @@ easily and transparently:
imports:
- { resource: config.yml }
# ...
.. code-block:: xml
<imports>
<import resource="config.xml" />
</imports>
<!-- ... -->
.. code-block:: php
$loader->import('config.php');
// ...
To share common configuration, each environment's configuration file
Expand Down Expand Up @@ -188,12 +191,12 @@ environment by using this code and changing the environment string.
doctrine:
dbal:
logging: "%kernel.debug%"
logging: "%kernel.debug%"
# ...
.. code-block:: xml
<doctrine:dbal logging="%kernel.debug%" ... />
<doctrine:dbal logging="%kernel.debug%" />
.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ configuration format of your choice):
framework:
session:
# ...
handler_id: session.handler.pdo
handler_id: session.handler.pdo
parameters:
pdo.db_options:
Expand Down
6 changes: 3 additions & 3 deletions cookbook/controller/service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Then you can define it as a service as follows:
services:
acme.hello.controller:
class: "%acme.controller.hello.class%"
class: "%acme.controller.hello.class%"
.. code-block:: xml
Expand Down Expand Up @@ -112,8 +112,8 @@ the route ``_controller`` value:
# app/config/routing.yml
hello:
path: /hello
defaults: { _controller: acme.hello.controller:indexAction }
path: /hello
defaults: { _controller: acme.hello.controller:indexAction }
.. code-block:: xml
Expand Down
6 changes: 4 additions & 2 deletions cookbook/doctrine/dbal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document
doctrine:
dbal:
types:
custom_first: Acme\HelloBundle\Type\CustomFirst
custom_first: Acme\HelloBundle\Type\CustomFirst
custom_second: Acme\HelloBundle\Type\CustomSecond
.. code-block:: xml
Expand Down Expand Up @@ -143,7 +143,7 @@ mapping type:
dbal:
connections:
default:
// Other connections parameters
# other connections parameters
mapping_types:
enum: string
Expand All @@ -160,6 +160,7 @@ mapping type:
<doctrine:dbal>
<doctrine:dbal default-connection="default">
<doctrine:connection>
<!-- other connections parameters -->
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
</doctrine:connection>
</doctrine:dbal>
Expand All @@ -173,6 +174,7 @@ mapping type:
'dbal' => array(
'connections' => array(
'default' => array(
// other connection parameers
'mapping_types' => array(
'enum' => 'string',
),
Expand Down
11 changes: 5 additions & 6 deletions cookbook/doctrine/multiple_entity_managers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following configuration code shows how you can configure two entity managers
doctrine:
dbal:
default_connection: default
default_connection: default
connections:
default:
driver: "%database_driver%"
Expand All @@ -44,22 +44,21 @@ The following configuration code shows how you can configure two entity managers
charset: UTF8
orm:
default_entity_manager: default
default_entity_manager: default
entity_managers:
default:
connection: default
connection: default
mappings:
AcmeDemoBundle: ~
AcmeDemoBundle: ~
AcmeStoreBundle: ~
customer:
connection: customer
connection: customer
mappings:
AcmeCustomerBundle: ~
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<srv:container xmlns="http://symfony.com/schema/dic/doctrine"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/doctrine/resolve_target_entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ about the replacement:
# app/config/config.yml
doctrine:
# ....
# ...
orm:
# ....
# ...
resolve_target_entities:
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: Acme\AppBundle\Entity\Customer
Expand Down
5 changes: 2 additions & 3 deletions cookbook/email/dev_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ via the ``delivery_address`` option:
# app/config/config_dev.yml
swiftmailer:
delivery_address: dev@example.com
delivery_address: dev@example.com
.. code-block:: xml
Expand All @@ -76,8 +76,7 @@ via the ``delivery_address`` option:
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd
-->
<swiftmailer:config
delivery-address="dev@example.com" />
<swiftmailer:config delivery-address="dev@example.com" />
.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion cookbook/email/gmail.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ You're done!
# app/config/parameters.yml
parameters:
...
# ...
mailer_transport: gmail
mailer_host: ~
mailer_user: your_gmail_username
Expand Down
4 changes: 1 addition & 3 deletions cookbook/form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ it with :ref:`dic-tags-form-type`.
class: Acme\DemoBundle\Form\Type\FriendMessageFormType
arguments: ["@security.context"]
tags:
-
name: form.type
alias: acme_friend_message
- { name: form.type, alias: acme_friend_message }
.. code-block:: xml
Expand Down
Loading

0 comments on commit 7c0cf89

Please sign in to comment.