1

I've installed both Composer and Phing via PHPStorm and its capability to run these tools via their .phar-file distribution. So both tools are running "within" their .phar-file.

I created a build.xml and tried to run it within PHPStorm which fails like:

/usr/bin/php /Users/.../dev/phing/phing-latest.phar -f /Users/.../branches/dev/build/build.xml -Dversion=...
Buildfile: /Users/.../branches/dev/build/build.xml

BUILD FAILED
Error reading project file [wrapped: You must have installed the PEAR Archive_Tar class in order to use TarTask.]
Total time: 0.0808 seconds

[PHP Error] include_once(Archive/Tar.php): failed to open stream: No such file or directory [line 75 of phar:///Users/.../dev/phing/phing-latest.    phar/classes/phing/tasks/ext/TarTask.php]
[PHP Error] include_once(): Failed opening 'Archive/Tar.php' for inclusion (include_path='phar:///Users/.../dev/phing/phing-latest.phar/bin/..    /classes:.:') [line 75 of phar:///Users/.../dev/phing/phing-latest.phar/classes/phing/tasks/ext/TarTask.php]

I installed the required components via composer:

{
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.php.net"
        }
    ],
    "require": {
        "phing/phing" : "2.*",
        "pear-pear.php.net/pear": "*"
    }
}

Basically it's pretty clear what's wrong here, but I'm curious what's the best way out of it. I'm looking for a way out of it, without running into too much further dependencies. The way described above has the charm of being easily adapted to other workstations and other deployment environments. So what I'm looking for is a way to make this work without further environment setup.

Is there a way to influence the include_path in this scenario? I already tried to put the appropriate directories in the PHPStorm PHP Settings but it doesn't seem to be interpreted while staring a build target in the "Phing Build"-Window.

3
  • Appears like to relate with this kind of problem, but without less options to influence the environment at script runtime: Related Question related to run PHPUnit in a similar way Commented Jan 21, 2014 at 11:08
  • In PhpStorm, where you manage your PHP Interpreters, you can pass parameters to the include_path and point to the folder where missing files are located. Commented Jan 21, 2014 at 11:10
  • I guess I've done exactly that. This path has even automatically included there: /Users/.../branches/dev/vendor/pear-pear.php.net/Archive_Tar Commented Jan 21, 2014 at 11:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.