[DDC-1136] Prevent backup files to be recognized as valid Entity files Created: 05/May/11  Updated: 14/May/11  Resolved: 14/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.0.4, Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Fabien Potencier Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

all



 Description   

The Doctrine2 generator backup Entity files when it adds code into them. The files are named after the original file with a ~ prepended.

The problem is that these backup files are valid PHP files, and as such, they are loaded by Doctrine2. A PHP fatal error is then fired: "Cannot redeclare class...".

Instead of prepending , why not appending ~, which is a well supported convention? (foo.php vs ~foo.php)

Patch is here: https://github.com/doctrine/doctrine2/pull/35



 Comments   
Comment by Benjamin Eberlei [ 14/May/11 ]

Applied and merged to 2.0.x

Generated at Fri Aug 29 16:19:33 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.