unit-testingphpunitcomposer-phpphar

using phpunit without composer


I'm trying to instal PHPunit on an old system, I'm dealing with several phar issues,

from now i've managed to have PHPunit running, to have my autoload working, also the pPHPunit, but now, it is trying to call composer.

i Had to add an extention "PHPUnit/Extensions/Story", it's also working, but now, i've got to manage composer...

I tried to add the phar, to extract the phar , ... but nothing seems to work (if "Composer\Autoload\ClassLoader.php" work, then I've got an "Instantiator\Instantiator.php" missing...)

So, is it possible to have PHPunit running without composer?


Solution

  • One can simply use composer to handle only PHPunit and it's dependencies.

    So the easiest way is to simply use composer. There is nothing wrong at using composer for just a small part of your dependencies. In fact, for some (small) projects I even use it for no dependency at all (only to handle the autoloading).

    You can use it in the subdirectory test, or more conventionally at the root of the project.