Skip to content

Commit

Permalink
Merge branch '2.0' into bootstrap-admin-panel
Browse files Browse the repository at this point in the history
* 2.0:
  [Admin] Deprecate FormTypeExtensions
  • Loading branch information
GSadee committed May 17, 2024
2 parents cb9ac59 + 9b2f339 commit c940afe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;

trigger_deprecation(
'sylius/admin-bundle',
'1.14',
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
CatalogPromotionActionTypeExtension::class,
);

/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
final class CatalogPromotionActionTypeExtension extends AbstractTypeExtension
{
public function buildForm(FormBuilderInterface $builder, array $options): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;

trigger_deprecation(
'sylius/admin-bundle',
'1.14',
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
CatalogPromotionScopeTypeExtension::class,
);

/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
final class CatalogPromotionScopeTypeExtension extends AbstractTypeExtension
{
public function buildForm(FormBuilderInterface $builder, array $options): void
Expand Down
6 changes: 6 additions & 0 deletions src/Sylius/UPGRADE-1.14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# UPGRADE FROM `v1.13.X` TO `v1.14.0`

### Deprecations

1. The `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionScopeTypeExtension` and `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionActionTypeExtension` have been deprecated and will be removed in Sylius 2.0.
Starting with this version, form types will be extended using the parent form instead of through form extensions.

0 comments on commit c940afe

Please sign in to comment.