问题
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