From 3d04419884a96a005a76cce14743f8a147bc0cb2 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Fri, 23 Mar 2018 21:21:04 -0300 Subject: [PATCH] Update config for Travis CI in order to run tests in a containerized Trusty environment with PHP 7.2 and lowest dependencies on PHP 7.1 --- .travis.yml | 23 +++++++++++++++----- composer.json | 6 ++--- src/Command/BuiltIn/DeployCommand.php | 2 +- src/Command/BuiltIn/Releases/ListCommand.php | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3241d8c..3dd16a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,23 @@ language: php -php: - - '5.5' - - '5.6' - - '7.0' - - '7.1' + +dist: trusty + +sudo: false + +matrix: + fast_finish: true + include: + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.1 + env: dependencies=lowest + - php: 7.2 install: - - composer install + - composer install --optimize-autoloader --classmap-authoritative --no-interaction + - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-stable --optimize-autoloader --classmap-authoritative --no-interaction; fi; script: - mkdir -p build/logs diff --git a/composer.json b/composer.json index 10ae4de..2516752 100644 --- a/composer.json +++ b/composer.json @@ -13,16 +13,16 @@ ], "require": { "php": ">=5.5.9", - "monolog/monolog": "^1.0", + "monolog/monolog": "^1.23", "symfony/console": "^3.0", "symfony/filesystem": "^3.0", "symfony/event-dispatcher": "^3.0", "symfony/finder": "^3.0", - "symfony/yaml": "^3.0", + "symfony/yaml": "^3.0.7", "symfony/process": "^3.0" }, "require-dev": { - "phpunit/phpunit": "4.8.*", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", "satooshi/php-coveralls": "~1.0" }, "autoload": { diff --git a/src/Command/BuiltIn/DeployCommand.php b/src/Command/BuiltIn/DeployCommand.php index dd86e4d..0ffcc6a 100644 --- a/src/Command/BuiltIn/DeployCommand.php +++ b/src/Command/BuiltIn/DeployCommand.php @@ -142,7 +142,7 @@ class DeployCommand extends AbstractCommand protected function runOnHosts(OutputInterface $output, $tasks) { - $hosts = $this->runtime->getEnvOption('hosts'); + $hosts = $this->runtime->getEnvOption('hosts', []); if (count($hosts) == 0) { $output->writeln(sprintf(' No hosts defined, skipping %s tasks', $this->getStageName())); $output->writeln(''); diff --git a/src/Command/BuiltIn/Releases/ListCommand.php b/src/Command/BuiltIn/Releases/ListCommand.php index 4bee690..15e8eac 100644 --- a/src/Command/BuiltIn/Releases/ListCommand.php +++ b/src/Command/BuiltIn/Releases/ListCommand.php @@ -73,7 +73,7 @@ class ListCommand extends AbstractCommand $output->writeln(''); - $hosts = $this->runtime->getEnvOption('hosts'); + $hosts = $this->runtime->getEnvOption('hosts', []); if (count($hosts) == 0) { $output->writeln('No hosts defined'); $output->writeln('');