symfony make:新项目上的实体崩溃 [英] symfony make:entity crash on new project

查看:57
本文介绍了symfony make:新项目上的实体崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Whenever I try to create an entity with bin/console make:entity, I get the following result:

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扩展名了?

This project is very new and there is very few code at the moment; It's the first entity I try to create in the project. I don't get why I get this since it's obvious that the file does not exist since I want to create it... I haven't found similar problem on google. Maybe I forgot to activate a php extension?

有什么主意吗?

推荐答案

如果您搞砸了并手动删除了某些类,则可能需要编写转储自动加载程序.

Might need to composer dump-autoload if you've messed up and removed some classes by hand.

这篇关于symfony make:新项目上的实体崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆