UVdesk中Swiftmailer对接Gmail出现邮件无法发送问题
问题说明
- 使用UVdesk时持续收到报错输出,此前尝试调整php.ini内session相关配置,问题未解决
- 已修改yaml配置文件完成Gmail直连配置,对应账号验证流程已走完
- 对应输出日志内容:
[2022-07-13T01:16:45.625052+00:00] deprecation.INFO: User Deprecated: Since symfony/security-bundle 5.4: Setting the $authenticatorManagerEnabled argument of "Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector ::__construct" to "false" is deprecated, use the new authenticator system instead. {"exception":"[object] (Error Exception(code: 0): User Deprecated: Since symfony/security-bundle 5.4: Setting the $authenticatorManagerEnabled argument of \"Symfony\\Bundle\\SecurityBundle\\DataCollector\\SecurityDataCollector::__construct\" to \"false\" is deprecated, use the new authenticator system instead. at /var/www/uvdesk/vendor/symfony/security-bundle/Data Collector/SecurityDataCollector.php:52)"}
原因判定
这条是Symfony 5.4版本起新增的弃用提示日志,不属于功能性报错,和之前排查的session配置、Gmail直连配置没有关联:
- 触发逻辑是当前部署的UVdesk版本,安全层还在使用Symfony旧版认证体系,没有适配5.4版本推出的新Authenticator Manager认证系统,框架检测到旧配置后就会输出这条INFO级别的弃用提醒
- 这类deprecation级别的日志默认不会中断业务流程,也不会导致Gmail直连、工单处理等核心功能异常
处理方法
- 如果系统核心功能运行正常,仅日志中持续出现这条提示:直接修改项目日志配置,将deprecation级别的日志过滤、不写入常规业务日志即可,不需要改动现有业务配置
- 如果需要彻底消除这条提示:等待UVdesk官方发布适配Symfony新认证系统的版本后升级即可,不要手动修改vendor目录下的框架源码,否则后续版本更新时修改会被直接覆盖
- 如果过滤这条日志后仍然存在功能异常,需要查找日志中
ERROR级别的报错条目定位问题,当前这条弃用提示不是功能故障的诱因
内容的提问来源于stack exchange,提问作者orphyux
相关产品推荐
相关产品推荐

