From 9922273e7ed4156961147aa446248185852b74a4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 09:07:01 +0100 Subject: [PATCH 1/7] Added an example for info() method --- components/config/definition.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/components/config/definition.rst b/components/config/definition.rst index a6a6f908fa7..4353f73b015 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -425,9 +425,34 @@ All options can be documented using the :method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info` method. +.. code-block:: php + + $rootNode + ->children() + ->inetegerNode('entries_per_page') + ->info('This value is only used for the search results page.') + ->devaultValue(25) + ->end() + ->end() + ; + The info will be printed as a comment when dumping the configuration tree with the ``config:dump-reference`` command. +In YAML you may have: + +.. code-block:: yaml + + # This value is only used for the search results page. + entries_per_page: 25 + +and in XML: + +.. code-block:: xml + + + + Optional Sections ----------------- From 26a8d1f47b57b56d82af160da499aacab989e81b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 18:06:22 +0100 Subject: [PATCH 2/7] Fixed a typo --- components/config/definition.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index 4353f73b015..f55d4ba1a06 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -431,7 +431,7 @@ method. ->children() ->inetegerNode('entries_per_page') ->info('This value is only used for the search results page.') - ->devaultValue(25) + ->defaultValue(25) ->end() ->end() ; From f966c0f01386a7275646f9e2f34fa77c49e3e0f9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 18:12:33 +0100 Subject: [PATCH 3/7] Fixed another typo --- components/config/definition.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index f55d4ba1a06..a83757dff68 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -429,7 +429,7 @@ method. $rootNode ->children() - ->inetegerNode('entries_per_page') + ->integerNode('entries_per_page') ->info('This value is only used for the search results page.') ->defaultValue(25) ->end() From 37f828b168be6b37eb16a836a35561b29bb2c2c5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 1 Jan 2016 10:44:35 +0100 Subject: [PATCH 4/7] update year in license --- contributing/code/license.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing/code/license.rst b/contributing/code/license.rst index cdf8cd8d8df..fd963e00839 100644 --- a/contributing/code/license.rst +++ b/contributing/code/license.rst @@ -16,7 +16,7 @@ According to `Wikipedia`_: The License ----------- -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 264526b4d27686d236528d9bf15689cff08d0a23 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 7 Jan 2016 11:08:17 +0100 Subject: [PATCH 5/7] make method protected it is protected in \PHPUnit_Framework_TestCase --- cookbook/testing/doctrine.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/testing/doctrine.rst b/cookbook/testing/doctrine.rst index b240a3fe652..1bb244eef00 100644 --- a/cookbook/testing/doctrine.rst +++ b/cookbook/testing/doctrine.rst @@ -35,7 +35,7 @@ which makes all of this quite easy:: /** * {@inheritDoc} */ - public function setUp() + protected function setUp() { static::$kernel = static::createKernel(); static::$kernel->boot(); From 75edc24c510c15b97d63aed979b2ef48ac11e157 Mon Sep 17 00:00:00 2001 From: Valentin Date: Thu, 7 Jan 2016 11:29:32 +0100 Subject: [PATCH 6/7] [Form] Fix syntax error in code snippet | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 3.0, 2.8 --- components/form/form_events.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form/form_events.rst b/components/form/form_events.rst index 83c7b2657d2..dee049fc336 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -306,7 +306,7 @@ Creating and binding an event listener to the form is very easy:: // If the data was submitted previously, the additional value that is // included in the request variables needs to be removed. if (true === $user['show_email']) { - $form->add('email', EmailType::class + $form->add('email', EmailType::class); } else { unset($user['email']); $event->setData($user); From 23833916619a45e45c434361afc296c060ce63dd Mon Sep 17 00:00:00 2001 From: WouterJ Date: Fri, 8 Jan 2016 00:09:29 +0100 Subject: [PATCH 7/7] Remove the XML info example The XML dumper was added in 2.4. --- components/config/definition.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index a83757dff68..e8eb49e2594 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -446,13 +446,6 @@ In YAML you may have: # This value is only used for the search results page. entries_per_page: 25 -and in XML: - -.. code-block:: xml - - - - Optional Sections -----------------