symfony / ux

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

[LiveComponent] improve errors when LiveArg is missing for live action and live listener #1906

Open WebMamba opened 3 weeks ago

WebMamba commented 3 weeks ago
Q A
Bug fix? no
New feature? yes
Issues Fix
License MIT

This PR improves the error message when a LIveArg is missing on live action or live event. Here is the new error and the previous one.

Capture d’écran 2024-06-10 à 16 43 38 Capture d’écran 2024-06-10 à 16 44 19
smnandre commented 2 weeks ago

What will be displayed if the LiveComponent is not tagged with controller_arguments (or does not extends AbstractController) ?

smnandre commented 2 weeks ago

Hmm ok ...

It's because of the NotTaggedControllerValueResolver registered only in debug.

We should see this message instead, already better.

Capture d’écran 2024-06-14 à 22 45 01

And, guess what..... all this is related to our LiveArg implementation 🤖

So i suggest we take some time (when we can) to make a good, stable & durable fix for LiveArg

.. and we won't have this problem anymore :à