Remove "Remaining deprecation notices" in Symfony 2.8

PhpSymfonyTestingPhpunit

Php Problem Overview


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?

enter image description here

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

https://stackoverflow.com/questions/34284480/how-to-remove-the-deprecation-warnings-in-symfony-2-7

https://stackoverflow.com/questions/28850809/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?

Php Solutions


Solution 1 - Php

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)

Solution 2 - Php

You can run in terminal

export SYMFONY_DEPRECATIONS_HELPER=weak

Before executing your script. It will disable deprecation notices

Solution 3 - Php

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChilipoteView Question on Stackoverflow
Solution 1 - PhpRomain BigzView Answer on Stackoverflow
Solution 2 - PhpSerghei NiculaevView Answer on Stackoverflow
Solution 3 - PhpLBAView Answer on Stackoverflow