You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed it is not possible to use an entity with a composite primary key for broadcasting.
It looks like instead of the id array which must be Stringable, the whole entity is returned and $id is something like [instanceof ClassA, instanceof ClassB]:
In TwigBroadcaster.php line 66:
[Error]
Object of class App\Entity\ClassA could not be converted to string
Exception trace:
at /[...]/project-name/vendor/symfony/ux-turbo/src/Broadcaster/TwigBroadcaster.php:66
implode() at /[...]/project-name/vendor/symfony/ux-turbo/src/Broadcaster/TwigBroadcaster.php:66
Symfony\UX\Turbo\Broadcaster\TwigBroadcaster->broadcast() at /[...]/project-name/vendor/symfony/ux-turbo/src/Doctrine/BroadcastListener.php:106
Symfony\UX\Turbo\Doctrine\BroadcastListener->postFlush() at /[...]/project-name/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:63
Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() at /[...]/project-name/vendor/doctrine/orm/src/UnitOfWork.php:3133
Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent() at /[...]/project-name/vendor/doctrine/orm/src/UnitOfWork.php:465
Doctrine\ORM\UnitOfWork->commit() at /[...]/project-name/vendor/doctrine/orm/src/EntityManager.php:259
Doctrine\ORM\EntityManager->flush() at /[...]/project-name/src/EventListener/ClassAEventListener.php:137
// Unrelated console -> event dispatcher chain
App\EventListener\ClassAEventListener->onClassAChanged() at /[...]/project-name/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:116
Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() at /[...]/project-name/vendor/symfony/event-dispatcher/EventDispatcher.php:206
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /[...]/project-name/vendor/symfony/console/Application.php:318
Symfony\Component\Console\Application->doRun() at /[...]/project-name/vendor/symfony/framework-bundle/Console/Application.php:79
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /[...]/project-name/vendor/symfony/console/Application.php:169
Symfony\Component\Console\Application->run() at /[...]/project-name/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49
Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /[...]/project-name/vendor/autoload_runtime.php:29
require_once() at /[...]/project-name/bin/console:15
The text was updated successfully, but these errors were encountered:
I noticed it is not possible to use an entity with a composite primary key for broadcasting.
It looks like instead of the id array which must be
Stringable
, the whole entity is returned and$id
is something like[instanceof ClassA, instanceof ClassB]
:ux/src/Turbo/src/Doctrine/BroadcastListener.php
Lines 150 to 153 in 8db386c
This will result in the appended exception here:
ux/src/Turbo/src/Broadcaster/TwigBroadcaster.php
Line 66 in 8db386c
The text was updated successfully, but these errors were encountered: