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
After a migration sf3 => sf4 and a jms 2 =>3 upgrade, my project is not working anymore.
Steps required to reproduce the problem
install jms serializer bundle 3.10
run a request
Expected Result
my response is well serialized
Actual Result
JMS\Serializer\EventDispatcher\LazyEventDispatcher::__construct(): Argument #1 ($container) must be of type Symfony\Component\DependencyInjection\ContainerInterface, Symfony\Component\DependencyInjection\Argument\ServiceLocator given, called in /home/dev/app/cache/dev/ContainerKtlYnhv/srcKernelDevDebugContainer.php on line 13876
It's working if I comment these lines in the file : vendor/jms/serializer-bundle/DependencyInjection/Compiler/RegisterEventListenersAndSubscribersPass.php
if (class_exists(ServiceLocatorTagPass::class)) {
$serviceLocator = ServiceLocatorTagPass::register($container, $listenerServices);
$container->getDefinition('jms_serializer.event_dispatcher')->replaceArgument(0, $serviceLocator);
}
The text was updated successfully, but these errors were encountered:
here are all my jms dependencies from the new composer.lock:
"name": "jms/metadata", "version": "2.5.1",
"name": "jms/serializer", "version": "3.14.0",
"name": "jms/serializer-bundle", "version": "3.10.0",
"name": "jms/translation-bundle", "version": "1.6.0",
"name": "jms/i18n-routing-bundle", "version": "3.1.0",
and the symfony/dependency-injection package is in "version": "v4.4.27",
After a migration sf3 => sf4 and a jms 2 =>3 upgrade, my project is not working anymore.
Steps required to reproduce the problem
Expected Result
Actual Result
JMS\Serializer\EventDispatcher\LazyEventDispatcher::__construct(): Argument #1 ($container) must be of type Symfony\Component\DependencyInjection\ContainerInterface, Symfony\Component\DependencyInjection\Argument\ServiceLocator given, called in /home/dev/app/cache/dev/ContainerKtlYnhv/srcKernelDevDebugContainer.php on line 13876
It's working if I comment these lines in the file : vendor/jms/serializer-bundle/DependencyInjection/Compiler/RegisterEventListenersAndSubscribersPass.php
The text was updated successfully, but these errors were encountered: