Hotfix/composer phpunit #2689

merged 4 commits into from Oct 5, 2012


None yet
2 participants

weierophinney commented Oct 5, 2012

This PR adds PHPUnit as a composer development dependency. This allows us to pin the PHPUnit version, and install PHPUnit locally for the specific framework version.

Usage is as follows:

php /path/to/composer.phar install --dev
cd tests
../vendor/bin/phpunit ZendTest/SomeComponent
php run-tests.php

weierophinney added some commits Oct 3, 2012

Updated composer.json and run-tests.php
- Added phpunit/phpunit under require-dev section
- Removed bin-dir (this was incorrectly done)
- Added bin setting
- Referenced phpunit bin inside run-tests.php

Currently, this doesn't work -- somehow, various phpunit autoloaders are being
loaded multiple times, raising conflicts.
Use EHER/PHPUnit instead
- "PHPUnit all in one" (, which is
  optimized for distribution via composer.
- Can switch out later for official PHPUnit once autoloading issues are
- Usage:
  cd tests
  ../vendor/bin/phpunit ZendTest/SomeComponent/
  php run-tests.php
Default to system phpunit
- If phpunit has not been installed via composer, use the system
Use phpunit/phpunit again
- According to this should now work.

@ghost ghost assigned ralphschindler Oct 5, 2012

@ralphschindler ralphschindler merged commit 49af008 into zendframework:master Oct 5, 2012

1 check passed

default The Travis build passed

This comment has been minimized.

Show comment
Hide comment

ralphschindler Oct 5, 2012


Merged to master & `develop``


ralphschindler commented Oct 5, 2012

Merged to master & `develop``

@chillu chillu referenced this pull request in silverstripe/silverstripe-framework Nov 15, 2012


Fetch PHPUnit dependency through composer #940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment