Skip to content

Commit

Permalink
simple-phpunit requires the zip extension
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jan 16, 2017
1 parent 39d975b commit 6628e76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
@unlink("$PHPUNIT_VERSION.zip");
passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip");
}
if (!class_exists('ZipArchive')) {
throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.');
}
$zip = new ZipArchive();
$zip->open("$PHPUNIT_VERSION.zip");
$zip->extractTo(getcwd());
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Bridge/PhpUnit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"php": ">=5.3.3"
},
"suggest": {
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader",
"ext-zip": "Zip support is required when using bin/simple-phpunit"
},
"autoload": {
"files": [ "bootstrap.php" ],
Expand Down

0 comments on commit 6628e76

Please sign in to comment.