minor #32289 Allow Travis CI to build on PHP 7.4 (phansys)

This PR was merged into the 3.4 branch.

Discussion
----------

Allow Travis CI to build on PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

1ca61d3aec Allow Travis CI to build on PHP 7.4
This commit is contained in:
Nicolas Grekas 2019-07-31 19:02:45 +02:00
commit f0c666925a
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';