Deployer: Code completion for PHPStorm

Created on 4 Aug 2016  路  4Comments  路  Source: deployphp/deployer

| Q | A |
| --- | --- |
| Issue Type | Feature Request |
| Deployer Version | N/A |
| Local Machine OS | N/A |
| Remote Machine OS | N/A |

Description

Is it possible to have code completion in PHPStorm for deployer when it's installed globally (not via composer)? Since the require path is relative to the phar being executed, right now PHPStorm can't find the content of recipe/symfony.php

Most helpful comment

I got this working by renaming /usr/local/bin/dep to /usr/local/bin/deployer.phar (since PHPStorm will only index files with .phar ending). I then set a symbolic link for convenience back to dep

mv /usr/local/bin/dep /usr/local/bin/deployer.phar
ln -s /usr/local/bin/deployer.phar /usr/local/bin/dep

Then in PHPStorm I added /usr/local/bin to my include path under PHPStorm -> Preferences -> Language & Frameworks -> PHP

All 4 comments

I got this working by renaming /usr/local/bin/dep to /usr/local/bin/deployer.phar (since PHPStorm will only index files with .phar ending). I then set a symbolic link for convenience back to dep

mv /usr/local/bin/dep /usr/local/bin/deployer.phar
ln -s /usr/local/bin/deployer.phar /usr/local/bin/dep

Then in PHPStorm I added /usr/local/bin to my include path under PHPStorm -> Preferences -> Language & Frameworks -> PHP

Nice solution! I think this must go to docs.

One thing that's not perfect about this method is that it still doesn't autocomplete the require path for recipe/symfony.php. Not sure if there's a way to accomplish this in PHPStorm.

Done.

Was this page helpful?
0 / 5 - 0 ratings