Skip to content
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

Rely on filter methods rather than option #8172

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Rely on filter methods rather than option #8172

merged 3 commits into from
Apr 10, 2024

Conversation

VincentLanglet
Copy link
Member

@VincentLanglet VincentLanglet commented Apr 10, 2024

Subject

  1. We should rely on filter methods rather than options.
  2. a lot of filter options could be set by default instead asking for them in persistence bundle

Fix sonata-project/SonataDoctrineORMAdminBundle#1779

Changelog

### Fixed
- `label_translation_parameters` option usage


### Deprecated
- Not implementing `FilterInterface::showFilter`
- Not implementing `FilterInterface::getLabelTranslationParameters`
- Not implementing `FilterInterface::withAdvancedFilter`

@VincentLanglet VincentLanglet force-pushed the filterMethods branch 2 times, most recently from 78d483b to 1571813 Compare April 10, 2024 14:34
@VincentLanglet VincentLanglet merged commit f01fcd0 into 4.x Apr 10, 2024
23 checks passed
@VincentLanglet VincentLanglet deleted the filterMethods branch April 10, 2024 14:58
*/
final public function getLabelTranslationParameters(): array
{
return $this->getOption('label_translation_parameters');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might break your application if label_translation_parameters is null

Copy link
Member Author

@VincentLanglet VincentLanglet Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I'll fix it #8175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClassFilter has no possibility to change choice_translation_domain
2 participants