Skip to content

Commit a2e6c2a

Browse files
committed
Documenting the new method addNormalizer in OptionsResolver component
1 parent 7b981aa commit a2e6c2a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/options_resolver.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ if you need to use other options during normalization::
437437
}
438438
}
439439

440+
.. versionadded:: 4.3
441+
442+
To normalize a new allowed value in sub-classes that is being normalized
443+
in parent classes use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addNormalizer`.
444+
This way, the ``$value`` argument will receive the previously normalized
445+
value, otherwise you can prepend the new normalizer by passing ``true`` as
446+
third argument.
447+
440448
Default Values that Depend on another Option
441449
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
442450

0 commit comments

Comments
 (0)