Skip to content

Commit e74d5cf

Browse files
committed
minor #11103 [OptionsResolver] Documenting the new addNormalizer method (yceruto)
This PR was merged into the master branch. Discussion ---------- [OptionsResolver] Documenting the new addNormalizer method symfony/symfony#30371 Commits ------- a2e6c2a Documenting the new method addNormalizer in OptionsResolver component
2 parents 6f18387 + a2e6c2a commit e74d5cf

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
@@ -435,6 +435,14 @@ if you need to use other options during normalization::
435435
}
436436
}
437437

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

0 commit comments

Comments
 (0)