-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
We have the following configuration which works in 1.13.0 but in 1.13.1 there is a BC break because of this PR https://github.com/Sylius/SyliusGridBundle/pull/345/files
We have multiple configurations like this which all using the EntityFilter as class.
grid.filter.item_tag:
autoconfigure: false
class: 'App\Grid\Filter\EntityFilter'
tags:
- { name: 'sylius.grid_filter', type: 'item_tag', form_type: 'App\Form\Type\Filter\ItemTagFilterType' }
This filter is autoconfigure/autowired by Symfony.
<?php
declare(strict_types=1);
namespace App\Grid\Filter;
use Sylius\Component\Grid\Data\DataSourceInterface;
use Sylius\Component\Grid\Filtering\ConfigurableFilterInterface;
use App\Form\Type\Filter\ResourceFilterType;
final class EntityFilter implements ConfigurableFilterInterface
{
public function apply(DataSourceInterface $dataSource, string $name, $data, array $options): void
{
// code
}
public static function getFormType(): string
{
return ResourceFilterType::class;
}
public static function getType(): string
{
return 'resource';
}
}
All services are now registered with the name resource
instead of item_tag
. This will trigger an error that the resource is already configured.
Only using FilterInterface instead of ConfigurableFilterInterface doesn't work either because the getType/getFormType must be configured.
Metadata
Metadata
Assignees
Labels
No labels