Closed mfoti closed 2 years ago
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
Same problem.
I can't use this library inside a symfony project, below the stack trace:
TypeError: Cannot assign Laravel\SerializableClosure\Serializers\Native to property Symfony\Component\HttpFoundation\Session\SessionBagProxy::$usageReporter of type ?Closure
at vendor/laravel/serializable-closure/src/Serializers/Native.php:501 at ReflectionProperty->setValue(object(SessionBagProxy), object(Native)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:501) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(SessionBagProxy)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array('attributes' => object(SessionBagProxy), 'flashes' => object(SessionBagProxy), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(NativeSessionStorage)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(Session)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(Request)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array(object(Request), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(RequestStack)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(DebugProcessor)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array(object(DebugProcessor), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(Logger)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(RedisAdapter)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(TraceableCacheAdapterForV3)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(TraceableAdapter)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(PhpArrayAdapter)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(PsrCachedReader)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(AnnotationDriver)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array('App\Entity' => object(AnnotationDriver), 'Sonata\UserBundle\Entity' => object(SimplifiedXmlDriver), 'Sonata\MediaBundle\Entity' => object(SimplifiedXmlDriver), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(MappingDriverChain)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(MappingDriver)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array('entityNamespaces' => array('App' => 'App\Entity', 'SonataUserBundle' => 'Sonata\UserBundle\Entity', 'SonataMediaBundle' => 'Sonata\MediaBundle\Entity'), 'metadataCache' => object(ArrayAdapter), 'metadataCacheImpl' => object(DoctrineProvider), 'queryCache' => object(TraceableAdapter), 'queryCacheImpl' => object(DoctrineProvider), 'metadataDriverImpl' => object(MappingDriver), 'proxyDir' => '/var/www/html/var/cache/dev/doctrine/orm/Proxies', 'proxyNamespace' => 'Proxies', 'autoGenerateProxyClasses' => 1, 'classMetadataFactoryName' => 'Doctrine\Bundle\DoctrineBundle\Mapping\ClassMetadataFactory', 'defaultRepositoryClassName' => 'Doctrine\ORM\EntityRepository', 'namingStrategy' => object(UnderscoreNamingStrategy), 'quoteStrategy' => object(DefaultQuoteStrategy), 'entityListenerResolver' => object(ContainerEntityListenerResolver), 'repositoryFactory' => object(ContainerRepositoryFactory), 'customStringFunctions' => array('month' => 'DoctrineExtensions\Query\Mysql\Month', 'day' => 'DoctrineExtensions\Query\Mysql\Day'), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(Configuration)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(EntityManager)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:498) at Laravel\SerializableClosure\Serializers\Native->mapByReference(object(Query)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:434) at Laravel\SerializableClosure\Serializers\Native->mapByReference(array('query' => object(Query), 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY' => true)) (vendor/laravel/serializable-closure/src/Serializers/Native.php:141) at Laravel\SerializableClosure\Serializers\Native->__serialize() at serialize(object(SerializableClosure)) (vendor/spatie/async/src/Runtime/ParentRuntime.php:87) at Spatie\Async\Runtime\ParentRuntime::encodeTask(object(SerializableClosure)) (vendor/spatie/async/src/Runtime/ParentRuntime.php:69) at Spatie\Async\Runtime\ParentRuntime::createProcess(object(Closure), null, '/usr/local/sbin/php-fpm') (vendor/spatie/async/src/Pool.php:143) at Spatie\Async\Pool->add(object(Closure))