{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/11056","labels_url":"https://api.github.com/repos/symfony/symfony/issues/11056/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/11056/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/11056/events","html_url":"https://github.com/symfony/symfony/issues/11056","id":34955786,"number":11056,"title":"Warning: Erroneous data format for unserializing PHP 5.4.29 and 5.5.13","user":{"login":"growBremen","id":7792846,"avatar_url":"https://avatars.githubusercontent.com/u/7792846?v=3","gravatar_id":"","url":"https://api.github.com/users/growBremen","html_url":"https://github.com/growBremen","followers_url":"https://api.github.com/users/growBremen/followers","following_url":"https://api.github.com/users/growBremen/following{/other_user}","gists_url":"https://api.github.com/users/growBremen/gists{/gist_id}","starred_url":"https://api.github.com/users/growBremen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/growBremen/subscriptions","organizations_url":"https://api.github.com/users/growBremen/orgs","repos_url":"https://api.github.com/users/growBremen/repos","events_url":"https://api.github.com/users/growBremen/events{/privacy}","received_events_url":"https://api.github.com/users/growBremen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-06-04T12:55:18Z","updated_at":"2015-08-04T13:05:00Z","closed_at":"2014-06-04T13:02:58Z","body":"When using PHP Version 5.4.29 or 5.5.13 there is an Warning, which is followed by an Fatal error due to the Object expected is false.\r\n\r\nOriginal Function \"newInstance\" in  \\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\Mapping\\ClassMetadataInfo looks like this:\r\n\r\n    public function newInstance()\r\n    {\r\n        if ($this->_prototype === null) {\r\n            $this->_prototype = unserialize(sprintf('O:%d:\"%s\":0:{}', strlen($this->name), $this->name));\r\n        }\r\n        return clone $this->_prototype;\r\n    }\r\n\r\nQuickfix for this issues:\r\n\r\n    public function newInstance()\r\n    {\r\n        if ($this->_prototype === null) {\r\n            // $this->_prototype = unserialize(sprintf('O:%d:\"%s\":0:{}', strlen($this->name), $this->name));\r\n            if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513) {\r\n                $this->_prototype = $this->reflClass->newInstanceWithoutConstructor();\r\n            } else {\r\n                $this->_prototype = unserialize(sprintf('O:%d:\"%s\":0:{}', strlen($this->name), $this->name));\r\n            }\r\n        }\r\n        return clone $this->_prototype;\r\n    }\r\n\r\nSee also:\r\n\r\nhttps://github.com/doctrine/doctrine2/pull/1045\r\nhttp://www.doctrine-project.org/jira/browse/DDC-3120\r\nhttp://stackoverflow.com/questions/24031048/fos-userbundle-unable-to-login/24035854#24035854\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/127597678","html_url":"https://github.com/symfony/symfony/issues/11056#issuecomment-127597678","issue_url":"https://api.github.com/repos/symfony/symfony/issues/11056","id":127597678,"user":{"login":"anteriovieira","id":1490347,"avatar_url":"https://avatars.githubusercontent.com/u/1490347?v=3","gravatar_id":"","url":"https://api.github.com/users/anteriovieira","html_url":"https://github.com/anteriovieira","followers_url":"https://api.github.com/users/anteriovieira/followers","following_url":"https://api.github.com/users/anteriovieira/following{/other_user}","gists_url":"https://api.github.com/users/anteriovieira/gists{/gist_id}","starred_url":"https://api.github.com/users/anteriovieira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anteriovieira/subscriptions","organizations_url":"https://api.github.com/users/anteriovieira/orgs","repos_url":"https://api.github.com/users/anteriovieira/repos","events_url":"https://api.github.com/users/anteriovieira/events{/privacy}","received_events_url":"https://api.github.com/users/anteriovieira/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T13:05:00Z","updated_at":"2015-08-04T13:05:00Z","body":"A sugestão do timonf foi bem valida. atualizei o Doctrine ORM para versão 2.4.* e funcionou legal aqui."}}