21

我正在使用带有 Assetic 的 Symfony 版本 2.1.10,在最后一次作曲家更新之后,当我尝试运行时出现以下错误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 问题页面,但找不到任何信息...

配置.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"

作曲家.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.*",
        ...
    },
4

1 回答 1

50

改变

"symfony/assetic-bundle": "2.1.*"

"symfony/assetic-bundle": "2.3.*"

比它应该工作

于 2013-05-21T11:14:31.400 回答