Skip to content

Commit

Permalink
minor #5968 Fix depreciations configureOptions() and buildView() (joh…
Browse files Browse the repository at this point in the history
…n-dufrene-dev)

This PR was merged into the 4.x branch.

Discussion
----------

Fix depreciations configureOptions() and buildView()

This is a small fix for some depreciations with 4.8.0 and latest version of symfony :

<img width="1400" alt="Capture d’écran 2023-10-22 à 20 59 16" src="https://github.com/EasyCorp/EasyAdminBundle/assets/25297943/447f4eac-7107-4ffa-987a-3b33c362cb4a">

Commits
-------

d5f8be2 Fix depreciations Symfony\Component\Form\AbstractType::configureOptions() and Symfony\Component\Form\AbstractType::buildView()
  • Loading branch information
javiereguiluz committed Oct 23, 2023
2 parents 7237fcb + d5f8be2 commit 3b7e8c4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Form/Type/Layout/EaFormColumnGroupCloseType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*/
class EaFormColumnGroupCloseType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->define('ea_is_inside_tab')->default(false)->allowedTypes('boolean')
;
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['ea_is_inside_tab'] = $options['ea_is_inside_tab'];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/Layout/EaFormColumnGroupOpenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*/
class EaFormColumnGroupOpenType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->define('ea_is_inside_tab')->default(false)->allowedTypes('boolean')
;
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['ea_is_inside_tab'] = $options['ea_is_inside_tab'];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/Layout/EaFormFieldsetOpenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class EaFormFieldsetOpenType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->define('ea_css_class')->default(null)->allowedTypes('string', 'null')
Expand All @@ -28,7 +28,7 @@ public function configureOptions(OptionsResolver $resolver)
;
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['ea_css_class'] = $options['ea_css_class'];
$view->vars['ea_icon'] = $options['ea_icon'];
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/Layout/EaFormTabListType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class EaFormTabListType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->define('tabs')->required()->default([])->allowedTypes('array')
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/Layout/EaFormTabPaneOpenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class EaFormTabPaneOpenType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->define('ea_tab_id')->allowedTypes('string')
Expand All @@ -27,7 +27,7 @@ public function configureOptions(OptionsResolver $resolver)
;
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['ea_tab_id'] = $options['ea_tab_id'];
$view->vars['ea_css_class'] = $options['ea_css_class'];
Expand Down

0 comments on commit 3b7e8c4

Please sign in to comment.