在 Symfony 2.8 和 3.0 中找不到 Assetic [英] Assetic not found in Symfony 2.8 and 3.0

查看:29
本文介绍了在 Symfony 2.8 和 3.0 中找不到 Assetic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始一个新的 Symfony 项目.在我输入之后:

I am starting a new Symfony project. After I type:

symfony new project-name

我看到新项目已创建,但我在项目中找不到 Assetic 包.另外,如果我尝试:

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

我没有找到以下命令:

assetic:dump
assetic:watch

有人可以帮我吗?我究竟做错了什么.我下载的文件有问题吗?

Could somebody help me? What am I doing wrong. Is something wrong with the files I download?

推荐答案

Assetic Bundle 自 SF 3.2 起不再包含在内.我认为这是由一些兼容性问题引起的.

The Assetic Bundle isn't included since SF 3.2. I think this is caused by some compatibility issues.

您可以手动将它们添加到您的 composer.json

You can add them manually to your composer.json

"symfony/assetic-bundle": "~2",

并将新的 Bundle 添加到您的内核中.

And add the new Bundle to your Kernel.

new Symfony\Bundle\AsseticBundle\AsseticBundle(),

那么它应该可以工作.我使用 SF 2.8 及其工作.有一些弃用警告,我不知道它是否在 SF3 下工作.

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.

这篇关于在 Symfony 2.8 和 3.0 中找不到 Assetic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆