Skip to content

Hotfix/composer phpunit #2689

merged 4 commits into from Oct 5, 2012

2 participants

Zend Framework member

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
@weierophinney weierophinney 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.
@weierophinney weierophinney 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
@weierophinney weierophinney Default to system phpunit
- If phpunit has not been installed via composer, use the system
@weierophinney weierophinney Use phpunit/phpunit again
- According to this should now work.
@ralphschindler ralphschindler merged commit 49af008 into zendframework:master Oct 5, 2012

1 check passed

Details default The Travis build passed
Zend Framework member

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
Something went wrong with that request. Please try again.