Why is Doctrine 2 creating the ~ Entity.php file?

When I create my entities, I have a file with the prefix ~ as a backup file or something

Is this a mistake or do you need to manually delete them?

+4
source share
1 answer

From the official documentation in the Symfony2 CLI team:

$> php app/console help doctrine:generate:entities

....

By default, an unmodified version of each object is backed up and (for example, Product.php ~). To prevent this task from creating a backup file, pass the -no-backup option:

  php app/console doctrine:generate:entities Blog/Entity --no-backup 

So, to summarize, you can add --no-backup to your command.

+9
source

Source: https://habr.com/ru/post/1342701/


All Articles