Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:
curl https://fabbot.io/patch/symfony/ux/1906/66ae6949befe6cc32a2fa186da463d5b7470081f/cs.diff | patch -p0
diff -ru src/LiveComponent/src/EventListener/LiveComponentSubscriber.php src/LiveComponent/src/EventListener/LiveComponentSubscriber.php
--- src/LiveComponent/src/EventListener/LiveComponentSubscriber.php 2024-06-10 14:46:33.803981190 +0000
+++ src/LiveComponent/src/EventListener/LiveComponentSubscriber.php 2024-06-10 14:46:36.276068464 +0000
@@ -12,6 +12,7 @@
namespace Symfony\UX\LiveComponent\EventListener;
use Psr\Container\ContainerInterface;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Exception\JsonException;
use Symfony\Component\HttpFoundation\Request;
@@ -28,7 +29,6 @@
use Symfony\Component\Security\Csrf\CsrfToken;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveArg;
use Symfony\UX\LiveComponent\LiveComponentHydrator;
@@ -277,7 +277,7 @@
if ($event->getThrowable() instanceof RuntimeException) {
if (str_starts_with($event->getThrowable()->getMessage(), 'Could not resolve argument $key')) {
- $throwable = new RuntimeException('It look likes you trying to call a LiveAction or a LiveListener without the required arguments.
+ $throwable = new RuntimeException('It look likes you trying to call a LiveAction or a LiveListener without the required arguments.
Please make sure the arguments of your action have a #[LiveArgument] in front of them.', $event->getThrowable()->getCode(), $event->getThrowable()->getPrevious());
$event->setThrowable($throwable);
}