Skip to content

Commit

Permalink
Merge 3.x into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Aug 5, 2022
2 parents 44a07df + b7c8aaf commit a2c7e49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"homepage": "https://docs.sonata-project.org/projects/SonataTranslationBundle",
"require": {
"php": "^7.4 || ^8.0",
"sonata-project/admin-bundle": "^4.8",
"sonata-project/admin-bundle": "^4.14",
"sonata-project/block-bundle": "^4.11",
"symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
]);

$rectorConfig->importNames();
$rectorConfig->disableImportShortClasses();
$rectorConfig->importShortClasses(false);
$rectorConfig->skip([
CountOnNullRector::class,
ExceptionHandlerTypehintRector::class,
Expand Down
10 changes: 6 additions & 4 deletions src/Filter/TranslationFieldFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

use Doctrine\ORM\Query\Expr\Join;
use Sonata\AdminBundle\Filter\Model\FilterData;
use Sonata\AdminBundle\Form\Type\Filter\DefaultType;
use Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\DoctrineORMAdminBundle\Filter\Filter;
use Sonata\TranslationBundle\Enum\TranslationFilterMode;
Expand Down Expand Up @@ -88,15 +87,18 @@ public function getDefaultOptions(): array
];
}

public function getRenderSettings(): array
/**
* @return array<string, mixed>
*/
public function getFormOptions(): array
{
return [DefaultType::class, [
return [
'field_type' => $this->getFieldType(),
'field_options' => $this->getFieldOptions(),
'operator_type' => $this->getOption('operator_type'),
'operator_options' => $this->getOption('operator_options'),
'label' => $this->getLabel(),
]];
];
}

protected function association(ProxyQueryInterface $query, FilterData $data): array
Expand Down

0 comments on commit a2c7e49

Please sign in to comment.