View Full Version : How to use PHPUnit 4.6 PHAR with IDE 9

I have been unsuccessful in trying to use PHPUnit with Komodo IDE 9. I have installed PHPUnit 4.6.7 (stable) using the recommended approach using a .phar. Running tests through the command line works properly but cannot run tests through Komodo.
It seems the harness cannot find the correct PHPUnit libraries as I get the following error:
Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\komodo\harnesses\php\Base\Har nessSelector.php on line 10I have read this thread http://forum.komodoide.com/t/how-to-use-phpunit-with-komodo/1420 and have not been able to find a fix in that thread.
Any recommendations?

That is disappointing. Unfortunately using a 2 year old version of a core technology isn't really an option for me at my job.
I was able to cobble something together with edits to HarnessSelector.php and Printer.php and it seems to be working for me now.

Surely there's a way to make this work. The older version of phpunit (3.7.24) has a host of problems itself, not the least of which is that its documentation is disappearing from the web. Newer versions are distributed ONLY as phar files.
I'm using Komodo IDE v9.0.1, doing remote debugging on a linux VM (runs as a guest on my Windows 7 pro box) with the IDE running in Windows.
I've updated phpunit to v4.6.7. When I attempt to step into a phpunit file, Komodo prompts me for a URI mapping -- except that the URI it prompts with ("phar:/usr/bin/phpunit/") uses "phar" as the scheme name rather than "file". I've used Phar::extractTo() to extract the archive into a tree that corresponds to the remote URI. I've installed URI mappings using this approach, and they don't work -- at all. Komodo ignores them, prompts for a mapping even though one is there, and opens read-only versions. That means I can't set breakpoints anywhere inside the phar.
My shop uses perl and php. I posted a topic here yesterday because the Komodo IDE ignores most breakpoints in perl while debugging remotely. Today, it seems that Komodo is also seriously impaired in its ability to handle current versions of phpunit.
I'm looking for a work-around that lets me work on the code I'm paid to develop and support. Reverting to an obsolete version of phpunit is not an option for me.
I've found that I can map each remote file in the phar archive using its own URI mapping. This allows the IDE to show the local copy. Sadly, setting breakpoints like this has no discernible effect. The breakpoint is listed in the "Breakpoints" pane, displayed in the IDE, and so on. The breakpoint is, however, ignored on the remote side.