Remove “Remaining deprecation notices” in Symfony 2.8

拥有回忆 提交于 2019-12-20 08:46:52

问题


I'm new on Symfony and PHPUnit.

I would like to run some tests, there are a lot of deprecation notices. But it does not matter because I'll stay on Symfony 2.8 for now. Do you know if it's possible to remove them?

I try to find out by myself, but it's not working, have you got some ideas for me folks ?

How to remove the deprecation warnings in Symfony 2.7?

Disable deprecated warning in Symfony 2(.7)


EDIT :

Reference to the answer of @LBA

My screenshot is not really about the error of the AsseticBundle, but about the "Remaining deprecation notices (220)". I would like to know if there is a flag somewhere to display, or not, these warnings. I would like to just have the result of my test suit. Is that possible?


回答1:


Finally found the solution !

Just add

<php>
    <env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>

to your phpunit.xml (or any other file that you use to configure phpunit)




回答2:


You can run in terminal

export SYMFONY_DEPRECATIONS_HELPER=weak

Before executing your script. It will disable deprecation notices




回答3:


This is a known issue of the AsseticBundle which isn't part of the official Symfony distribution anymore and not ready for 3.0 yet (having some deprecations in the current tagged version - which you can see in your error message).

So please follow and wait for this issue to be solved and update your AsseticBundle when it's ready (or go with the current master of it what I wouldn't recommend to do.

A lot of people trying to upgrade to Symfony 2.8/3.0 have this issue currently.

Link to the Issue on Github



来源:https://stackoverflow.com/questions/35897550/remove-remaining-deprecation-notices-in-symfony-2-8

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