Skip to content

Hotfix/composer phpunit #2689

Merged
merged 4 commits into from Oct 5, 2012

2 participants

@weierophinney
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.
5f2225f
@weierophinney weierophinney Use EHER/PHPUnit instead
- "PHPUnit all in one" (https://github.com/EHER/phpunit-all-in-one), which is
  optimized for distribution via composer.
- Can switch out later for official PHPUnit once autoloading issues are
  resolved.
- Usage:
  cd tests
  ../vendor/bin/phpunit ZendTest/SomeComponent/
  php run-tests.php
c6b4817
@weierophinney weierophinney Default to system phpunit
- If phpunit has not been installed via composer, use the system
  phpunit.
35e636a
@weierophinney weierophinney Use phpunit/phpunit again
- According to http://pastebin.com/dpwN7NAD this should now work.
49af008
@ralphschindler ralphschindler merged commit 49af008 into zendframework:master Oct 5, 2012

1 check passed

Details default The Travis build passed
@ralphschindler
Zend Framework member

Merged to master & develop`

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

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.