diff --git a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php index 82c18035e..74740dbe4 100644 --- a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php @@ -76,6 +76,8 @@ class extends EntityRepository mkdir($dir, 0777, true); } - file_put_contents($path, $code); + if ( ! file_exists($path)) { + file_put_contents($path, $code); + } } } \ No newline at end of file