Drupal 8 : Succesfully disable E_DEPRECATED in Wamp 3.1.3

So I was having a hard time in a Drupal 8.2 installation and the new Wamp64 3.1.3.

As I was using PHP 7.2, a lot of deprecated code is running in that old version of Drupal, so I receive a lot of screens like this:

 


My first try was to update the php.ini settings and modify the part of error_reporting

This was the normal way to update that error_reporting stuff long ago in Drupal


Currently using Visual Studio Code - Long Live the empire

But to no avail. As I learned, Drupal somehow change this behaviour to suit his need. So there's a simple way to fix this:

Fixing the E_DEPRECATED

Simply go to your sites/default/settings.php and put this line in the end:

error_reporting(E_ALL & ~E_DEPRECATED);


And that's it. With this code you are overwriting the default settings that drupal use to work.

Also, maybe you're having the same problem with your CRM or WebApp of election. Maybe you should test putting this in your code to see if it's our app overwriting the php.ni settings.

Have a good one!

No comments: