From 0aa141c4acd42d850120b4fe788a13f25c666524 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 29 May 2022 14:55:43 +0200 Subject: [PATCH] Deprecate FormMapper::create (#7835) --- src/Form/FormMapper.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Form/FormMapper.php b/src/Form/FormMapper.php index 504a0c38a6..5044e56c39 100644 --- a/src/Form/FormMapper.php +++ b/src/Form/FormMapper.php @@ -186,11 +186,19 @@ public function getFormBuilder(): FormBuilderInterface } /** + * NEXT_MAJOR: Remove this method. + * * @param class-string|null $type * @param array $options */ public function create(string $name, ?string $type = null, array $options = []): FormBuilderInterface { + @trigger_error(sprintf( + 'The "%s()" method is deprecated since sonata-project/admin-bundle version 4.x and will be' + .' removed in 5.0 version.', + __METHOD__ + ), \E_USER_DEPRECATED); + return $this->formBuilder->create($name, $type, $options); }