Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Travis] make CI faster by always using PHP 7.1 for composer update #28111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ before_install:
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
export COMPOSER_UP='composer update --no-progress --no-suggest --ansi'

nanoseconds() {
if [[ $PHP = 5.* ]]; then
composer () {
$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/composer config platform.php $TRAVIS_PHP_VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be the exact PHP version. $TRAVIS_PHP_VERSION will make it use 5.5 AFAICT, which means 5.5.0. this might cause issues with packages having 5.5.9 as min version.

$HOME/.phpenv/versions/7.1/bin/php $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/composer $*
}
export -f composer
fi

nanoseconds () {
local cmd="date"
local format="+%s%N"
local os=$(uname)
Expand Down Expand Up @@ -90,7 +98,7 @@ before_install:
INI=/etc/hhvm/php.ini
else
INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
phpenv config-rm xdebug.ini || echo "xdebug not available"
find ~/.phpenv -name xdebug.ini -delete
fi
echo date.timezone = Europe/Paris >> $INI
echo memory_limit = -1 >> $INI
Expand Down