简体   繁体   中英

Remove “Remaining deprecation notices” in Symfony 2.8

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?

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)

You can run in terminal

export SYMFONY_DEPRECATIONS_HELPER=weak

Before executing your script. It will disable deprecation notices

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM