Using a composer-installed bin
I'm running a most basic task as follows:
<autoloader autoloaderpath="vendor/autoload.php">
<target name="asdf">
<echo msg="test"/>
<phpunit configuration="app/phpunit.xml"
haltonerror="true"
haltonfailure="true"
pharlocation="bin/phpunit"
/>
</target>
Now simply running this task:
phing -debug asdf
Will result in:
+Task: echo
-calling setter EchoTask::setMsg()
[echo] qwerqwer
+Task: phpunit
-calling setter PHPUnitTask::setConfiguration()
-calling setter PHPUnitTask::setHaltonerror()
-calling setter PHPUnitTask::setHaltonfailure()
-calling setter PHPUnitTask::setPharLocation()
#!/usr/bin/env php
Cannot open file "asdf.php".
Using a .phar
Using the same configuration except pharlocation:
+Task: echo
-calling setter EchoTask::setMsg()
[echo] test
+Task: phpunit
-calling setter PHPUnitTask::setConfiguration()
-calling setter PHPUnitTask::setHaltonerror()
-calling setter PHPUnitTask::setHaltonfailure()
BUILD FINISHED
No errors, but the phpunit tasktype doesnt start.
Unrecognized option
Had a third simple variant that seemed fine, which resulted in 'phpunit: unrecognized option -- p' that i sadly cant reproduce..
Versions
- PU 5.7
- Phing 2.16
- PHP 7.1