symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
804 stars 290 forks source link

[TwigComponent] Empty `props` throw incomprehensible Exception #1971

Closed smnandre closed 1 month ago

smnandre commented 1 month ago

Create an anonymous component template, and let props empty

{% props %}

You will get some incomprehensible exception

An exception has been thrown during the compilation of a template ("Warning: Undefined variable $name").

emprty-props

WebMamba commented 1 month ago

I can't reproduce it what is inside your component ? Are your sure you don't have a {{ name }} somewhere ?

smnandre commented 1 month ago

https://github.com/smnandre/repro-empty-props

composer install symfony server:start php bin/console open:local