From abad91d46606959fba9c4fdfa669275a06df494b Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 17:32:05 +0100 Subject: [PATCH 01/12] Removed note about removed content --- cookbook/console/console_command.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 7e23a4762a4..184c51e541d 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -82,11 +82,6 @@ for details. Getting Services from the Service Container ------------------------------------------- -.. caution:: - - The "container scopes" concept explained in this section has been deprecated - in Symfony 2.8 and it will be removed in Symfony 3.0. - By using :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand` as the base class for the command (instead of the more basic :class:`Symfony\\Component\\Console\\Command\\Command`), you have access to the From 340ec5fe82b5be15feec7653a895a2fd1fe7b27a Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 30 Nov 2015 09:56:10 -0500 Subject: [PATCH 02/12] Adding a note thanks to Stof --- cookbook/form/create_form_type_extension.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbook/form/create_form_type_extension.rst b/cookbook/form/create_form_type_extension.rst index df290c1e4f4..daaba58df19 100644 --- a/cookbook/form/create_form_type_extension.rst +++ b/cookbook/form/create_form_type_extension.rst @@ -127,7 +127,9 @@ tag: .. versionadded:: 2.8 The ``extended_type`` option is new in Symfony 2.8. Before, the option was - called ``alias``. + called ``alias``. If you're a bundle author and need to support multiple Symfony + versions, specify *both* ``extended_type`` and ``alias`` (having both will prevent + any deprecation warnings). The ``extended_type`` key of the tag is the type of field that this extension should be applied to. In your case, as you want to extend the ``Symfony\Component\Form\Extension\Core\Type\FileType`` From 5eca5639aa3eadc20e607f3d74fae58524b73a18 Mon Sep 17 00:00:00 2001 From: Douglas Naphas Date: Sun, 29 Nov 2015 15:42:46 -0500 Subject: [PATCH 03/12] [#5875] Fixed link description, list of common media types --- book/http_fundamentals.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/book/http_fundamentals.rst b/book/http_fundamentals.rst index 64adf82759b..8f8da7213cc 100644 --- a/book/http_fundamentals.rst +++ b/book/http_fundamentals.rst @@ -149,8 +149,7 @@ known as HTTP headers. For example, one important HTTP response header is ``Content-Type``. The body of the same resource could be returned in multiple different formats like HTML, XML, or JSON and the ``Content-Type`` header uses Internet Media Types like ``text/html`` to tell the client which format is -being returned. A list of common media types can be found on Wikipedia's -`List of common media types`_ article. +being returned. You can see a `list of common media types`_ from IANA. Many other headers exist, some of which are very powerful. For example, certain headers can be used to create a powerful caching system. @@ -578,6 +577,6 @@ sensible defaults. For more advanced users, the sky is the limit. .. _`Live HTTP Headers`: https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/ .. _`List of HTTP status codes`: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes .. _`List of HTTP header fields`: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields -.. _`List of common media types`: https://www.iana.org/assignments/media-types/media-types.xhtml +.. _`list of common media types`: https://www.iana.org/assignments/media-types/media-types.xhtml .. _`Validator`: https://github.com/symfony/validator .. _`Swift Mailer`: http://swiftmailer.org/ From 7bd1f22d7a9963cfa30814dd0a4dc17de8e5cf0a Mon Sep 17 00:00:00 2001 From: Jason McCallister Date: Mon, 30 Nov 2015 15:47:23 -0800 Subject: [PATCH 04/12] Add proper use of the password type The documentation still referenced using the old `type`. Updated the code to use `PasswordType::class` vice `password`. --- cookbook/doctrine/registration_form.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 9e19eb205f5..ebd11b412a1 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -160,6 +160,7 @@ Next, create the form for the ``User`` entity:: use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; + use Symfony\Component\Form\Extension\Core\Type\PasswordType; class UserType extends AbstractType { @@ -169,7 +170,7 @@ Next, create the form for the ``User`` entity:: ->add('email', EmailType::class) ->add('username', TextType::class) ->add('plainPassword', RepeatedType::class, array( - 'type' => 'password', + 'type' => PasswordType::class, 'first_options' => array('label' => 'Password'), 'second_options' => array('label' => 'Repeat Password'), ) From e6ead2b5981a6fd5ea684ef50fb0b6a933535246 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 5 Dec 2015 10:55:05 +0100 Subject: [PATCH 05/12] [#5948] Removed caution about 5.3.6 as 5.3.9 is required --- components/dom_crawler.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 2bb74fb4ac4..f9a3fe030f3 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -300,12 +300,6 @@ and :phpclass:`DOMNode` objects: The ``html`` method is new in Symfony 2.3. - .. caution:: - - Due to an issue in PHP, the ``html()`` method returns wrongly decoded HTML - entities in PHP versions lower than 5.3.6 (for example, it returns ``•`` - instead of ``•``). - Links ~~~~~ From aed26389d54433ba16f710e8abb865727cc54d9f Mon Sep 17 00:00:00 2001 From: thao-witkam Date: Sat, 5 Dec 2015 13:24:52 +0100 Subject: [PATCH 06/12] update from_flat_php_to_symfony2.rst remove Php header in example code --- book/from_flat_php_to_symfony2.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/book/from_flat_php_to_symfony2.rst b/book/from_flat_php_to_symfony2.rst index 1034be2fdbf..e93324304c4 100644 --- a/book/from_flat_php_to_symfony2.rst +++ b/book/from_flat_php_to_symfony2.rst @@ -85,7 +85,6 @@ the code that prepares the HTML "presentation": .. code-block:: html+php - Date: Sun, 6 Dec 2015 03:01:22 +1100 Subject: [PATCH 07/12] Missing n in Column --- cookbook/security/guard-authentication.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/guard-authentication.rst b/cookbook/security/guard-authentication.rst index 5201fcf2bbb..a19afaf7948 100644 --- a/cookbook/security/guard-authentication.rst +++ b/cookbook/security/guard-authentication.rst @@ -44,7 +44,7 @@ property they use to access their account via the API:: private $username; /** - * @ORM\Colum(type"string", unique=true) + * @ORM\Column(type"string", unique=true) */ private $apiKey; From d8c93e2edea10cbef7cd8f504d2ec5f367188b41 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 7 Dec 2015 15:40:32 +0100 Subject: [PATCH 08/12] Add isSubmitted call --- book/forms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/forms.rst b/book/forms.rst index 3627ffa806d..a4b95fd62c9 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -231,7 +231,7 @@ controller:: $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted() && $form->isValid()) { // ... perform some action, such as saving the task to the database return $this->redirect($this->generateUrl('task_success')); From cebd5fde113aae24429b67921bb109771c6a136a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 7 Dec 2015 14:13:51 +0100 Subject: [PATCH 09/12] Remove isSubmitted call --- cookbook/doctrine/registration_form.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 2c6bd7e4f99..1d1e982c207 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -222,7 +222,7 @@ controller for displaying the registration form:: // 2) handle the submit (will only happen on POST) $form->handleRequest($request); - if ($form->isValid() && $form->isSubmitted()) { + if ($form->isSubmitted() && $form->isValid()) { // 3) Encode the password (you could also do this via Doctrine listener) $encoder = $this->get('security.encoder_factory') ->getEncoder($user); From 98c4525d49206c612499423690cf7a505df30f73 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Tue, 8 Dec 2015 09:52:59 +0100 Subject: [PATCH 10/12] [Book] Do not extend the base controller before introducing it --- book/page_creation.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index c062182d5f8..7c940eef100 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -39,11 +39,10 @@ a method inside of it that will be executed when someone goes to ``/lucky/number // src/AppBundle/Controller/LuckyController.php namespace AppBundle\Controller; - use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Response; - class LuckyController extends Controller + class LuckyController { /** * @Route("/lucky/number") @@ -104,7 +103,7 @@ Just add a second method to ``LuckyController``:: // src/AppBundle/Controller/LuckyController.php // ... - class LuckyController extends Controller + class LuckyController { // ... @@ -137,7 +136,7 @@ You can even shorten this with the handy :class:`Symfony\\Component\\HttpFoundat // --> don't forget this new use statement use Symfony\Component\HttpFoundation\JsonResponse; - class LuckyController extends Controller + class LuckyController { // ... @@ -170,7 +169,7 @@ at the end: // src/AppBundle/Controller/LuckyController.php // ... - class LuckyController extends Controller + class LuckyController { /** * @Route("/lucky/number/{count}") @@ -224,7 +223,7 @@ The best part is that you can access this value and use it in your controller:: // src/AppBundle/Controller/LuckyController.php // ... - class LuckyController extends Controller + class LuckyController { /** From 81b96b607612c42a421f16007c2cb5331e44bad1 Mon Sep 17 00:00:00 2001 From: Henry Snoek Date: Sat, 5 Dec 2015 10:07:58 +0100 Subject: [PATCH 11/12] use single quotes for YAML strings --- best_practices/business-logic.rst | 2 +- best_practices/controllers.rst | 2 +- book/configuration.rst | 10 ++++---- book/doctrine.rst | 12 +++++----- book/page_creation.rst | 8 +++---- book/routing.rst | 8 +++---- book/service_container.rst | 8 +++---- book/translation.rst | 2 +- book/validation.rst | 8 +++---- components/dependency_injection/advanced.rst | 2 +- .../dependency_injection/parentservices.rst | 10 ++++---- components/dependency_injection/types.rst | 2 +- components/routing/hostname_pattern.rst | 6 ++--- cookbook/assetic/yuicompressor.rst | 6 ++--- cookbook/bundles/best_practices.rst | 2 +- cookbook/configuration/environments.rst | 2 +- .../configuration/external_parameters.rst | 4 ++-- .../configuration/override_dir_structure.rst | 2 +- .../configuration/using_parameters_in_dic.rst | 2 +- cookbook/console/logging.rst | 4 ++-- cookbook/deployment/heroku.rst | 2 +- cookbook/deployment/platformsh.rst | 12 +++++----- .../doctrine/multiple_entity_managers.rst | 24 +++++++++---------- cookbook/email/dev_environment.rst | 2 +- cookbook/email/email.rst | 8 +++---- cookbook/email/spool.rst | 2 +- cookbook/logging/channels_handlers.rst | 8 +++---- cookbook/logging/monolog.rst | 2 +- cookbook/logging/monolog_email.rst | 10 ++++---- cookbook/profiler/storage.rst | 6 ++--- cookbook/routing/custom_route_loader.rst | 2 +- cookbook/routing/redirect_in_config.rst | 2 +- .../routing/service_container_parameters.rst | 2 +- cookbook/security/multiple_user_providers.rst | 2 +- cookbook/session/sessions_directory.rst | 2 +- cookbook/symfony1.rst | 6 ++--- cookbook/templating/global_variables.rst | 4 ++-- quick_tour/the_architecture.rst | 18 +++++++------- reference/configuration/doctrine.rst | 4 ++-- reference/configuration/framework.rst | 10 ++++---- reference/configuration/security.rst | 4 ++-- reference/configuration/twig.rst | 2 +- reference/constraints/Count.rst | 4 ++-- reference/constraints/Length.rst | 4 ++-- reference/constraints/Regex.rst | 4 ++-- reference/constraints/UserPassword.rst | 2 +- 46 files changed, 125 insertions(+), 125 deletions(-) diff --git a/best_practices/business-logic.rst b/best_practices/business-logic.rst index 85f3a14bb0a..913d7a69ab1 100644 --- a/best_practices/business-logic.rst +++ b/best_practices/business-logic.rst @@ -145,7 +145,7 @@ the class namespace as a parameter: services: app.slugger: - class: "%slugger.class%" + class: '%slugger.class%' This practice is cumbersome and completely unnecessary for your own services: diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index 8764de69c43..6afa28edb01 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -43,7 +43,7 @@ configuration to the main routing configuration file: # app/config/routing.yml app: - resource: "@AppBundle/Controller/" + resource: '@AppBundle/Controller/' type: annotation This configuration will load annotations from any controller stored inside the diff --git a/book/configuration.rst b/book/configuration.rst index da32a0e1afe..2574096f4d6 100644 --- a/book/configuration.rst +++ b/book/configuration.rst @@ -21,14 +21,14 @@ format you prefer: - { resource: security.yml } framework: - secret: "%secret%" - router: { resource: "%kernel.root_dir%/config/routing.yml" } + secret: '%secret%' + router: { resource: '%kernel.root_dir%/config/routing.yml' } # ... # Twig Configuration twig: - debug: "%kernel.debug%" - strict_variables: "%kernel.debug%" + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' # ... @@ -226,7 +226,7 @@ the configuration file for the ``dev`` environment. - { resource: config.yml } framework: - router: { resource: "%kernel.root_dir%/config/routing_dev.yml" } + router: { resource: '%kernel.root_dir%/config/routing_dev.yml' } profiler: { only_exceptions: false } # ... diff --git a/book/doctrine.rst b/book/doctrine.rst index e1f0768730d..4df99b617be 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -64,11 +64,11 @@ information. By convention, this information is usually configured in an # app/config/config.yml doctrine: dbal: - driver: "%database_driver%" - host: "%database_host%" - dbname: "%database_name%" - user: "%database_user%" - password: "%database_password%" + driver: '%database_driver%' + host: '%database_host%' + dbname: '%database_name%' + user: '%database_user%' + password: '%database_password%' .. code-block:: xml @@ -162,7 +162,7 @@ for you: doctrine: dbal: driver: pdo_sqlite - path: "%kernel.root_dir%/sqlite.db" + path: '%kernel.root_dir%/sqlite.db' charset: UTF8 .. code-block:: xml diff --git a/book/page_creation.rst b/book/page_creation.rst index c062182d5f8..5d3c0857615 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -478,14 +478,14 @@ is ``app/config/config.yml``: # ... framework: - secret: "%secret%" + secret: '%secret%' router: - resource: "%kernel.root_dir%/config/routing.yml" + resource: '%kernel.root_dir%/config/routing.yml' # ... twig: - debug: "%kernel.debug%" - strict_variables: "%kernel.debug%" + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' # ... diff --git a/book/routing.rst b/book/routing.rst index 2c611da0336..6b95b545d61 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -168,7 +168,7 @@ file: # app/config/config.yml framework: # ... - router: { resource: "%kernel.root_dir%/config/routing.yml" } + router: { resource: '%kernel.root_dir%/config/routing.yml' } .. code-block:: xml @@ -1181,7 +1181,7 @@ configuration: # app/config/routing.yml app: - resource: "@AppBundle/Controller/" + resource: '@AppBundle/Controller/' type: annotation # required to enable the Annotation reader for this resource .. code-block:: xml @@ -1232,7 +1232,7 @@ directory are parsed and put into the routing. # app/config/routing.yml app: - resource: "@AcmeOtherBundle/Resources/config/routing.yml" + resource: '@AcmeOtherBundle/Resources/config/routing.yml' .. code-block:: xml @@ -1271,7 +1271,7 @@ suppose you want to prefix all routes in the AppBundle with ``/site`` (e.g. # app/config/routing.yml app: - resource: "@AppBundle/Controller/" + resource: '@AppBundle/Controller/' type: annotation prefix: /site diff --git a/book/service_container.rst b/book/service_container.rst index 5bcd90ebe1e..d1888ae052a 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -259,8 +259,8 @@ parameter and uses it in the service definition. # app/config/parameters.yml parameters: - # This will be parsed as string "@securepass" - mailer_password: "@@securepass" + # This will be parsed as string '@securepass' + mailer_password: '@@securepass' .. note:: @@ -398,7 +398,7 @@ configuration. # app/config/config.yml imports: - - { resource: "@AcmeHelloBundle/Resources/config/services.yml" } + - { resource: '@AcmeHelloBundle/Resources/config/services.yml' } .. code-block:: xml @@ -475,7 +475,7 @@ invokes the service container extension inside the FrameworkBundle: secret: xxxxxxxxxx form: true csrf_protection: true - router: { resource: "%kernel.root_dir%/config/routing.yml" } + router: { resource: '%kernel.root_dir%/config/routing.yml' } # ... .. code-block:: xml diff --git a/book/translation.rst b/book/translation.rst index bb972c256bf..5538836358d 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -615,7 +615,7 @@ not empty, add the following: AppBundle\Entity\Author: properties: name: - - NotBlank: { message: "author.name.not_blank" } + - NotBlank: { message: 'author.name.not_blank' } .. code-block:: xml diff --git a/book/validation.rst b/book/validation.rst index df3b9597dd3..1555520445d 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -302,7 +302,7 @@ rules). In order to validate an object, simply map one or more constraints to its class and then pass it to the ``validator`` service. Behind the scenes, a constraint is simply a PHP object that makes an assertive -statement. In real life, a constraint could be: "The cake must not be burned". +statement. In real life, a constraint could be: 'The cake must not be burned'. In Symfony, constraints are similar: they are assertions that a condition is true. Given a value, a constraint will tell you if that value adheres to the rules of the constraint. @@ -639,7 +639,7 @@ this method must return ``true``: AppBundle\Entity\Author: getters: passwordLegal: - - "True": { message: "The password cannot match your first name" } + - 'True': { message: 'The password cannot match your first name' } .. code-block:: xml @@ -945,8 +945,8 @@ username and the password are different only if all other validation passes - Strict getters: passwordLegal: - - "True": - message: "The password cannot match your username" + - 'True': + message: 'The password cannot match your username' groups: [Strict] properties: username: diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index 93372c8723e..149c3dcff03 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -128,4 +128,4 @@ service by asking for the ``bar`` service like this:: services: foo: class: Example\Foo - bar: "@foo" + bar: '@foo' diff --git a/components/dependency_injection/parentservices.rst b/components/dependency_injection/parentservices.rst index 9237e57ac21..1afcf43b72c 100644 --- a/components/dependency_injection/parentservices.rst +++ b/components/dependency_injection/parentservices.rst @@ -63,14 +63,14 @@ The service config for these classes would look something like this: newsletter_manager: class: NewsletterManager calls: - - [setMailer, ["@my_mailer"]] - - [setEmailFormatter, ["@my_email_formatter"]] + - [setMailer, ['@my_mailer']] + - [setEmailFormatter, ['@my_email_formatter']] greeting_card_manager: - class: "GreetingCardManager" + class: 'GreetingCardManager' calls: - - [setMailer, ["@my_mailer"]] - - [setEmailFormatter, ["@my_email_formatter"]] + - [setMailer, ['@my_mailer']] + - [setEmailFormatter, ['@my_email_formatter']] .. code-block:: xml diff --git a/components/dependency_injection/types.rst b/components/dependency_injection/types.rst index f04781d8aad..49126fd47aa 100644 --- a/components/dependency_injection/types.rst +++ b/components/dependency_injection/types.rst @@ -199,7 +199,7 @@ Another possibility is just setting public fields of the class directly:: newsletter_manager: class: NewsletterManager properties: - mailer: "@my_mailer" + mailer: '@my_mailer' .. code-block:: xml diff --git a/components/routing/hostname_pattern.rst b/components/routing/hostname_pattern.rst index fd2e8671504..0b2f5392be6 100644 --- a/components/routing/hostname_pattern.rst +++ b/components/routing/hostname_pattern.rst @@ -183,9 +183,9 @@ instance, if you want to match both ``m.example.com`` and host: "m.{domain}" defaults: _controller: AcmeDemoBundle:Main:mobileHomepage - domain: "%domain%" + domain: '%domain%' requirements: - domain: "%domain%" + domain: '%domain%' homepage: path: / @@ -246,7 +246,7 @@ You can also set the host option on imported routes: .. code-block:: yaml acme_hello: - resource: "@AcmeHelloBundle/Resources/config/routing.yml" + resource: '@AcmeHelloBundle/Resources/config/routing.yml' host: "hello.example.com" .. code-block:: xml diff --git a/cookbook/assetic/yuicompressor.rst b/cookbook/assetic/yuicompressor.rst index 66cb5364ec7..6ae078a8eac 100644 --- a/cookbook/assetic/yuicompressor.rst +++ b/cookbook/assetic/yuicompressor.rst @@ -33,12 +33,12 @@ stylesheets: # app/config/config.yml assetic: - # java: "/usr/bin/java" + # java: '/usr/bin/java' filters: yui_css: - jar: "%kernel.root_dir%/Resources/java/yuicompressor.jar" + jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar' yui_js: - jar: "%kernel.root_dir%/Resources/java/yuicompressor.jar" + jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar' .. code-block:: xml diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 3520f2fbff1..7f214270c14 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/configuration/environments.rst b/cookbook/configuration/environments.rst index a7b3ac22ba3..0b8b8776b17 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -190,7 +190,7 @@ this code and changing the environment string. doctrine: dbal: - logging: "%kernel.debug%" + logging: '%kernel.debug%' # ... .. code-block:: xml diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst index 603164b8c93..5807cf9dddd 100644 --- a/cookbook/configuration/external_parameters.rst +++ b/cookbook/configuration/external_parameters.rst @@ -70,8 +70,8 @@ You can now reference these parameters wherever you need them. dbal: driver pdo_mysql dbname: symfony_project - user: "%database.user%" - password: "%database.password%" + user: '%database.user%' + password: '%database.password%' .. code-block:: xml diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index a6048bb2072..821c9601ac7 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -130,7 +130,7 @@ the ``extra.symfony-web-dir`` option in the ``composer.json`` file: # ... assetic: # ... - read_from: "%kernel.root_dir%/../../public_html" + read_from: '%kernel.root_dir%/../../public_html' .. code-block:: xml diff --git a/cookbook/configuration/using_parameters_in_dic.rst b/cookbook/configuration/using_parameters_in_dic.rst index 03bc453bba4..34e0e3bcddf 100644 --- a/cookbook/configuration/using_parameters_in_dic.rst +++ b/cookbook/configuration/using_parameters_in_dic.rst @@ -36,7 +36,7 @@ Now, examine the results to see this closely: # true, as expected my_bundle: - logging: "%kernel.debug%" + logging: '%kernel.debug%' # true/false (depends on 2nd parameter of AppKernel), # as expected, because %kernel.debug% inside configuration # gets evaluated before being passed to the extension diff --git a/cookbook/console/logging.rst b/cookbook/console/logging.rst index 08781d7901b..eb6b092c547 100644 --- a/cookbook/console/logging.rst +++ b/cookbook/console/logging.rst @@ -87,7 +87,7 @@ First configure a listener for console exception events in the service container kernel.listener.command_dispatch: class: AppBundle\EventListener\ConsoleExceptionListener arguments: - logger: "@logger" + logger: '@logger' tags: - { name: kernel.event_listener, event: console.exception } @@ -185,7 +185,7 @@ First configure a listener for console terminate events in the service container kernel.listener.command_dispatch: class: AppBundle\EventListener\ErrorLoggerListener arguments: - logger: "@logger" + logger: '@logger' tags: - { name: kernel.event_listener, event: console.terminate } diff --git a/cookbook/deployment/heroku.rst b/cookbook/deployment/heroku.rst index 62ca1be4365..92feaabe329 100644 --- a/cookbook/deployment/heroku.rst +++ b/cookbook/deployment/heroku.rst @@ -45,7 +45,7 @@ change the value of ``path`` from # ... nested: # ... - path: "php://stderr" + path: 'php://stderr' Once the application is deployed, run ``heroku logs --tail`` to keep the stream of logs from Heroku open in your terminal. diff --git a/cookbook/deployment/platformsh.rst b/cookbook/deployment/platformsh.rst index 7b679177feb..d257c8df4c2 100644 --- a/cookbook/deployment/platformsh.rst +++ b/cookbook/deployment/platformsh.rst @@ -48,22 +48,22 @@ Platform.sh how to deploy your application (read more about # to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand # side is in the form `:`. relationships: - database: "mysql:mysql" + database: 'mysql:mysql' # The configuration of app when it is exposed to the web. web: # The public directory of the app, relative to its root. - document_root: "/web" + document_root: '/web' # The front-controller script to send non-static requests to. - passthru: "/app.php" + passthru: '/app.php' # The size of the persistent disk of the application (in MB). disk: 2048 # The mounts that will be performed when the package is deployed. mounts: - "/app/cache": "shared:files/cache" - "/app/logs": "shared:files/logs" + '/app/cache': 'shared:files/cache' + '/app/logs': 'shared:files/logs' # The hooks that will be performed when the package is deployed. hooks: @@ -82,7 +82,7 @@ your Git repository which contains the following files: "http://{default}/": type: upstream # the first part should be your project name - upstream: "myphpproject:php" + upstream: 'myphpproject:php' .. code-block:: yaml diff --git a/cookbook/doctrine/multiple_entity_managers.rst b/cookbook/doctrine/multiple_entity_managers.rst index 5434d847365..7bcb18b2861 100644 --- a/cookbook/doctrine/multiple_entity_managers.rst +++ b/cookbook/doctrine/multiple_entity_managers.rst @@ -27,20 +27,20 @@ The following configuration code shows how you can configure two entity managers default_connection: default connections: default: - driver: "%database_driver%" - host: "%database_host%" - port: "%database_port%" - dbname: "%database_name%" - user: "%database_user%" - password: "%database_password%" + driver: '%database_driver%' + host: '%database_host%' + port: '%database_port%' + dbname: '%database_name%' + user: '%database_user%' + password: '%database_password%' charset: UTF8 customer: - driver: "%database_driver2%" - host: "%database_host2%" - port: "%database_port2%" - dbname: "%database_name2%" - user: "%database_user2%" - password: "%database_password2%" + driver: '%database_driver2%' + host: '%database_host2%' + port: '%database_port2%' + dbname: '%database_name2%' + user: '%database_user2%' + password: '%database_password2%' charset: UTF8 orm: diff --git a/cookbook/email/dev_environment.rst b/cookbook/email/dev_environment.rst index 717f096c4b1..c9eb21433dc 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/email/email.rst b/cookbook/email/email.rst index 3aa93822148..f3e7b457519 100644 --- a/cookbook/email/email.rst +++ b/cookbook/email/email.rst @@ -33,10 +33,10 @@ already included: # app/config/config.yml swiftmailer: - transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" + transport: '%mailer_transport%' + host: '%mailer_host%' + username: '%mailer_user%' + password: '%mailer_password%' .. code-block:: xml diff --git a/cookbook/email/spool.rst b/cookbook/email/spool.rst index 3747f421f81..244098df9b3 100644 --- a/cookbook/email/spool.rst +++ b/cookbook/email/spool.rst @@ -109,7 +109,7 @@ In order to use the spool with a file, use the following configuration: .. code-block:: yaml - path: "%kernel.root_dir%/spool" + path: '%kernel.root_dir%/spool' Now, when your app sends an email, it will not actually be sent but instead added to the spool. Sending the messages from the spool is done separately. diff --git a/cookbook/logging/channels_handlers.rst b/cookbook/logging/channels_handlers.rst index 88ce8ed3d33..7e83584526f 100644 --- a/cookbook/logging/channels_handlers.rst +++ b/cookbook/logging/channels_handlers.rst @@ -104,11 +104,11 @@ You can specify the configuration by many forms: channels: ~ # Include all the channels - channels: foo # Include only channel "foo" - channels: "!foo" # Include all channels, except "foo" + channels: foo # Include only channel 'foo' + channels: '!foo' # Include all channels, except 'foo' - channels: [foo, bar] # Include only channels "foo" and "bar" - channels: ["!foo", "!bar"] # Include all channels, except "foo" and "bar" + channels: [foo, bar] # Include only channels 'foo' and 'bar' + channels: ['!foo', '!bar'] # Include all channels, except 'foo' and 'bar' Creating your own Channel ------------------------- diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index 35be4a1bc32..7858fb33e9e 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -355,7 +355,7 @@ using a processor. handlers: main: type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" + path: '%kernel.logs_dir%/%kernel.environment%.log' level: debug formatter: monolog.formatter.session_request diff --git a/cookbook/logging/monolog_email.rst b/cookbook/logging/monolog_email.rst index 2f12895719d..8a90f6fe5b6 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 @@ -169,8 +169,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/profiler/storage.rst b/cookbook/profiler/storage.rst index c403ae36c51..37463ae6fee 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -16,9 +16,9 @@ uses MySQL as the storage for the profiler with a lifetime of one hour: # app/config/config.yml framework: profiler: - dsn: "mysql:host=localhost;dbname=%database_name%" - username: "%database_user%" - password: "%database_password%" + dsn: 'mysql:host=localhost;dbname=%database_name%' + username: '%database_user%' + password: '%database_password%' lifetime: 3600 .. code-block:: xml diff --git a/cookbook/routing/custom_route_loader.rst b/cookbook/routing/custom_route_loader.rst index 98fd383da18..2e644464416 100644 --- a/cookbook/routing/custom_route_loader.rst +++ b/cookbook/routing/custom_route_loader.rst @@ -46,7 +46,7 @@ Take these lines from the ``routing.yml`` in the Symfony Standard Edition: # app/config/routing.yml app: - resource: "@AppBundle/Controller/" + resource: '@AppBundle/Controller/' type: annotation When the main loader parses this, it tries all registered delegate loaders and calls diff --git a/cookbook/routing/redirect_in_config.rst b/cookbook/routing/redirect_in_config.rst index 29099c9ede8..56b929717b9 100644 --- a/cookbook/routing/redirect_in_config.rst +++ b/cookbook/routing/redirect_in_config.rst @@ -28,7 +28,7 @@ action to redirect to this new url: # load some routes - one should ultimately have the path "/app" AppBundle: - resource: "@AppBundle/Controller/" + resource: '@AppBundle/Controller/' type: annotation prefix: /app diff --git a/cookbook/routing/service_container_parameters.rst b/cookbook/routing/service_container_parameters.rst index ec8f8dce56b..0b219537c46 100644 --- a/cookbook/routing/service_container_parameters.rst +++ b/cookbook/routing/service_container_parameters.rst @@ -23,7 +23,7 @@ inside your routing configuration: path: /{_locale}/contact defaults: { _controller: AppBundle:Main:contact } requirements: - _locale: "%app.locales%" + _locale: '%app.locales%' .. code-block:: xml diff --git a/cookbook/security/multiple_user_providers.rst b/cookbook/security/multiple_user_providers.rst index b90c71e6d49..eee90d9b685 100644 --- a/cookbook/security/multiple_user_providers.rst +++ b/cookbook/security/multiple_user_providers.rst @@ -100,7 +100,7 @@ the first provider is always used: pattern: ^/ provider: user_db http_basic: - realm: "Secured Demo Area" + realm: 'Secured Demo Area' provider: in_memory form_login: ~ diff --git a/cookbook/session/sessions_directory.rst b/cookbook/session/sessions_directory.rst index 3b62b62cb95..1c6f4c46abf 100644 --- a/cookbook/session/sessions_directory.rst +++ b/cookbook/session/sessions_directory.rst @@ -109,7 +109,7 @@ session directory to ``app/sessions``: framework: session: handler_id: session.handler.native_file - save_path: "%kernel.root_dir%/sessions" + save_path: '%kernel.root_dir%/sessions' .. code-block:: xml diff --git a/cookbook/symfony1.rst b/cookbook/symfony1.rst index cd1b3aa8295..f30e18e623f 100644 --- a/cookbook/symfony1.rst +++ b/cookbook/symfony1.rst @@ -271,7 +271,7 @@ do the following: # app/config/routing.yml _hello: - resource: "@AcmeDemoBundle/Resources/config/routing.yml" + resource: '@AcmeDemoBundle/Resources/config/routing.yml' .. code-block:: xml @@ -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 diff --git a/cookbook/templating/global_variables.rst b/cookbook/templating/global_variables.rst index fc7b8a309ea..066b79584f8 100644 --- a/cookbook/templating/global_variables.rst +++ b/cookbook/templating/global_variables.rst @@ -62,7 +62,7 @@ system, which lets you isolate or reuse the value: # app/config/config.yml twig: globals: - ga_tracking: "%ga_tracking%" + ga_tracking: '%ga_tracking%' .. code-block:: xml @@ -106,7 +106,7 @@ This should feel familiar, as it's the same syntax you use in service configurat twig: # ... globals: - user_management: "@app.user_management" + user_management: '@app.user_management' .. code-block:: xml diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index 8fdd851376a..c0f008f0605 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -149,27 +149,27 @@ or PHP. Have a look at this sample of the default Symfony configuration: #translator: { fallbacks: ["%locale%"] } secret: "%secret%" router: - resource: "%kernel.root_dir%/config/routing.yml" - strict_requirements: "%kernel.debug%" + resource: '%kernel.root_dir%/config/routing.yml' + strict_requirements: '%kernel.debug%' form: true csrf_protection: true validation: { enable_annotations: true } templating: { engines: ['twig'] } - default_locale: "%locale%" + default_locale: '%locale%' trusted_proxies: ~ session: ~ # Twig Configuration twig: - debug: "%kernel.debug%" - strict_variables: "%kernel.debug%" + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' # Swift Mailer Configuration swiftmailer: - transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" + transport: '%mailer_transport%' + host: '%mailer_host%' + username: '%mailer_user%' + password: '%mailer_password%' spool: { type: memory } # ... diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 3ca1929d53d..ab04e3fc2ce 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -282,7 +282,7 @@ that the ORM resolves to: # the standard distribution overrides this to be true in debug, false otherwise auto_generate_proxy_classes: false proxy_namespace: Proxies - proxy_dir: "%kernel.cache_dir%/doctrine/orm/Proxies" + proxy_dir: '%kernel.cache_dir%/doctrine/orm/Proxies' default_entity_manager: default metadata_cache_driver: array query_cache_driver: array @@ -601,7 +601,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias # ... SomeEntityNamespace: type: annotation - dir: "%kernel.root_dir%/../src/Entity" + dir: '%kernel.root_dir%/../src/Entity' is_bundle: false prefix: App\Entity alias: App diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 0f7398b89aa..edf47ae25fd 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -232,7 +232,7 @@ you use PHPstorm on the Mac OS platform, you will do something like: # app/config/config.yml framework: - ide: "phpstorm://open?file=%%f&line=%%l" + ide: 'phpstorm://open?file=%%f&line=%%l' .. code-block:: xml @@ -1070,10 +1070,10 @@ an asset's path: templating: assets_base_urls: http: - - "http://cdn.example.com/" + - 'http://cdn.example.com/' # you can also pass just a string: # assets_base_urls: - # http: "//cdn.example.com/" + # http: '//cdn.example.com/' .. code-block:: xml @@ -1126,9 +1126,9 @@ collection): # ... templating: assets_base_urls: - - "//cdn.example.com/" + - '//cdn.example.com/' # you can also pass just a string: - # assets_base_urls: "//cdn.example.com/" + # assets_base_urls: '//cdn.example.com/' .. code-block:: xml diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index a729603376e..e400ab003a2 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -486,8 +486,8 @@ To use HTTP-Digest authentication you need to provide a realm and a key: firewalls: somename: http_digest: - key: "a_random_string" - realm: "secure-api" + key: 'a_random_string' + realm: 'secure-api' .. code-block:: xml diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index a666b9ef6b6..f06ac5a751d 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -35,7 +35,7 @@ TwigBundle Configuration ("twig") # The following were added in Symfony 2.3. # See http://twig.sensiolabs.org/doc/recipes.html#using-the-template-name-to-set-the-default-escaping-strategy - autoescape_service: ~ # Example: "@my_service" + autoescape_service: ~ # Example: '@my_service' autoescape_service_method: ~ # use in combination with autoescape_service option base_template_class: ~ # Example: Twig_Template cache: "%kernel.cache_dir%/twig" diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 235ed88a816..a792c7056d1 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -55,8 +55,8 @@ you might add the following: - Count: min: 1 max: 5 - minMessage: "You must specify at least one email" - maxMessage: "You cannot specify more than {{ limit }} emails" + minMessage: 'You must specify at least one email' + maxMessage: 'You cannot specify more than {{ limit }} emails' .. code-block:: xml diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index e32d42e36ef..a52f314a760 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -56,8 +56,8 @@ and "50", you might add the following: - Length: min: 2 max: 50 - minMessage: "Your first name must be at least {{ limit }} characters long" - maxMessage: "Your first name cannot be longer than {{ limit }} characters" + minMessage: 'Your first name must be at least {{ limit }} characters long' + maxMessage: 'Your first name cannot be longer than {{ limit }} characters' .. code-block:: xml diff --git a/reference/constraints/Regex.rst b/reference/constraints/Regex.rst index bf6dc91049c..956fd63f93a 100644 --- a/reference/constraints/Regex.rst +++ b/reference/constraints/Regex.rst @@ -220,8 +220,8 @@ need to specify the HTML5 compatible pattern in the ``htmlPattern`` option: properties: name: - Regex: - pattern: "/^[a-z]+$/i" - htmlPattern: "^[a-zA-Z]+$" + pattern: '/^[a-z]+$/i' + htmlPattern: '^[a-zA-Z]+$' .. code-block:: xml diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index 2a67a64b46d..95ad0d3fdef 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -63,7 +63,7 @@ the user's current password: properties: oldPassword: - Symfony\Component\Security\Core\Validator\Constraints\UserPassword: - message: "Wrong value for your current password" + message: 'Wrong value for your current password' .. code-block:: xml From 2367e88416af73f9f32e2aeb58c3fcfdee96da00 Mon Sep 17 00:00:00 2001 From: Pierre Maraitre Date: Sat, 5 Dec 2015 11:26:25 +0100 Subject: [PATCH 12/12] Fix #5912 Ambiguity on Access Decision Manager's Strategy --- components/security/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/security/authorization.rst b/components/security/authorization.rst index e893eba6a66..acf15002596 100644 --- a/components/security/authorization.rst +++ b/components/security/authorization.rst @@ -41,7 +41,7 @@ the votes (either positive, negative or neutral) it has received. It recognizes several strategies: ``affirmative`` (default) - grant access as soon as any voter returns an affirmative response; + grant access as soon as there is one voter granting access; ``consensus`` grant access if there are more voters granting access than there are denying;