如何隐藏zend framework2不建议使用的消息

时间:2018-09-02 11:17:15

标签: zend-framework zend-framework2 zend-form

已弃用:您正在从Admin \ Controller \ IndexController类中检索服务定位符。请注意,不推荐使用ServiceLocatorAwareInterface,并将在3.0版中将其与ServiceLocatorAwareInitializer一起删除。您将需要更新类,以在创建时通过构造函数参数或setter接受所有依赖关系,并使用工厂执行注入。在/var/www/airtel-emt-credit-limit/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php在第258行上

1 个答案:

答案 0 :(得分:2)

使用error_reporting()抑制警告。

例如,在您的应用程序中,index.php文件中的第一件事:

error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);

将显示所有错误,但已弃用或user_deprecated除外。