Skip to content

Commit d6a8624

Browse files
sanpiixabbuh
authored andcommitted
[config] Add a note about deprecated a node
1 parent c3c6772 commit d6a8624

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

components/config/definition.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,26 @@ has a certain value:
424424
->end()
425425
;
426426
427+
Deprecated the Option
428+
---------------------
429+
430+
You can depreciate an option by using the
431+
:method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::setDeprecated`
432+
method.
433+
434+
.. code-block:: php
435+
436+
$rootNode
437+
->children()
438+
->integerNode('old_option')
439+
->setDeprecated()
440+
->end()
441+
->end()
442+
;
443+
444+
If you use the Web Debug Toolbar, the deprecation notice will be showed when the
445+
configuration is rebuilt.
446+
427447
Documenting the Option
428448
----------------------
429449

0 commit comments

Comments
 (0)