I am starting a new Symfony project. After I type:
symfony new project-name
I see that the new project is created but I don't find the Assetic bundle inside the project. Also if I try:
app/console
I don't find the following commands:
assetic:dump
assetic:watch
Could somebody help me? What am I doing wrong. Is something wrong with the files I download?
The Assetic Bundle isn't included since SF 3.2. I think this is caused by some compatibility issues.
You can add them manually to your composer.json
"symfony/assetic-bundle": "~2",
And add the new Bundle to your Kernel.
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
Then it should work. I use SF 2.8 and its working. There are some deprecation warnings and i don't know if its working under SF3.
AsseticBundle was only removed from the standard distribution in 2.8. This means that if you wish to use Assetic, you may still do so, by including the dependency manually, by running:
composer require symfony/assetic-bundle
And adding the bundle in your AppKernel:
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
One thing to know, though. AsseticBundle has not yet been migrated to 3.0.
Thus, you won't be able to use it (for now) if you wish to start a 3.0 project. That's also the case for quite a few bundles (and among them the Sonata bundles), and even though some developers have started work on migrating to 3.0 release before the official release, last week, some bundles still need quite a lot work to be made compatible with 3.0.
Hopefully, AsseticBundle (and other) should be migrated over the next months. Or if you're impatient, you can still contribute to Assetic, or AsseticBundle! ;)
Edit: AsseticBundle should be tagged by the end of the month, if not before, as stof said in this issue: https://github.com/symfony/assetic-bundle/issues/401
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With