-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught exception 'Exception' with message 'Serialization of 'Closure' is not allowed' #14
Comments
@h3110w0r1d do you have a stack trace for this? But yeah, we may need some clever way of replacing those unserializable instances. Originally posted by @Ocramius at zendframework/zend-developer-tools#153 (comment) |
Stack trace:
i am sure that the line ''route_plugins' => new RoutePluginManager(),' in the config below cause this error return array(
'router' => array(
'routes' => array(
'passport' => array(
'type' => 'chain',
'options' => array(
'routes' => array(
'hostname' => array(
'type' => 'Zend\Mvc\Router\Http\Hostname',
'options' => array(
'route' => PASSPORT_HOSTNAME,
'defaults' => array(
'__NAMESPACE__' => 'Passport\Controller',
'controller' => 'Index',
'action' => 'index',
),
),
),
'scheme' => array(
'type' => 'Zend\Mvc\Router\Http\Scheme',
'options' => array(
'scheme' => 'http',
),
),
),
'route_plugins' => new RoutePluginManager(),
),
'may_terminate' => true,
'child_routes' => array(
'home' => array(
'type' => 'literal',
'options' => array(
'route' => '/',
),
),
'register' => array(
'type' => 'literal',
'options' => array(
'route' => '/register',
'defaults' => array(
'action' => 'register',
),
),
),
'login' => array(
'type' => 'literal',
'options' => array(
'route' => '/login',
'defaults' => array(
'action' => 'login',
),
),
),
'logout' => array(
'type' => 'literal',
'options' => array(
'route' => '/logout',
'defaults' => array(
'action' => 'logout',
),
),
),
),
),
),
),
); Originally posted by @h3110w0r1d at zendframework/zend-developer-tools#153 (comment) |
@h3110w0r1d yeah, I have something in RoaveDeveloperTools which may be backported here, see https://github.com/Roave/RoaveDeveloperTools/blob/424285eb861c9df7891ce7c6e66a21756eecd81c/src/Roave/DeveloperTools/Stub/SerializableValueStub.php#L44 Originally posted by @Ocramius at zendframework/zend-developer-tools#153 (comment) |
thanks
Originally posted by @h3110w0r1d at zendframework/zend-developer-tools#153 (comment) |
Still an issue. Originally posted by @Ocramius at zendframework/zend-developer-tools#153 (comment) |
a very annoying one Originally posted by @Perfect-Web at zendframework/zend-developer-tools#153 (comment) |
in the application config ,i have a route its type is 'Zend\Mvc\Router\Http\Chain', this type need a parameter 'route_plugins', so i new it in the application config.
but in the \Zend\Mvc\Router\RoutePluginManager, the initializer propery store some closures. so when the application config is serialized, the error happend.
i think we need a method named makeObjectProperySerializable in the class Collector\ConfigCollector
Originally posted by @h3110w0r1d at zendframework/zend-developer-tools#153
The text was updated successfully, but these errors were encountered: