Validate `template` option for grid fields by Rafikooo · Pull Request #364 · Sylius/SyliusGridBundle
The error message did not clearly indicate what was wrong.
The issue was related to grid configuration merging.
In Sylius, we have:
sylius_grid: grids: fields: email: type: twig label: sylius.ui.email sortable: ~ options: template: "@SyliusAdmin/shared/grid/field/name.html.twig"
and in some end app:
sylius_grid: grids: fields: email: type: string label: sylius.ui.email sortable: ~ position: 4
After merging, the type was set to string, but the template option from the base configuration remained, causing the application to break.
This PR introduces validation to prevent similar issues in the future, saving users from hours of debugging.
