Skip to content

Commit

Permalink
Deprecate FormMapper::create (#7835)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored May 29, 2022
1 parent 09d8950 commit 0aa141c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Form/FormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,19 @@ public function getFormBuilder(): FormBuilderInterface
}

/**
* NEXT_MAJOR: Remove this method.
*
* @param class-string<FormTypeInterface>|null $type
* @param array<string, mixed> $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);
}

Expand Down

0 comments on commit 0aa141c

Please sign in to comment.