Skip to content

Commit 2f2187d

Browse files
committed
minor #20781 [TypeInfo] Add TypeFactoryTrait::fromValue method (alamirault)
This PR was merged into the 7.3 branch. Discussion ---------- [TypeInfo] Add `TypeFactoryTrait::fromValue` method Fix #20575 Commits ------- 081a975 [TypeInfo] Add TypeFactoryTrait::fromValue method
2 parents fd26bac + 081a975 commit 2f2187d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/type_info.rst

+5
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ to the :class:`Symfony\\Component\\TypeInfo\\Type` static methods as following::
3636
Type::generic(Type::object(Collection::class), Type::int());
3737
Type::list(Type::bool());
3838
Type::intersection(Type::object(\Stringable::class), Type::object(\Iterator::class));
39+
Type::fromValue(1.1) // same as Type::float()
3940

4041
// Many others are available and can be
4142
// found in Symfony\Component\TypeInfo\TypeFactoryTrait
4243

44+
.. versionadded:: 7.3
45+
46+
The ``fromValue()`` method was introduced in Symfony 7.3.
47+
4348
Resolvers
4449
~~~~~~~~~
4550

0 commit comments

Comments
 (0)