From ff56ac57c04a1a22c1f120cffbc1b6946b8ffd8b Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Sun, 28 Feb 2021 22:44:27 +0100 Subject: [PATCH] Deprecate TypeGuesserInterface from Guesser Deprecated in favor of Sonata\AdminBundle\FieldDescription\TypeGuesserInterface. --- UPGRADE-3.x.md | 8 ++++++++ src/Guesser/TypeGuesserChain.php | 5 +++++ src/Guesser/TypeGuesserInterface.php | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/UPGRADE-3.x.md b/UPGRADE-3.x.md index fd004c5def..20234e67ba 100644 --- a/UPGRADE-3.x.md +++ b/UPGRADE-3.x.md @@ -28,6 +28,14 @@ $admin->generateObjectUrl('history_compare_revisions', $subject, [ UPGRADE FROM 3.89 to 3.90 ========================= +### Deprecated `Sonata\AdminBundle\Guesser\TypeGuesserInterface` interface. + +Use `Sonata\AdminBundle\FieldDescription\TypeGuesserInterface` interface instead. + +### Deprecated `Sonata\AdminBundle\Guesser\TypeGuesserChain` class. + +Use `Sonata\AdminBundle\FieldDescription\TypeGuesserChain` class instead. + ### Deprecated `Sonata\AdminBundle\Model\ModelManagerInterface::getModelInstance()` method. Use `Sonata\AdminBundle\Admin\AbstractAdmin::createNewInstance()` method instead. diff --git a/src/Guesser/TypeGuesserChain.php b/src/Guesser/TypeGuesserChain.php index fa6de1f9c0..5f696c0686 100644 --- a/src/Guesser/TypeGuesserChain.php +++ b/src/Guesser/TypeGuesserChain.php @@ -20,6 +20,11 @@ /** * The code is based on Symfony2 Form Components. * + * NEXT_MAJOR: Remove this class. + * + * @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0. + * Use Sonata\AdminBundle\FieldDescription\TypeGuesserChain instead. + * * @final since sonata-project/admin-bundle 3.52 * * @author Bernhard Schussek diff --git a/src/Guesser/TypeGuesserInterface.php b/src/Guesser/TypeGuesserInterface.php index 8edd1be7c5..c8accd8f5b 100644 --- a/src/Guesser/TypeGuesserInterface.php +++ b/src/Guesser/TypeGuesserInterface.php @@ -17,6 +17,11 @@ use Symfony\Component\Form\Guess\TypeGuess; /** + * NEXT_MAJOR: Remove this class. + * + * @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0. + * Use Sonata\AdminBundle\FieldDescription\TypeGuesserInterface instead. + * * @author Thomas Rabaix */ interface TypeGuesserInterface