{"action":"created","issue":{"url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/9","labels_url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/9/comments","events_url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/9/events","html_url":"https://github.com/zend-server-extensions/Z-Ray-ZF2/issues/9","id":63808448,"number":9,"title":"Serialization of closure bug","user":{"login":"adamculp","id":284451,"avatar_url":"https://avatars.githubusercontent.com/u/284451?v=3","gravatar_id":"","url":"https://api.github.com/users/adamculp","html_url":"https://github.com/adamculp","followers_url":"https://api.github.com/users/adamculp/followers","following_url":"https://api.github.com/users/adamculp/following{/other_user}","gists_url":"https://api.github.com/users/adamculp/gists{/gist_id}","starred_url":"https://api.github.com/users/adamculp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamculp/subscriptions","organizations_url":"https://api.github.com/users/adamculp/orgs","repos_url":"https://api.github.com/users/adamculp/repos","events_url":"https://api.github.com/users/adamculp/events{/privacy}","received_events_url":"https://api.github.com/users/adamculp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-23T19:15:41Z","updated_at":"2015-03-24T15:46:20Z","closed_at":null,"body":"If codebase contains a closure in a module.config.php file it causes Z-Ray ZF2 extension to error with:\r\n\r\nUncaught exception 'Exception' with message 'Serialization of 'Closure' is not allowed' in /var/www/html/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:0 Stack trace: #0 /var/www/html/public/index.php(28): Zend\\Mvc\\Application->run() #1 {main} thrown\r\n\r\nExample from module.config.php:\r\n\r\n```php\r\n'service_manager' = array(\r\n    'factories' => array(\r\n          'CronManager' => function ($sm)\r\n          { \r\n            return new \\Application\\Utility\\Cron($sm->get('doctrine.cache.memcache'));\r\n          },\r\n    )\r\n)\r\n```\r\n\r\nMaybe look at makeArraySerializable()"},"comment":{"url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/comments/85568297","html_url":"https://github.com/zend-server-extensions/Z-Ray-ZF2/issues/9#issuecomment-85568297","issue_url":"https://api.github.com/repos/zend-server-extensions/Z-Ray-ZF2/issues/9","id":85568297,"user":{"login":"adamculp","id":284451,"avatar_url":"https://avatars.githubusercontent.com/u/284451?v=3","gravatar_id":"","url":"https://api.github.com/users/adamculp","html_url":"https://github.com/adamculp","followers_url":"https://api.github.com/users/adamculp/followers","following_url":"https://api.github.com/users/adamculp/following{/other_user}","gists_url":"https://api.github.com/users/adamculp/gists{/gist_id}","starred_url":"https://api.github.com/users/adamculp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamculp/subscriptions","organizations_url":"https://api.github.com/users/adamculp/orgs","repos_url":"https://api.github.com/users/adamculp/repos","events_url":"https://api.github.com/users/adamculp/events{/privacy}","received_events_url":"https://api.github.com/users/adamculp/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T15:46:20Z","updated_at":"2015-03-24T15:46:20Z","body":"OK, great. I downloaded the latest code for this extension and it was still an issue."}}