@@ -186,6 +186,25 @@ The configuration can now be written like this::
186186 ->end()
187187 ;
188188
189+ You can also use the ``enumClass() `` method to pass the FQCN of an enum
190+ class to the node. This will automatically set the values of the node to
191+ the cases of the enum::
192+
193+ $rootNode
194+ ->children()
195+ ->enumNode('delivery')
196+ ->enumClass(Delivery::class)
197+ ->end()
198+ ->end()
199+ ;
200+
201+ When using a backed enum, the values provided to the node will be cast
202+ to one of the enum cases if possible.
203+
204+ .. versionadded :: 7.3
205+
206+ The ``enumClass() `` method was introduced in Symfony 7.3.
207+
189208Array Nodes
190209~~~~~~~~~~~
191210
@@ -527,6 +546,30 @@ and in XML:
527546 <!-- entries-per-page: This value is only used for the search results page. -->
528547 <config entries-per-page =" 25" />
529548
549+ You can also provide a URL to a full documentation page::
550+
551+ $rootNode
552+ ->docUrl('Full documentation is available at https://example.com/docs/{version:major}.{version:minor}/reference.html')
553+ ->children()
554+ ->integerNode('entries_per_page')
555+ ->defaultValue(25)
556+ ->end()
557+ ->end()
558+ ;
559+
560+ A few placeholders are available to customize the URL:
561+
562+ * ``{version:major} ``: The major version of the package currently installed
563+ * ``{version:minor} ``: The minor version of the package currently installed
564+ * ``{package} ``: The name of the package
565+
566+ The placeholders will be replaced when printing the configuration tree with the
567+ ``config:dump-reference `` command.
568+
569+ .. versionadded :: 7.3
570+
571+ The ``docUrl() `` method was introduced in Symfony 7.3.
572+
530573Optional Sections
531574-----------------
532575
@@ -815,6 +858,7 @@ A validation rule always has an "if" part. You can specify this part in
815858the following ways:
816859
817860- ``ifTrue() ``
861+ - ``ifFalse() ``
818862- ``ifString() ``
819863- ``ifNull() ``
820864- ``ifEmpty() ``
@@ -833,6 +877,10 @@ A validation rule also requires a "then" part:
833877Usually, "then" is a closure. Its return value will be used as a new value
834878for the node, instead of the node's original value.
835879
880+ .. versionadded :: 7.3
881+
882+ The ``ifFalse() `` method was introduced in Symfony 7.3.
883+
836884Configuring the Node Path Separator
837885-----------------------------------
838886
0 commit comments