问题描述
我一直在使用Symfony开发一个网站。一切都很好,直到今天早些时候,我使用DoctrineFixturesBundle添加了一些Fixture,并运行了 app / console命令。我收到以下错误:
I have been developing a website using Symfony. Everything was good until earlier today I was adding some Fixtures using the DoctrineFixturesBundle and ran the "app/console" command. I received the following error:
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
Symfony\\Bundle\\AsseticBundle\\EventListener\\RequestListener
is not a valid class name for the "assetic.request_listener" service.
我尝试撤消对灯具所做的更改以发现错误,但它没有改变。用我的无限智慧,我决定尝试通过运行 composer update来更新我的供应商,但是它不起作用。
I tried undoing the changes I made to the fixtures to find my mistake and it didn't change. In my infinite wisdom, I decided to try updating my vendors by running "composer update" and it didn't work.
此外,当我在浏览器中运行网站时,我也遇到同样的错误。
Also, when I run my site in a browser, I get the same error.
我不知道发生了什么。
I don't know what's going on. Someone please help, any help appreciated.
推荐答案
只是想让大家知道我如何解决它。这不是最优雅的解决方案,但确实有效。我下载了一家新的Symfony公司,将其复制到所有捆绑包,整个配置目录,composer.json和AppKernel.php中。它消除了我所有的错误,甚至消除了我遇到的某些缓存问题。
Just wanted to let you all know how I fixed it. It's not the most elegant solution but it worked. I downloaded a new company of Symfony, copied over all my bundles, my whole config directory,my composer.json, and my AppKernel.php. It got rid of all my errors, even some cache issues I was getting.
这篇关于运行应用程序/控制台时出现Symfony InvalidArgumentException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!