php bin/console clear-cache:
PHP致命错误:未捕获的Symfony \ Component \ Debug \ Exception \ ClassNotFoundException:试图加载类“ Use 命名空间“ UserBundle \ UserBundle”中的“ rBundle”。 您是否忘记了另一个名称空间的“使用”语句?在/var/www/html/projects/Event-Finance/api/app/AppKernel.php:21中 堆栈跟踪:#0 /var/www/html/projects/Event-Finance/api/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(48 8):AppKernel-> registerBundles()#1 /var/www/html/projects/Event-Finance/api/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(13 2):Symfony \ Component \ HttpKernel \ Kernel-> initializeBundles() #2 / var / www / html / projects / Event-Finance / api / vendor / symfony / symfony / src / Symfony / Bundle / FrameworkBundle / Console / App lication.php(64):Symfony \ Component \ HttpKernel \ Kernel-> boot() #3 /var/www/html/projects/Event-Finance/api/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php( 148):Symfony \ Bundle \ FrameworkBundle \ Console \ Application-> doRun(Object(Symfony \ Component \ Console \ Input \ ArgvInput),Object(Symfony \ Componen在/ var / www / html / projects / Event-Finance / api / app / AppKernel.php在第21行
答案 0 :(得分:0)
您的捆绑商品名称中有错字:
使用rBundle 应该是UserBundle。
答案 1 :(得分:0)
我已经花了2天的时间通过上传,多次配置symfony来解决此错误。更改目录权限等等。最后,我在Symfony 3.4项目中解决了此问题。
您需要执行2项操作来纠正此错误:
"autoload": {
"psr-4": {
"": "src/"
},
},
composer dumpautoload