Skip to content

Comments

feat(grid): add default EnumFilter Twig template#331

Merged
loic425 merged 2 commits intoSylius:mainfrom
stlgaits:fix/enum-filter-template
Feb 18, 2026
Merged

feat(grid): add default EnumFilter Twig template#331
loic425 merged 2 commits intoSylius:mainfrom
stlgaits:fix/enum-filter-template

Conversation

@stlgaits
Copy link
Contributor

@stlgaits stlgaits commented Feb 2, 2026

Fixes #327

simple:
image

multiple:
Capture d’écran du 2026-02-02 17-27-40

@stlgaits stlgaits added the bug Something isn't working label Feb 2, 2026
@stlgaits stlgaits force-pushed the fix/enum-filter-template branch 3 times, most recently from e5c036c to 6ce7b95 Compare February 3, 2026 09:22
@stlgaits stlgaits force-pushed the fix/enum-filter-template branch from 6ce7b95 to 9dbe792 Compare February 3, 2026 10:19
@stlgaits stlgaits force-pushed the fix/enum-filter-template branch 4 times, most recently from 535dbc5 to 3e7312c Compare February 8, 2026 11:20
@stlgaits stlgaits force-pushed the fix/enum-filter-template branch from 3e7312c to 8d66713 Compare February 13, 2026 09:29
@loic425 loic425 changed the title fix(grid): add default EnumFilter Twig template feat(grid): add default EnumFilter Twig template Feb 13, 2026
@loic425 loic425 added feature and removed bug Something isn't working labels Feb 13, 2026
@stlgaits stlgaits force-pushed the fix/enum-filter-template branch from 8d66713 to 86ee4e2 Compare February 13, 2026 10:40
@stlgaits stlgaits marked this pull request as ready for review February 13, 2026 10:43
app.book:
classes:
model: App\Entity\Book
form: App\Form\BookType
Copy link
Member

Choose a reason for hiding this comment

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

We do not need this, configure it on your Resource metadata.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I already have the configuration on the Resource via the attribute (cf. app/Entity/Book.php line 36) but I need it here for Symfony 6.4 compatibility otherwise PHPUnit tests fail due to this error :

Caused by
ErrorException: An error occurred during rendering the "default" hook in the "sylius_admin.common.update.content.form.sections.general" hookable. An exception has been thrown during the rendering of a template ("Object of class App\Enum\BookCategory could not be converted to string") in "bootstrap_5_layout.html.twig" at line 338 in "bootstrap_5_layout.html.twig" at line 338.

vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig:338
tests/Functional/LegacyBookTest.php:65

@stlgaits stlgaits force-pushed the fix/enum-filter-template branch from 86ee4e2 to 994f55c Compare February 18, 2026 11:43
@loic425 loic425 merged commit 8c59e56 into Sylius:main Feb 18, 2026
6 checks passed
@loic425
Copy link
Member

loic425 commented Feb 18, 2026

Thx @stlgaits 🏅

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.

Add missing Twig template for EnumFilter

2 participants