{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/276","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/276/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/276/events","html_url":"https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/issues/276","id":127321964,"number":276,"title":"Fatal error with SF2.8 and custom AppCache.php","user":{"login":"marcobarcaro","id":4013410,"avatar_url":"https://avatars.githubusercontent.com/u/4013410?v=3","gravatar_id":"","url":"https://api.github.com/users/marcobarcaro","html_url":"https://github.com/marcobarcaro","followers_url":"https://api.github.com/users/marcobarcaro/followers","following_url":"https://api.github.com/users/marcobarcaro/following{/other_user}","gists_url":"https://api.github.com/users/marcobarcaro/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobarcaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobarcaro/subscriptions","organizations_url":"https://api.github.com/users/marcobarcaro/orgs","repos_url":"https://api.github.com/users/marcobarcaro/repos","events_url":"https://api.github.com/users/marcobarcaro/events{/privacy}","received_events_url":"https://api.github.com/users/marcobarcaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T22:17:52Z","updated_at":"2016-01-19T14:16:27Z","closed_at":null,"body":"Hi,\r\nI ran into this fatal error with SF2.8 and FOS http cache bundle with custom AppCache:\r\n\r\nFatal error: Cannot redeclare class Symfony\\Component\\HttpFoundation\\RequestMatcherInterface in ...\\Test\\app\\cache\\prod\\classes.php on line 965\r\n503 Service Unavailable\r\n\r\nLine 965 is:\r\ninterface RequestMatcherInterface\r\n\r\nOther files are:\r\n// app.php\r\n$kernel = new AppKernel('prod', false);\r\n$kernel->loadClassCache();\r\n$kernel = new AppCache($kernel);\r\n\r\n// AppCache.php\r\nuse FOS\\HttpCacheBundle\\SymfonyCache\\EventDispatchingHttpCache;\r\nclass AppCache extends EventDispatchingHttpCache\r\n{\r\n\tpublic function getOptions()\r\n\t{\r\n\t\treturn [];\r\n\t}\r\n}\r\n\r\nWith regular SF2.8 AppCache.php everything is fine:\r\n// AppCache.php\r\nuse Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache;\r\nclass AppCache extends HttpCache\r\n{\r\n}\r\n\r\nAny suggestion?"},"comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/comments/172865919","html_url":"https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/issues/276#issuecomment-172865919","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSHttpCacheBundle/issues/276","id":172865919,"user":{"login":"marcobarcaro","id":4013410,"avatar_url":"https://avatars.githubusercontent.com/u/4013410?v=3","gravatar_id":"","url":"https://api.github.com/users/marcobarcaro","html_url":"https://github.com/marcobarcaro","followers_url":"https://api.github.com/users/marcobarcaro/followers","following_url":"https://api.github.com/users/marcobarcaro/following{/other_user}","gists_url":"https://api.github.com/users/marcobarcaro/gists{/gist_id}","starred_url":"https://api.github.com/users/marcobarcaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcobarcaro/subscriptions","organizations_url":"https://api.github.com/users/marcobarcaro/orgs","repos_url":"https://api.github.com/users/marcobarcaro/repos","events_url":"https://api.github.com/users/marcobarcaro/events{/privacy}","received_events_url":"https://api.github.com/users/marcobarcaro/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T14:16:27Z","updated_at":"2016-01-19T14:16:27Z","body":"Hi,\r\nyou are right. If I clear the prod cache with --no-warmup option the error is not raise anymore, but the same configuration with SF2.7 is working, so I guess something has changed."}}