phpphpstormpharphp-deployer

How to include part of PHAR in PhpStorm Include path


I'm using PhpStorm and Deployer so I included deployer.phar in PHP Include paths to have auto-completion in deploy.php file. After including the whole deployer.phar PhpStorm complains about duplicate class definition - one coming from my app vendor directory, and second from deployer.phar vendor directory.

Is it somehow possible to configure PhpStorm Include paths so only some parts of PHAR file (ex. only the src directory) are included? This doesn't work:

/path/to/deployer.phar/src

nor this:

phar:///path/to/deployer.phar/src

I want to avoid installing deployer/deployer as composer dev package.

EDIT

It seems that even adding single PHAR file in Include paths is kind of a hack.


Solution

  • It's not possible currently. As a workaround you can unpack deployer.phar somewhere and add extracted deployer.phar/src to Include paths. Not convenient, but would work.