0
votes

I'm working on a Symfony project since 3 weeks. I'd created 2 entities without any problems. But today, I've got an error with the doctrine:generate:entity command, at the end of execution, i've this message :

[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: mkdir(): File exists

I cleaned the cache, with the command and manually..

If anyone could help me..

4

4 Answers

0
votes

Are you really sure

  1. you have successful rights
  2. no issue in duplicated code (e.g. when you copy&paste existing entity into a new one and forgot to replace all code/annotations etc.)
  3. Other then that I found that mkdir() is not called safe for concurrency, so that means that some other process might have already created the directory. I openend an issue on Github for the Doctrine Bundle, which you can follow here: https://github.com/doctrine/DoctrineBundle/issues/580
0
votes

I've just encountered this myself after composer-updating this morning.

Locking the sensio/generator bundle to the previous version seems to have fixed things for now:

"require-dev": {
    "sensio/generator-bundle": "3.0.10"
}

I've opened an issue on the Sensio Bundle to see whether this is a regression or something deeper.

0
votes

try this, doctrine:generate:entity --no-debug

-1
votes

Same problem here after updating sensio/generator-bundle from version v3.0.11 to 3.1.0 on Windows 10.

Removing 3.1.0 and installing 3.0.11 solved the problem for the moment.

https://github.com/sensiolabs/SensioGeneratorBundle/issues/524