symfony make:entity 在新项目上崩溃

symfony make:entity crash on new project

每当我尝试使用 bin/console make:entity 创建实体时,我都会得到以下结果:

php bin/console make:entity

 Class name of the entity to create or update (e.g. FierceElephant):
 > Video


In DebugClassLoader.php line 337:

  Warning: include(/home/user/work/project1/vendor/composer/../../src/Entity/Video.php): failed to open stream: No such file or directory  

这个项目很新,目前代码很少;这是我尝试在项目中创建的第一个实体。我不明白为什么我会得到这个,因为很明显该文件不存在,因为我想创建它...... 我在 google 上没有发现类似的问题。也许我忘记激活 php 扩展?

有什么想法吗?

如果您搞砸了并手动删除了一些 类,可能需要 composer dump-autoload。