Permalink
Browse files

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:
thiagofesta/doctrine2@66d2b9e
  • Loading branch information...
1 parent 84ad950 commit 6e739c6a2d7abb32206fe4a0c6451d8d92c95462 @deresh deresh committed Mar 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/ODM/PHPCR/Proxy/ProxyFactory.php
@@ -204,7 +204,7 @@ private function generateMethods(ClassMetadata $class)
foreach ($class->reflClass->getMethods() as $method) {
/* @var $method \ReflectionMethod */
- if ($method->isConstructor() || strtolower($method->getName()) == '__sleep') {
+ if ($method->isConstructor() || strtolower($method->getName()) == '__sleep' || $class->reflClass->getName() != $method->class) {
continue;
}

0 comments on commit 6e739c6

Please sign in to comment.