Skip to content

Commit f778497

Browse files
committed
[TypeInfo] Add TypeFactoryTrait::fromValue method
1 parent fd26bac commit f778497

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/type_info.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,15 @@ to the :class:`Symfony\\Component\\TypeInfo\\Type` static methods as following::
3737
Type::list(Type::bool());
3838
Type::intersection(Type::object(\Stringable::class), Type::object(\Iterator::class));
3939

40+
Type::fromValue(1.1) // same as above Type::float()
41+
4042
// Many others are available and can be
4143
// found in Symfony\Component\TypeInfo\TypeFactoryTrait
4244

45+
.. versionadded:: 7.3
46+
47+
The ``fromValue()`` method was introduced in Symfony 7.3.
48+
4349
Resolvers
4450
~~~~~~~~~
4551

0 commit comments

Comments
 (0)