-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compatibility with SonataAdmin and add final #1438
Conversation
@@ -47,8 +47,8 @@ public function countResults(): int | |||
public function init(): void | |||
{ | |||
$query = $this->getQuery(); | |||
if (null === $query) { | |||
throw new \LogicException('The pager need a query to be initialised'); | |||
if (!$query instanceof ProxyQueryInterface) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed recently.
But we still need the execute method to return a countable value.
@@ -98,14 +98,7 @@ public function filter(ProxyQueryInterface $query, string $alias, string $field, | |||
$query->getQueryBuilder()->setParameter($parameterName, $value, $this->getParameterType($value)); | |||
} | |||
|
|||
public function getDefaultOptions(): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is always overriden.
public function getRenderSettings(): array | ||
{ | ||
return [DefaultType::class, [ | ||
'operator_type' => $this->getOption('operator_type'), | ||
'operator_options' => $this->getOption('operator_options'), | ||
'field_type' => $this->getFieldType(), | ||
'field_options' => $this->getFieldOptions(), | ||
'field_options' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't kept the choices option.
I think it's not used. It's supposed to be used this way
'choices' => [
'choices' => [...],
],
The syntax is so weird I assume it wasn't used this way.
But I wonder if I shouldn't add choice_translation_domain => false
in the default values.
Changelog