Skip to content

[feature request] add a flag to specify tool location #405

@ju1ius

Description

@ju1ius

Hi,

For IDEs to be able to provide autocompletion for a library compiled as a PHAR, they must be able to include it's content, which is only possible if the PHAR file has the .phar extension.

Currently phive install allows to change the target directory but not the target location (the location attribute in phars.xml).

For example when running phive install -c phpunit, it creates a phpunit file inside the tools directory of the project. But if you then write a test case like this:

class MyTest extends \PHPUnit\Framework\TestCase {}

Your IDE will complain that the \PHPUnit\Framework\TestCase doesn't exist.

So now you have to:

  1. manually rename tools/phpunit to tools/phpunit.phar
  2. manually edit the location attribute in .phive/phars.xml to add the .phar extension

A minor nuisance, but which gets repeated for every project.

So it would be nice if we could either:

  • have a flag to specify the full path of the installed phar, i.e.: phive install -c -l tools/phpunit.phar phpunit
  • have a flag and/or config option to tell phive to always add/keep the .phar extension.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions