The ProxyFactory was redeclaring methods 

The ProxyFactory was redeclaring methods  serialize and unserialize  on the cache file on some OSs.

This is a direct port of fix already in ORM:
https://github.com/thiagofesta/doctrine2/commit/66d2b9e0fba22e6e6b524548ee8a9c2b6df76d08