RuntimeException: PHP Fatal error: 'You cannot serialize or unserialize PDOStatement instaces' in -:31 - PHPUnit - Process Isolation and Doctrine/PDO
Datum: 03.10.2010 21:35:47If you ever get this message:
RuntimeException: PHP Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDOStatement instances' in -:31
Stack trace:
#0 [internal function]: PDOStatement->__sleep()
#1 -(31): serialize(Array)
#2 -(190): __phpunit_run_isolated_test()
#3 {main}
thrown in - on line 31
Something with a doctrine/pdo went wrong in one of your tests, but since serialize does not work on pdo-classes, it prints out only this message.
If you want doctrines/PDOs message, run only this one test with process isolation turned off and you will get the error-message.
Really bad to debug on a continous-integration-system if it fails only there :)
Trackbacks (0)
Trackbackurl: http://www.robo47.net/trackback/blogentry/207Es sind keine Trackbacks vorhanden.
You liked it ? Link it on your homepage or blog:



Benjamin Steininger ist Webentwickler auf der Suche nach einem neuen Job und
photographiert sehr gerne. Er beschäftigt sich viel mit dem Internet, PHP, Symfony, Testing und hat einen
Kommentare (1)
As far as I remember this happens because PDO Statements have a link to an Exception object which contains a full backtrace with relations to probably all executed so far.
If you're in control of the classes serialized overloading __serialize() and __unserialize() and removing the exception shall work.
Die Kommentare zu diesem Beitrag sind gesperrt.