我正在尝试使用Symfony创建命令行工具,但是每当出现错误时,它都会发出这种警告:
[php] User Deprecated: The "Symfony\Component\Console\Event\ConsoleExceptionEvent" class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead.
[
"exception" => ErrorException {
#message: "User Deprecated: The "Symfony\Component\Console\Event\ConsoleExceptionEvent" class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead."
#code: 0
#file: "./vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php"
#line: 14
#severity: E_USER_DEPRECATED
trace: {
./vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php:14 { …}
./vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:146 { …}
Symfony\Component\Debug\DebugClassLoader->loadClass() {}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:974 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:248 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74 { …}
./vendor/xxxx/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 { …}
./bin/console:28 {
› $application = new Application($kernel);
› $application->run($input);
›
}
}
}
]
因此,似乎该框架正在引发有关其自身类的弃用警告。有什么方法可以禁用此功能吗?