4 * Simple command line script to fetch the correct PHPUnit release
7 $phpVersion = PHP_MAJOR_VERSION
. '.' . PHP_MINOR_VERSION
;
8 print "Running PHP $phpVersion\n";
11 if(version_compare($phpVersion, '7.2') < 0) {
12 echo 'we no longer support PHP versions < 7.2 and thus do not support tests on them';
16 // for now we default to phpunit-8
17 $phpunit = 'phpunit-8.phar';
20 $url = "https://phar.phpunit.de/$phpunit";
21 $out = __DIR__
. '/phpunit.phar';
25 file_put_contents($out, file_get_contents($url));
26 } catch (Throwable
$e) {
27 fwrite(STDERR
, $e->getMessage());
32 print "Downloaded $phpunit\n";