From 081a975430c701cff5d876f3e4d962fd794953c6 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Thu, 20 Mar 2025 21:15:48 +0100 Subject: [PATCH] [TypeInfo] Add TypeFactoryTrait::fromValue method --- components/type_info.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/type_info.rst b/components/type_info.rst index b97fbf4cc8b..5418c765ce7 100644 --- a/components/type_info.rst +++ b/components/type_info.rst @@ -36,10 +36,15 @@ to the :class:`Symfony\\Component\\TypeInfo\\Type` static methods as following:: Type::generic(Type::object(Collection::class), Type::int()); Type::list(Type::bool()); Type::intersection(Type::object(\Stringable::class), Type::object(\Iterator::class)); + Type::fromValue(1.1) // same as Type::float() // Many others are available and can be // found in Symfony\Component\TypeInfo\TypeFactoryTrait +.. versionadded:: 7.3 + + The ``fromValue()`` method was introduced in Symfony 7.3. + Resolvers ~~~~~~~~~