phpstorm symfony2 missing service warning

后端 未结 6 1390
醉酒成梦
醉酒成梦 2021-02-14 08:46

I have installed the Symfony2 plugin for Phpstorm but I can\'t get the IDE to see these existing services or other injected objects. Can these be fixed somehow, so the warnings

6条回答
  •  不知归路
    2021-02-14 09:09

    Check to make sure your plugin is at the latest version. I know past versions of the plugin did not resolve the services automatically.

    Otherwise, you can add the following to tell the IDE what variable type $exportHelper is:

    get('Acme.csv.service');
    

    This will then give you auto-completions when typing something like "$exportHelper->".

提交回复
热议问题