Skip to content

Commit

Permalink
Add some missing deprecations related to forms
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jan 15, 2025
1 parent 7f4d867 commit 1a5fdd4
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Factory/FieldFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TimeField;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Security\Permission;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Field/Configurator/FormConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto;
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType;

/**
* @author Javier Eguiluz <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/Field/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormColumnOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormFieldsetOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormTabPaneOpenType;
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/CrudFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Form\Type;

use ArrayObject;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto;
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
Expand All @@ -11,6 +10,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormColumnOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormFieldsetCloseType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormFieldsetOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormTabPaneCloseType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormTabPaneOpenType;
use Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser;
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Type/EaFormColumnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* some HTML tags and it must be added to a form as "unmapped" and "non required".
*
* @author Javier Eguiluz <[email protected]>
*
* @deprecated since 4.8.0, use the alternatives types in the 'EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout' namespace instead
*/
class EaFormColumnType extends AbstractType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Type/EaFormFieldsetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* some HTML tags and it must be added to a form as "unmapped" and "non required".
*
* @author Javier Eguiluz <[email protected]>
*
* @deprecated since 4.8.0, use the alternatives types in the 'EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout' namespace instead
*/
class EaFormFieldsetType extends AbstractType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Type/EaFormRowType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* some HTML tags and it must be added to a form as "unmapped" and "non required".
*
* @author Javier Eguiluz <[email protected]>
*
* @deprecated since 4.8.0, use the equivalent form type in the new namespace: 'EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType'
*/
class EaFormRowType extends AbstractType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Type/EasyAdminGroupType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* some HTML tags and it must be added to a form as "unmapped" and "non required".
*
* @author Javier Eguiluz <[email protected]>
*
* @deprecated since 4.8.0, use the alternatives types in the 'EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout' namespace instead
*/
class EasyAdminGroupType extends AbstractType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Type/EasyAdminTabType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* The 'tab' form type is a special form type used to display a design
* element needed to create complex form layouts. This "fake" type just displays
* some HTML tags and it must be added to a form as "unmapped" and "non required".
*
* @deprecated since 4.8.0, use the alternatives types in the 'EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout' namespace instead
*/
class EasyAdminTabType extends AbstractType
{
Expand Down
20 changes: 20 additions & 0 deletions src/Form/Type/Layout/EaFormRowType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout;

use Symfony\Component\Form\AbstractType;

/**
* This is a special form type used to render the form layout when using form tabs.
*
* @author Javier Eguiluz <[email protected]>
*
* @internal don't use this type in your applications
*/
class EaFormRowType extends AbstractType
{
public function getBlockPrefix(): string
{
return 'ea_form_row';
}
}

0 comments on commit 1a5fdd4

Please sign in to comment.