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:
424
424
->end()
425
425
;
426
426
427
- Deprecated the Option
428
- ---------------------
427
+ Deprecating the Option
428
+ ----------------------
429
429
430
- You can depreciate an option by using the
430
+ You can deprecate options using the
431
431
:method: `Symfony\\ Component\\ Config\\ Definition\\ Builder\\ NodeDefinition::setDeprecated `
432
- method.
433
-
434
- .. code-block :: php
432
+ method::
435
433
436
434
$rootNode
437
435
->children()
438
436
->integerNode('old_option')
437
+ // this outputs the following generic deprecation message:
438
+ // The child node "old_option" at path "..." is deprecated.
439
439
->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.')
440
443
->end()
441
444
->end()
442
445
;
443
446
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
445
448
configuration is rebuilt.
446
449
447
450
Documenting the Option
You can’t perform that action at this time.
0 commit comments