RuntimeException: PHP Fatal error: 'You cannot serialize or unserialize PDOStatement instaces' in -:31 - PHPUnit - Process Isolation and Doctrine/PDO

Flattr this
Tweet this: RuntimeException: PHP Fatal error: 'You cannot serialize or unserialize PDOStatement instaces' in -:31 - PHPUnit - Process Isolation and Doctrine/PDO
Dent this: 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:47

If 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/207

Es sind keine Trackbacks vorhanden.


Kommentare (1)

  • Kommentar von Christian am 04.10.2010 19:37:55
    Gravatar Christian

    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.

You liked it ? Link it on your homepage or blog: