Allow Travis CI to build on PHP 7.4

This commit is contained in:
Javier Spagnoletti 2019-06-29 20:18:26 -03:00 committed by Nicolas Grekas
parent bcfc7a4ada
commit 1ca61d3aec
2 changed files with 10 additions and 3 deletions

View File

@ -26,6 +26,9 @@ matrix:
env: deps=high
- php: 7.3
env: deps=low
- php: 7.4snapshot
allow_failures:
- php: 7.4snapshot
fast_finish: true
cache:
@ -178,7 +181,7 @@ before_install:
[[ -e $ext_cache ]] || (tfold ext.symfony_debug "cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && mv modules/symfony_debug.so $ext_cache && phpize --clean")
echo extension = $ext_cache >> $INI
elif [[ $PHP = 7.* ]]; then
tfold ext.apcu tpecl apcu-5.1.16 apcu.so $INI
tfold ext.apcu tpecl apcu-5.1.17 apcu.so $INI
tfold ext.mongodb tpecl mongodb-1.6.0alpha1 mongodb.so $INI
fi
done

View File

@ -7,8 +7,12 @@ 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 (\PHP_VERSION_ID >= 70000 && !getenv('SYMFONY_PHPUNIT_VERSION')) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
if (\PHP_VERSION_ID >= 70400) {
putenv('SYMFONY_PHPUNIT_VERSION=8.2');
} elseif (\PHP_VERSION_ID >= 70000) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
}
}
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';