LoginSignup
1
0

More than 3 years have passed since last update.

laravel-ide-helperの"Str"と"Arr"がphpstormでコード補完されない

Last updated at Posted at 2020-03-22

起きたこと

laravel-ide-helperを入れてvscodeで開発していたが、気分でphpstormに切り替えたら全然コード補完してくれない。phpstormでも使いたいので対処方を記す。拡張機能はそれぞれ、vscodeにintelephense、phpstormにはlaravelくらいしか入れていない。

phpstorm
1dfd7b29247b1751db1488f624b49485.gif

vscode
7ae9a559dba30c7b58d1289161bf4762.gif

原因

大体の流れはこれ
Laravel added aliases for 'Arr' and 'Str' no autocomplete from helper #784
昨年2月にlaravel本体でマージされたalias追加でide-helperに不具合が生じた。対応は誰か試みたらしいがテストが通らないっぽくて放置されてる。

対処方

生成した"_ide_helper.php"のnamespaceをコメントアウト(または削除)する。
ba063115db4811efd422820b212549f9.png

すると補完される。
59cdfa7915b72c54394f910e2c7f6b03.gif

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0