AsseticBundle removed from all the Symfony's versions

北城以北 提交于 2019-11-28 14:12:20

问题


I wanted to know why AsseticBundle has been removed from all the versions of Symfony.

I looked everywhere and I don't found any site talking about this news that began for some weeks.

Initially, I thought they deleted this Bundle because there is a security flaw that will take a few days to be repaired.

This Bundle is indisponsable for including javascript and css file type from an external folder and I wanted to be sure if this Bundle wille be replaced by an another in Symfony or I should add this Bundle manually.

Thanks


回答1:


The AsseticBundle is not compatible/maintained with the new version of the framework (2.8/3.x).

See the tweet of Fabpot that asking: Honest question: is #Assetic still relevant for #Symfony 3.0?

And the PR remove AsseticBundle (you can find good discussion about for and against the removal of Assetic).

Check also this great article on Symfony and Asset Management that clarify and riassume all the discussion around.

Hope this help




回答2:


Although Symfony does not support assetic from versions 2.8 upwards, you can still install it by running:

composer require symfony/assetic-bundle

and then enable the bundle in your AppKernel.php like so:

new Symfony\Bundle\AsseticBundle\AsseticBundle()


来源:https://stackoverflow.com/questions/34096764/asseticbundle-removed-from-all-the-symfonys-versions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!