From 2a43a97ba7c23ff0a9d4584a7333e676f5a4f623 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 21 Jan 2014 09:52:10 +0100 Subject: [PATCH] Fixed YAML code blocks in the book --- book/propel.rst | 8 ++++---- book/security.rst | 21 +++++++++++---------- book/translation.rst | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/book/propel.rst b/book/propel.rst index 91b9c2fe144..3023c17da9c 100644 --- a/book/propel.rst +++ b/book/propel.rst @@ -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: diff --git a/book/security.rst b/book/security.rst index 12a50e35e63..56511bcd09e 100644 --- a/book/security.rst +++ b/book/security.rst @@ -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 diff --git a/book/translation.rst b/book/translation.rst index 73d771032b0..840fab3baea 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -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