本文介绍了Symfony 2 Assetic 致命错误:在资产转储中找不到“Assetic\Util\PathUtils"类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Assetic 中使用 Symfony 2.1.10 版,在最后一次 Composer 更新后,当我尝试运行 php app/console assetic:dump
I'm using Symfony version 2.1.10 with Assetic and after the last composer update I get the follwoing error when I try to run php app/console assetic:dump
Dumping all dev assets.
Debug mode is on.
Fatal error: Class 'Assetic\Util\PathUtils' not found in /vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php on line 216
我不知道这里出了什么问题.我检查了 Assetic 和 Symfony 2 的 GitHub 问题页面,但找不到任何信息......
I have no idea what is going wrong here. I checkt the GitHub issue page of Assetic and Symfony 2 and couldn't find any information ...
config.yml:
config.yml:
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: ['FOSUserBundle', 'vaamoLandingPageBundle']
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
composer.js:
composer.js:
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.1.*",
"twig/extensions": "1.0.*@dev",
"symfony/assetic-bundle": "2.1.*",
...
},
推荐答案
更改
"symfony/assetic-bundle": "2.1.*"
到
"symfony/assetic-bundle": "2.3.*"
比它应该工作
这篇关于Symfony 2 Assetic 致命错误:在资产转储中找不到“Assetic\Util\PathUtils"类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!