{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1770","repository_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1770/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1770/comments","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1770/events","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1770","id":133246105,"number":1770,"title":"ErrorException: unserialize()","user":{"login":"theofidry","id":5175937,"avatar_url":"https://avatars.githubusercontent.com/u/5175937?v=3","gravatar_id":"","url":"https://api.github.com/users/theofidry","html_url":"https://github.com/theofidry","followers_url":"https://api.github.com/users/theofidry/followers","following_url":"https://api.github.com/users/theofidry/following{/other_user}","gists_url":"https://api.github.com/users/theofidry/gists{/gist_id}","starred_url":"https://api.github.com/users/theofidry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theofidry/subscriptions","organizations_url":"https://api.github.com/users/theofidry/orgs","repos_url":"https://api.github.com/users/theofidry/repos","events_url":"https://api.github.com/users/theofidry/events{/privacy}","received_events_url":"https://api.github.com/users/theofidry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-12T13:48:49Z","updated_at":"2016-02-12T13:52:48Z","closed_at":null,"body":"When trying to run the fixer (`@2.0-dev` on OSX 10.9) I got the following error:\r\n\r\n```\r\n  [ErrorException]\r\n  unserialize(): Error at offset 4009 of 4540 bytes\r\n\r\nException trace:\r\n () at /myPath/.composer/vendor/fabpot/php-cs-fixer/src/FileCacheManager.php:127\r\n {closure}() at n/a:n/a\r\n unserialize() at /myPath/.composer/vendor/fabpot/php-cs-fixer/src/FileCacheManager.php:127\r\n PhpCsFixer\\FileCacheManager->readFromFile() at /myPath/.composer/vendor/fabpot/php-cs-fixer/src/FileCacheManager.php:54\r\n PhpCsFixer\\FileCacheManager->__construct() at /myPath/.composer/vendor/fabpot/php-cs-fixer/src/Fixer.php:119\r\n PhpCsFixer\\Fixer->fix() at /myPath/.composer/vendor/fabpot/php-cs-fixer/src/Console/Command/FixCommand.php:354\r\n PhpCsFixer\\Console\\Command\\FixCommand->execute() at /myPath/.composer/vendor/symfony/console/Command/Command.php:259\r\n Symfony\\Component\\Console\\Command\\Command->run() at /myPath/.composer/vendor/symfony/console/Application.php:844\r\n Symfony\\Component\\Console\\Application->doRunCommand() at /myPath/.composer/vendor/symfony/console/Application.php:192\r\n Symfony\\Component\\Console\\Application->doRun() at /myPath/.composer/vendor/symfony/console/Application.php:123\r\n Symfony\\Component\\Console\\Application->run() at /Users/Theo/.composer/vendor/fabpot/php-cs-fixer/php-cs-fixer:44\r\n```\r\n\r\nAs it comes from the `FileCacheManager` I suspected a cache issue and indeed deleting `.php_cs.cache` solved the problem. I'm still reporting this issue as I believe it should be handled a better way somehow (cache invalid? get rid of it for example)."},"comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments/183338690","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1770#issuecomment-183338690","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1770","id":183338690,"user":{"login":"keradus","id":2716794,"avatar_url":"https://avatars.githubusercontent.com/u/2716794?v=3","gravatar_id":"","url":"https://api.github.com/users/keradus","html_url":"https://github.com/keradus","followers_url":"https://api.github.com/users/keradus/followers","following_url":"https://api.github.com/users/keradus/following{/other_user}","gists_url":"https://api.github.com/users/keradus/gists{/gist_id}","starred_url":"https://api.github.com/users/keradus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keradus/subscriptions","organizations_url":"https://api.github.com/users/keradus/orgs","repos_url":"https://api.github.com/users/keradus/repos","events_url":"https://api.github.com/users/keradus/events{/privacy}","received_events_url":"https://api.github.com/users/keradus/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T13:52:48Z","updated_at":"2016-02-12T13:52:48Z","body":"Could you please provide the `.php_cs.cache` file that was revealed the issue?"}}