This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/phpunit

29 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-08-18 15:04:52 +01:00
#!/usr/bin/env php
<?php
// Cache-Id: 2020-04-10 20:30 UTC
2016-09-12 11:06:58 +01:00
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";
exit(1);
2015-08-18 15:04:52 +01:00
}
2019-06-30 00:18:26 +01:00
if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
if (\PHP_VERSION_ID >= 70200) {
2019-08-14 10:39:58 +01:00
if (false === getenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT') && false !== strpos(@file_get_contents(__DIR__.'/src/Symfony/Component/HttpKernel/Kernel.php'), 'const MAJOR_VERSION = 3;')) {
putenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1');
}
2020-08-08 15:09:36 +01:00
if (\PHP_VERSION_ID >= 80000) {
putenv('SYMFONY_PHPUNIT_VERSION=9.3');
} else {
putenv('SYMFONY_PHPUNIT_VERSION=8.3');
}
2019-06-30 00:18:26 +01:00
} elseif (\PHP_VERSION_ID >= 70000) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
}
2017-02-21 10:17:46 +00:00
}
2019-09-28 17:12:11 +01:00
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
}
2016-09-12 11:06:58 +01:00
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';