Search code examples
ubuntu-20.04symfony5

Symfony : Wrong path when generating entity on Linux Ubuntu


On Symfony 5 I've got an issue when generating an entity on a subdirectory on Linux Ubuntu 20.04 (don't have this issue on Windows). I use PhpStorm.

For example I generate an entity Event\Category so I do :

php bin/console make:entity Event\Category

And instead of generating my entity like src/Event/Category.php I get this result:

src/EventCategory.php

Does someone know how can I fix it? Thank you.


Solution

  • try to use

    php bin/console make:entity Event\\Category
    

    \ is the bash a special Charater, with -double you escape that