doujishan2247 2019-07-31 09:20
浏览 81
已采纳

服务Symfony的折旧:symfony要求更改服务名称

I am currently trying for the first time to migrate from Symfony 3.4 to 4.3. I'm at the stage where I have to remove the depreciation so that I can update the dependencies via composing as the doc says I have solved all the depreciations except one that I have a little trouble here it is:

Relying on service auto-registration for type "AppBundle\Entity\AdaImporterDoc" is deprecated since Symfony 3.4 and won't be supported in 4.0. Create a service named "AppBundle\Entity\AdaImporterDoc" instead.

  • 写回答

1条回答 默认 最新

  • dsbruqxgt820011351 2019-07-31 21:57
    关注

    This is not a rare situation when upgrading to Symfony 4.

    To avoid that deprecation warning message that is, in fact, a false positive (Read This), you can replicate the way Symfony 4 works, doing the following in your app/config/config.yml:

    parameters:
        container.autowiring.strict_mode: true
    

    This way that 'fake' warning message will disappear and you will get real errors, if found.

    If you want to know what changed on autowiring, this Strict Autowiring Mode is good place to start.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 笔记本上移动热点开关状态查询
  • ¥85 类鸟群Boids——仿真鸟群避障的相关问题
  • ¥15 CFEDEM自带算例错误,如何解决?
  • ¥15 有没有会使用flac3d软件的家人
  • ¥20 360摄像头无法解绑使用,请教解绑当前账号绑定问题,
  • ¥15 docker实践项目
  • ¥15 利用pthon计算薄膜结构的光导纳
  • ¥15 海康hlss视频流怎么播放
  • ¥15 Paddleocr:out of memory error on GPU
  • ¥30 51单片机C语言数码管驱动单片机为AT89C52