phar-io / version

Library for handling version information and constraints
https://phar.io/
BSD 3-Clause "New" or "Revised" License
7.39k stars 18 forks source link

Make testing autoload building more obvious #6

Closed dnaber-de closed 7 years ago

dnaber-de commented 7 years ago

After performing the typical »on boarding« steps (cloning, run composer install) I would assume that I can run the PHPUnit tests, but it gives me the following error:

$ phpunit 
PHPUnit 6.0.6 by Sebastian Bergmann and contributors.

Cannot open file "/var/www/projects/php/phpunit/vendor/phar-io/version/src/autoload.php".

In order to run the PHPUnit tests of this package I need to do the following steps:

This is not really obvious, however. In order to automate this process, one could add phpab as dev dependency and run the autoload building as post-install composer script. Alternatively one could use the composer autoload file vendor/autoload.php.

theseer commented 7 years ago

Actually, all you would have needed to do would have been

ant setup

which will install the tools via phive and generate the autoloader.

Since particularly this project does not have any code level external dependencies, I'd like to not rely on composer to work on it.

Granted though, we need to document that :)

theseer commented 7 years ago

I guess we'll stick with the ant approach. Thanks for the effort though!

We might enhance the build.xml with a notice in case phive is missing rather than have the java stack trace shown.