How do I enable autocomplete with phpunit.phar?
As you can see from this screenshot, I have phpunit.phar enabled and configured (unit tests do run). However, the IDE is unable to recongize the library for autocomplete:
How do I get autocomplete / type-ahead working with the phar package?
Please sign in to leave a comment.
Hi there,
Ideally it should have been referenced by IDE automatically. But since it is not, you have to do this manually: just either place it inside the project .. or place in some separate folder and add it in "Settings | PHP | Include paths" (the place where you keep it right now it not good as when referencing that folder via aforementioned "Include path" functionality it will include all subfolders as well).
Ah, adding it manually to the include path worked.
I tried to using the navigator, but it wouldn't display .phar files to add. I see now I needed to manually enter the .phar directly. That works now. Thanks! I have no idea why didn't add automatically? Maybe it had to do with the IDE configured to "auto-add" composer libraries, too?
Glad that you asked this because I was thinking the same exact thing when I started going thru the PhpStorm Workshop section on testing. I wish it was more integrated and we didn't have to set so much up but, I am new at testing so I may have came just in time when it got easier :^O