File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -424,24 +424,27 @@ has a certain value:
424424 ->end()
425425 ;
426426
427- Deprecated the Option
428- ---------------------
427+ Deprecating the Option
428+ ----------------------
429429
430- You can depreciate an option by using the
430+ You can deprecate options using the
431431:method: `Symfony\\ Component\\ Config\\ Definition\\ Builder\\ NodeDefinition::setDeprecated `
432- method.
433-
434- .. code-block :: php
432+ method::
435433
436434 $rootNode
437435 ->children()
438436 ->integerNode('old_option')
437+ // this outputs the following generic deprecation message:
438+ // The child node "old_option" at path "..." is deprecated.
439439 ->setDeprecated()
440+
441+ // you can also pass a custom deprecation message (%node% and %path% placeholders are available):
442+ ->setDeprecated('The "%node%" option is deprecated. Use "new_config_option" instead.')
440443 ->end()
441444 ->end()
442445 ;
443446
444- If you use the Web Debug Toolbar, the deprecation notice will be showed when the
447+ If you use the Web Debug Toolbar, these deprecation notices are shown when the
445448configuration is rebuilt.
446449
447450Documenting the Option
You can’t perform that action at this time.
0 commit comments