diff --git a/components/config/definition.rst b/components/config/definition.rst index 89f4bdfa12d..bd482f47ed8 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -418,9 +418,38 @@ All options can be documented using the :method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info` method. +.. code-block:: php + + $rootNode + ->children() + ->integerNode('entries_per_page') + ->info('This value is only used for the search results page.') + ->defaultValue(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 + + + + +.. versionadded:: 2.6 + Since Symfony 2.6, the info will also be added to the exception message + when an invalid type is given. + Optional Sections ----------------- 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 diff --git a/cookbook/testing/doctrine.rst b/cookbook/testing/doctrine.rst index c263d18c91c..e345b32b289 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() { self::bootKernel(); $this->em = static::$kernel->getContainer()