bmewburn / intelephense-docs

Documentation for the Intelephense PHP language server
https://intelephense.com
Other
183 stars 17 forks source link

Using php package not in the vendor direcory #20

Open fabiosal opened 4 years ago

fabiosal commented 4 years ago

Hi ,

in symfony framework the phpunit/phpunit package isn't placed under the vendor directory as usual but inside bin/.phpunit

I think that this is the reason why intelephense can't autocomplete and lint files that involve classes related to phpunit/phpunit package properly.

Is it possible to solve this issue?

Thank you

bmewburn commented 4 years ago

I think you are probably using the phpunit phar package. Unfortunately, phar packages are not currently supported. If you are already using composer then you can get the full phpunit source code with

composer require --dev phpunit/phpunit
C0rn3j commented 2 weeks ago

Had to include /var/www/html/libraries/ in Include paths so /var/www/html/libraries/vendor/autoload.php would actually load.

settings.json:

{
    "intelephense.environment.includePaths": [
        "/var/www/html/libraries/"
    ]
}