diff --git a/book/routing.rst b/book/routing.rst index 9ffbd210933..b6107d12dfb 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1104,12 +1104,20 @@ a slash. URLs matching this route might look like: This example also highlights the special ``_format`` routing parameter. When using this parameter, the matched value becomes the "request format" - of the ``Request`` object. Ultimately, the request format is used for such - things as setting the ``Content-Type`` of the response (e.g. a ``json`` - request format translates into a ``Content-Type`` of ``application/json``). - It can also be used in the controller to render a different template for - each value of ``_format``. The ``_format`` parameter is a very powerful way - to render the same content in different formats. + of the ``Request`` object. + + Ultimately, the request format is used for such things as setting the + ``Content-Type`` of the response (e.g. a ``json`` request format translates + into a ``Content-Type`` of ``application/json``). It can also be used in the + controller to render a different template for each value of ``_format``. + The ``_format`` parameter is a very powerful way to render the same content + in different formats. + + In Symfony versions previous to 3.0, it is possible to override the request + format by adding a query parameter named ``_format`` (for example: + ``/foo/bar?_format=json``). Relying on this behavior not only is considered + a bad practice but it will complicate the upgrade of your applications to + Symfony 3. .. note:: diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 6c4e666e495..7ff247e8c70 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -342,7 +342,7 @@ The end user can provide values in any configuration file: # app/config/config.yml parameters: - acme_blog.author.email: fabien@example.com + acme_blog.author.email: "fabien@example.com" .. code-block:: xml diff --git a/cookbook/email/dev_environment.rst b/cookbook/email/dev_environment.rst index 983d88df541..717f096c4b1 100644 --- a/cookbook/email/dev_environment.rst +++ b/cookbook/email/dev_environment.rst @@ -66,7 +66,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 diff --git a/cookbook/logging/monolog_email.rst b/cookbook/logging/monolog_email.rst index 71d442f12c7..1426d58ac07 100644 --- a/cookbook/logging/monolog_email.rst +++ b/cookbook/logging/monolog_email.rst @@ -31,10 +31,10 @@ it is broken down. handler: swift swift: type: swift_mailer - from_email: error@example.com - to_email: error@example.com + from_email: "error@example.com" + to_email: "error@example.com" # or list of recipients - # to_email: [dev1@example.com, dev2@example.com, ...] + # to_email: ["dev1@example.com", "dev2@example.com", ...] subject: An Error Occurred! level: debug @@ -161,8 +161,8 @@ get logged on the server as well as the emails being sent: handler: swift swift: type: swift_mailer - from_email: error@example.com - to_email: error@example.com + from_email: "error@example.com" + to_email: "error@example.com" subject: An Error Occurred! level: debug diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 58acf646245..0f4fe3c28d2 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -216,7 +216,7 @@ the username and then check the password (more on passwords in a moment): # manager_name: customer firewalls: - default: + main: pattern: ^/ http_basic: ~ provider: our_db_provider @@ -244,7 +244,7 @@ the username and then check the password (more on passwords in a moment): - + @@ -273,7 +273,7 @@ the username and then check the password (more on passwords in a moment): ), ), 'firewalls' => array( - 'default' => array( + 'main' => array( 'pattern' => '^/', 'http_basic' => null, 'provider' => 'our_db_provider', diff --git a/cookbook/security/form_login_setup.rst b/cookbook/security/form_login_setup.rst index b1909a5807e..77c0aa87936 100644 --- a/cookbook/security/form_login_setup.rst +++ b/cookbook/security/form_login_setup.rst @@ -23,7 +23,7 @@ First, enable form login under your firewall: # ... firewalls: - default: + main: anonymous: ~ form_login: login_path: /login @@ -40,7 +40,7 @@ First, enable form login under your firewall: http://symfony.com/schema/dic/services/services-1.0.xsd"> - + @@ -52,7 +52,7 @@ First, enable form login under your firewall: // app/config/security.php $container->loadFromExtension('security', array( 'firewalls' => array( - 'default' => array( + 'main' => array( 'anonymous' => null, 'form_login' => array( 'login_path' => '/login', diff --git a/cookbook/security/remember_me.rst b/cookbook/security/remember_me.rst index 477d8830559..3ddcf8adabc 100644 --- a/cookbook/security/remember_me.rst +++ b/cookbook/security/remember_me.rst @@ -19,7 +19,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option: # ... firewalls: - default: + main: # ... remember_me: secret: "%secret%" @@ -43,7 +43,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option: - + @@ -65,7 +65,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option: // ... 'firewalls' => array( - 'default' => array( + 'main' => array( // ... 'remember_me' => array( 'secret' => '%secret%', diff --git a/cookbook/symfony1.rst b/cookbook/symfony1.rst index b800914a661..cd1b3aa8295 100644 --- a/cookbook/symfony1.rst +++ b/cookbook/symfony1.rst @@ -331,7 +331,7 @@ used them in your application: # some app.yml file from symfony1 all: email: - from_address: foo.bar@example.com + from_address: "foo.bar@example.com" In Symfony2, you can also create arbitrary entries under the ``parameters`` key of your configuration: @@ -341,7 +341,7 @@ key of your configuration: .. code-block:: yaml parameters: - email.from_address: foo.bar@example.com + email.from_address: "foo.bar@example.com" .. code-block:: xml