Permalink
Browse files

minor #3497 Fix highlighting (WouterJ)

This PR was merged into the 2.3 branch.

Discussion
----------

Fix highlighting

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

| Q   | A
| --- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets | partially #1886

Commits
-------

7c0cf89 Fixed (mostly) yaml code blocks
2a43a97 Fixed YAML code blocks in the book
  • Loading branch information...
weaverryan committed Jan 22, 2014
2 parents 30f94a6 + 7c0cf89 commit 2b7e0f6f2f9982e600918f447852a6f4c60966a1
Showing with 185 additions and 138 deletions.
  1. +4 −4 book/propel.rst
  2. +11 −10 book/security.rst
  3. +2 −2 book/translation.rst
  4. +8 −8 components/config/definition.rst
  5. +2 −2 components/dependency_injection/parameters.rst
  6. +4 −4 components/dependency_injection/parentservices.rst
  7. +1 −1 components/dependency_injection/types.rst
  8. +7 −7 cookbook/assetic/apply_to_option.rst
  9. +2 −0 cookbook/assetic/uglifyjs.rst
  10. +1 −1 cookbook/bundles/override.rst
  11. +0 −3 cookbook/bundles/prepend_extension.rst
  12. +1 −1 cookbook/configuration/apache_router.rst
  13. +5 −2 cookbook/configuration/environments.rst
  14. +1 −1 cookbook/configuration/pdo_session_storage.rst
  15. +3 −3 cookbook/controller/service.rst
  16. +4 −2 cookbook/doctrine/dbal.rst
  17. +5 −6 cookbook/doctrine/multiple_entity_managers.rst
  18. +2 −2 cookbook/doctrine/resolve_target_entity.rst
  19. +2 −3 cookbook/email/dev_environment.rst
  20. +1 −1 cookbook/email/gmail.rst
  21. +1 −3 cookbook/form/dynamic_form_modification.rst
  22. +12 −12 cookbook/form/form_customization.rst
  23. +3 −3 cookbook/logging/channels_handlers.rst
  24. +2 −0 cookbook/profiler/matchers.rst
  25. +7 −4 cookbook/request/mime_type.rst
  26. +0 −1 cookbook/routing/redirect_trailing_slash.rst
  27. +1 −1 cookbook/routing/slash_in_parameter.rst
  28. +2 −2 cookbook/security/custom_authentication_provider.rst
  29. +2 −6 cookbook/security/force_https.rst
  30. +5 −7 cookbook/security/securing_services.rst
  31. +3 −3 cookbook/security/voters.rst
  32. +1 −1 cookbook/serializer.rst
  33. +2 −1 cookbook/service_container/scopes.rst
  34. +56 −10 cookbook/session/php_bridge.rst
  35. +8 −7 cookbook/session/sessions_directory.rst
  36. +1 −1 cookbook/symfony1.rst
  37. +5 −5 cookbook/templating/PHP.rst
  38. +5 −5 cookbook/templating/render_without_controller.rst
  39. +3 −3 cookbook/testing/database.rst
View
@@ -55,10 +55,10 @@ configuration file (``config.yml``):
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:
View
@@ -45,7 +45,7 @@ authentication (i.e. the old-school username/password box):
security:
firewalls:
secured_area:
pattern: ^/
pattern: ^/
anonymous: ~
http_basic:
realm: "Secured Demo Area"
@@ -300,11 +300,11 @@ First, enable form login under your firewall:
security:
firewalls:
secured_area:
pattern: ^/
pattern: ^/
anonymous: ~
form_login:
login_path: login
check_path: login_check
login_path: login
check_path: login_check
.. code-block:: xml
@@ -373,10 +373,10 @@ submission (i.e. ``/login_check``):
# app/config/routing.yml
login:
path: /login
defaults: { _controller: AcmeSecurityBundle:Security:login }
path: /login
defaults: { _controller: AcmeSecurityBundle:Security:login }
login_check:
path: /login_check
path: /login_check
.. code-block:: xml
@@ -637,8 +637,8 @@ see :doc:`/cookbook/security/form_login`.
firewalls:
login_firewall:
pattern: ^/login$
anonymous: ~
pattern: ^/login$
anonymous: ~
secured_area:
pattern: ^/
form_login: ~
@@ -1094,13 +1094,14 @@ aren't stored anywhere in a database. The actual user object is provided
by Symfony (:class:`Symfony\\Component\\Security\\Core\\User\\User`).
.. tip::
Any user provider can load users directly from configuration by specifying
the ``users`` configuration parameter and listing the users beneath it.
.. caution::
If your username is completely numeric (e.g. ``77``) or contains a dash
(e.g. ``user-name``), you should use that alternative syntax when specifying
(e.g. ``user-name``), you should use an alternative syntax when specifying
users in YAML:
.. code-block:: yaml
View
@@ -452,8 +452,8 @@ by the routing system using the special ``_locale`` parameter:
.. code-block:: yaml
contact:
path: /{_locale}/contact
defaults: { _controller: AcmeDemoBundle:Contact:index, _locale: en }
path: /{_locale}/contact
defaults: { _controller: AcmeDemoBundle:Contact:index, _locale: en }
requirements:
_locale: en|fr|de
@@ -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
@@ -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
@@ -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
@@ -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"]]
@@ -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:
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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" />
@@ -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',
),
),
@@ -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
@@ -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
@@ -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>
@@ -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,
@@ -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
@@ -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
@@ -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
@@ -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:
@@ -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
@@ -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
@@ -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
@@ -143,7 +143,7 @@ mapping type:
dbal:
connections:
default:
// Other connections parameters
# other connections parameters
mapping_types:
enum: string
@@ -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>
@@ -173,6 +174,7 @@ mapping type:
'dbal' => array(
'connections' => array(
'default' => array(
// other connection parameers
'mapping_types' => array(
'enum' => 'string',
),
@@ -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%"
@@ -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"
Oops, something went wrong.

0 comments on commit 2b7e0f6

Please sign in to comment.