Permalink
Cannot retrieve contributors at this time
executable file
28 lines (26 sloc)
1.07 KB
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
// Cache-Id: 2021-05-27 20:30 UTC | |
// For caching to work properly on appveyor, this file | |
// must be exactly the same in all maintained branches | |
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); | |
} | |
if (!getenv('SYMFONY_PHPUNIT_VERSION')) { | |
if (\PHP_VERSION_ID < 70200) { | |
putenv('SYMFONY_PHPUNIT_VERSION=7.5'); | |
} elseif (\PHP_VERSION_ID < 70300) { | |
putenv('SYMFONY_PHPUNIT_VERSION=8.5.26'); | |
} else { | |
putenv('SYMFONY_PHPUNIT_VERSION=9.5'); | |
} | |
} | |
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70300) { | |
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1'); | |
} | |
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) { | |
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled'); | |
} | |
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); | |
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit'; |