Symfony 2 Assetic Fatal error: Class 'Assetic\Util\PathUtils' not found on asset dump
Asked Answered
S

1

21

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

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:

# 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:

"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.*",
        ...
    },
Swenson answered 20/5, 2013 at 18:12 Comment(4)
Can you show us your assetic config?Diphenylhydantoin
Sure. Why didn't I think of this beforehand ...Swenson
Your config is fine, can you post the related part of your composer.json?Venial
Have you tried adding "kriswallsmith/assetic": "1.1.*@dev" in your composer?Venial
M
50

Change

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

to

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

than it should work

Magnificent answered 21/5, 2013 at 11:14 Comment(1)
is it a bug of the version 2.1?Laquitalar

© 2022 - 2024 — McMap. All rights reserved.