Skip to content

Commit 6628e76

Browse files
committed
simple-phpunit requires the zip extension
1 parent 39d975b commit 6628e76

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
4343
@unlink("$PHPUNIT_VERSION.zip");
4444
passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip");
4545
}
46+
if (!class_exists('ZipArchive')) {
47+
throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.');
48+
}
4649
$zip = new ZipArchive();
4750
$zip->open("$PHPUNIT_VERSION.zip");
4851
$zip->extractTo(getcwd());

src/Symfony/Bridge/PhpUnit/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"php": ">=5.3.3"
2222
},
2323
"suggest": {
24-
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
24+
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader",
25+
"ext-zip": "Zip support is required when using bin/simple-phpunit"
2526
},
2627
"autoload": {
2728
"files": [ "bootstrap.php" ],

0 commit comments

Comments
 (0)