How to remove the deprecation warnings in Symfony 2.7?

陌路散爱 提交于 2019-12-02 07:37:25

问题


The dreaded "is deprecated since version 2.6 and will be removed in 3.0" errors that Symfony is outputting all over the logs and console. I've followed all the guidelines I found that claim to solve it, including upgrading sensio/distribution-bundle and putting ~E_USER_DEPRECATED into php.ini

Still getting these messages spammed over me. Aside from some hard measures like forking Symfony or overwriting the trigger_error function, what am I missing?

php.ini:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

bootstrap.php.cache:

namespace {
    error_reporting(error_reporting() & ~E_USER_DEPRECATED);
    $loader = require_once __DIR__.'/./autoload.php';
}

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

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