我的 Ubuntu 有问题,所以我需要重新安装所有内容。几乎所有的事情都完成了,但是当我在PhpStorm上用Symfony开始一个新项目时,当我在终端中做一个composer install
或composer update
时,我有一个我不知道如何处理的错误。
Script SensioBundleDistributionBundleComposerScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught SymfonyComponentDebugExceptionClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace.
Did you forget a "use" statement? in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(284): SymfonyComponentConfigUtilXmlUtils::loadFile('/var/www/html/E...', Array)
#1 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): SymfonyComponentDependencyInjectionLoaderXmlFileLoader->parseFileToDOM('/var/ww
w/html/E...')
#2 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(57): SymfonyComponentDependencyInjectionLoaderXmlFileLoader->load('web.xm
l')
#3 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/
Config/Util/XmlUtils.php on line 52
我尝试通过此链接安装作曲家但我不记得使用过这种做法。
所以我无法推进我的项目,因为我无法超越作曲家......如果有人知道为什么并且可以给我一个循序渐进的方法,那将不胜感激。
谢谢
PHP 的 DOMDocument 库未安装。您需要安装它。尝试-
sudo apt-get install php-dom