2015-08-18 15:04:52 +01:00
#!/usr/bin/env php
<?php
2020-04-12 10:36:17 +01:00
// 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')) {
2020-10-28 08:39:57 +00:00
if (\PHP_VERSION_ID < 70200) {
putenv('SYMFONY_PHPUNIT_VERSION=7.5');
} elseif (\PHP_VERSION_ID < 70300) {
putenv('SYMFONY_PHPUNIT_VERSION=8.5');
} else {
2020-12-05 14:24:50 +00:00
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
2019-06-30 00:18:26 +01:00
}
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');
}
2020-10-12 11:52:41 +01:00
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
}
2016-09-12 11:06:58 +01:00
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';