英文:
How can I fix a class not found after composer update in Symfony?
问题
自从我运行了composer update
之后,我收到了以下错误信息:
找不到类 "Oneup\UploaderBundle\Uploader\Naming\UniqidNamer",
在加载 "App\Controller\myApp\OriginalNameNamer" 时发生了错误。
我无法弄清楚如何修复它。
我尝试了再次运行composer install
,以及运行composer dumpautoload
,但都没有帮助。
在我运行composer update
之前,一切都很正常。
英文:
I made a composer update
and since then I get an error message:
> Class "Oneup\UploaderBundle\Uploader\Naming\UniqidNamer" not found
> while loading "App\Controller\myApp\OriginalNameNamer".
And I just cannot figure out to fix it.
I made again composer install
, and also composer dumpautoload
but nothing helps
Everything was fine until I made composer update..
答案1
得分: 3
根据您的composer.json文件,该类完全缺失在您的项目中。可能以前它是某个其他包的依赖项,但现在不是了。
然而,您在代码中使用依赖项并不会让composer自动安装它。
只需运行
composer require oneup/uploader-bundle
它就会重新出现在您的项目中。
英文:
According to your composer.json the class is missing from your project completely. It could be that it was dependency of some other package before, but now isn't.
However, the fact you're using dependency in your code doesn't make composer install it.
Simply run
composer require oneup/uploader-bundle
and it will be back in your project
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论