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

Fix ChoiceFilter with default options #749

Merged
merged 3 commits into from
Jun 8, 2022

Conversation

franmomu
Copy link
Member

@franmomu franmomu commented Jun 7, 2022

Subject

When using ChoiceFilter it throws:

Uncaught PHP Exception InvalidArgumentException: "The "type" parameter MUST be of type "integer" or "null", instance of "Sonata\AdminBundle\Filter\Model\FilterData" given." at /Users/fran/projects/SonataDoctrineMongoDBAdminBundle/vendor/sonata-project/admin-bundle/src/Filter/Model/FilterData.php

It is because the operator_type has ChoiceType::class value when it should be an operator type.

I've labeled as minor because of the sonata-project/admin-bundle bump.

I am targeting this branch, because these changes are BC.

Changelog

### Changed
- Bump `sonata-project/admin-bundle` to `^4.8`
### Fixed
- Fixed using `ChoiceFilter::class` with default options

@franmomu franmomu added the minor label Jun 7, 2022
@franmomu franmomu marked this pull request as ready for review June 7, 2022 10:39
Copy link
Member

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

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

patch seems ok to me

@franmomu franmomu merged commit f28470a into sonata-project:4.x Jun 8, 2022
@franmomu franmomu deleted the fix_choice_filter branch June 8, 2022 06:39
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.

2 participants