diff --git a/book/security.rst b/book/security.rst index 47e032a4116..51b01cceb77 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1838,7 +1838,7 @@ setting: $container->loadFromExtension('security', array( 'firewalls' => array( 'main'=> array( - ..., + // ... 'switch_user' => array('role' => 'ROLE_ADMIN', 'parameter' => '_want_to_be_this_user'), ), ), diff --git a/book/service_container.rst b/book/service_container.rst index 9372faa94aa..a563c2c36b0 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -490,7 +490,8 @@ invokes the service container extension inside the ``FrameworkBundle``: 'form' => array(), 'csrf-protection' => array(), 'router' => array('resource' => '%kernel.root_dir%/config/routing.php'), - ..., + + // ... )); When the configuration is parsed, the container looks for an extension that diff --git a/book/templating.rst b/book/templating.rst index f26a7bf5e37..0d0fc4e8890 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1021,7 +1021,8 @@ configuration file: // app/config/config.php $container->loadFromExtension('framework', array( - ..., + // ... + 'templating' => array( 'engines' => array('twig'), ), diff --git a/components/security/authentication.rst b/components/security/authentication.rst index 969b6dded6b..626311fe55a 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -180,7 +180,8 @@ receives an array of encoders:: $encoders = array( 'Symfony\\Component\\Security\\Core\\User\\User' => $defaultEncoder, 'Acme\\Entity\\LegacyUser' => $weakEncoder, - ..., + + // ... ); $encoderFactory = new EncoderFactory($encoders); diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 9427f751b9f..a449eafa1ad 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -188,17 +188,10 @@ An example:: } } -.. note:: - - * In Yaml you should put a space after ``{`` and before ``}`` (e.g. ``{ _controller: ... }``), - but this should not be done in Twig (e.g. ``{'hello' : 'value'}``). - * An array item is a part of a line, not a complete line. So you should - not use ``// ...`` but ``...,`` (the comma because of the Coding Standards):: +.. caution:: - array( - 'some value', - ..., - ) + In Yaml you should put a space after ``{`` and before ``}`` (e.g. ``{ _controller: ... }``), + but this should not be done in Twig (e.g. ``{'hello' : 'value'}``). Reporting an Issue ------------------ diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 66ca7b4d6ee..3cedfb91438 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -115,7 +115,8 @@ activated by modifying the default value in the ``dev`` configuration file: $container->loadFromExtension('web_profiler', array( 'toolbar' => true, - ..., + + // ... )); .. index:: @@ -205,9 +206,10 @@ environment by using this code and changing the environment string. $container->loadFromExtension('doctrine', array( 'dbal' => array( 'logging' => '%kernel.debug%', - ..., + + // ... ), - ... + // ... )); .. index:: diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index a9f4daf54b7..5b24b458067 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -82,7 +82,8 @@ configuration format of your choice): $container->loadFromExtension('framework', array( // ... 'session' => array( - ..., + // ... + 'storage_id' => 'session.storage.pdo', ), )); diff --git a/cookbook/doctrine/custom_dql_functions.rst b/cookbook/doctrine/custom_dql_functions.rst index 75870044716..257cd2e9659 100644 --- a/cookbook/doctrine/custom_dql_functions.rst +++ b/cookbook/doctrine/custom_dql_functions.rst @@ -59,10 +59,12 @@ In Symfony, you can register your custom DQL functions as follows: // app/config/config.php $container->loadFromExtension('doctrine', array( 'orm' => array( - ..., + // ... + 'entity_managers' => array( 'default' => array( - ..., + // ... + 'dql' => array( 'string_functions' => array( 'test_string' => 'Acme\HelloBundle\DQL\StringFunction', diff --git a/cookbook/email/email.rst b/cookbook/email/email.rst index a57c58beaed..a1665cf98ec 100644 --- a/cookbook/email/email.rst +++ b/cookbook/email/email.rst @@ -16,7 +16,8 @@ the power of the `Swiftmailer`_ library. public function registerBundles() { $bundles = array( - ..., + // ... + new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), ); diff --git a/cookbook/email/spool.rst b/cookbook/email/spool.rst index e1972dfecb2..1119543894e 100644 --- a/cookbook/email/spool.rst +++ b/cookbook/email/spool.rst @@ -47,7 +47,8 @@ In order to use the spool, use the following configuration: // app/config/config.php $container->loadFromExtension('swiftmailer', array( - ..., + // ... + 'spool' => array( 'type' => 'file', 'path' => '/path/to/spool', diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 1bb3f1598e7..a967dc448e1 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -436,7 +436,8 @@ form is rendered. 'form' => array('resources' => array( 'AcmeDemoBundle:Form:fields.html.twig', )), - ..., + + // ... )); By default, Twig uses a *div* layout when rendering forms. Some people, however, @@ -470,7 +471,8 @@ resource to use such a layout: 'form' => array('resources' => array( 'form_table_layout.html.twig', )), - ..., + + // ... )); If you only want to make the change in one template, add the following line to @@ -525,7 +527,8 @@ form is rendered. array('resources' => array( 'AcmeDemoBundle:Form', ))), - ..., + + // ... )); By default, the PHP engine uses a *div* layout when rendering forms. Some people, @@ -563,7 +566,8 @@ resource to use such a layout: array('resources' => array( 'FrameworkBundle:FormTable', ))), - ..., + + // ... )); If you only want to make the change in one template, add the following line to diff --git a/cookbook/security/form_login.rst b/cookbook/security/form_login.rst index ae2146baf24..d5992206b13 100644 --- a/cookbook/security/form_login.rst +++ b/cookbook/security/form_login.rst @@ -67,7 +67,8 @@ the following config: $container->loadFromExtension('security', array( 'firewalls' => array( 'main' => array('form_login' => array( - ..., + // ... + 'default_target_path' => '/admin', )), ), @@ -111,7 +112,8 @@ of what URL they had requested previously by setting the $container->loadFromExtension('security', array( 'firewalls' => array( 'main' => array('form_login' => array( - ..., + // ... + 'always_use_default_target_path' => true, )), ), @@ -153,7 +155,8 @@ this by setting ``use_referer`` to true (it defaults to false): $container->loadFromExtension('security', array( 'firewalls' => array( 'main' => array('form_login' => array( - ..., + // ... + 'use_referer' => true, )), ), @@ -282,7 +285,8 @@ following config: $container->loadFromExtension('security', array( 'firewalls' => array( 'main' => array('form_login' => array( - ..., + // ... + 'failure_path' => login_failure, )), ), diff --git a/cookbook/security/securing_services.rst b/cookbook/security/securing_services.rst index 302231c65c3..bc5b8422a44 100644 --- a/cookbook/security/securing_services.rst +++ b/cookbook/security/securing_services.rst @@ -260,7 +260,8 @@ documentation. // app/config/config.php $container->loadFromExtension('jms_security_extra', array( - ..., + // ... + 'secure_all_services' => true, )); diff --git a/cookbook/symfony1.rst b/cookbook/symfony1.rst index 3ceb8d69deb..12427c3f0eb 100644 --- a/cookbook/symfony1.rst +++ b/cookbook/symfony1.rst @@ -147,7 +147,8 @@ namespace in the ``vendor/bundle`` directory: // ... $loader->registerNamespaces(array( - ..., + // ... + 'Sensio' => __DIR__.'/../vendor/bundles', )); diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index 635e08926b9..709ea290b78 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -38,7 +38,8 @@ your application configuration file: .. code-block:: php $container->loadFromExtension('framework', array( - ..., + // ... + 'templating' => array( 'engines' => array('twig', 'php'), ),