From 0f4e3f718168491cfcab90c2e23a157fc5aad016 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Tue, 10 Nov 2015 13:16:53 +0100 Subject: [PATCH] bumped minimal requirement to PHP 5.3.9 and Symfony 2.3, allow Symfony 3.0 --- .travis.yml | 37 ++++---- composer.json | 10 +-- composer.lock | 126 +++++++++++++-------------- src/Liip/RMT/Command/BaseCommand.php | 13 ++- 4 files changed, 97 insertions(+), 89 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d1f9eba..7f1ba166 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,36 +5,39 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + env: - - SYMFONY_VERSION=2.5.* + - SYMFONY_VERSION=2.7.* matrix: allow_failures: - - env: SYMFONY_VERSION=dev-master - - php: 5.6 - php: hhvm include: - - php: 5.5 - env: SYMFONY_VERSION=2.0.* - - php: 5.5 - env: SYMFONY_VERSION=2.1.* - - php: 5.5 - env: SYMFONY_VERSION=2.2.* - - php: 5.5 + - php: 5.6 env: SYMFONY_VERSION=2.3.* - - php: 5.5 - env: SYMFONY_VERSION=2.4.* - - php: 5.5 - env: SYMFONY_VERSION=dev-master + - php: 5.6 + env: SYMFONY_VERSION=2.8.*@dev + - php: 5.6 + env: SYMFONY_VERSION=3.0.*@dev + - php: 5.3 + env: COMPOSER_FLAGS="--prefer-lowest" -before_script: +before_install: + - sh -c 'if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;' - git config --global user.email "test@test.com" - git config --global user.name "John Doe" - composer self-update - - composer require symfony/console:${SYMFONY_VERSION} symfony/yaml:${SYMFONY_VERSION} symfony/process:${SYMFONY_VERSION} --no-update - - composer update symfony/console symfony/yaml symfony/process + - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; + +install: composer update --prefer-source $COMPOSER_FLAGS script: phpunit --coverage-text diff --git a/composer.json b/composer.json index bfa7128e..efe32d85 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,12 @@ "issues": "http://github.com/liip/RMT/issues" }, "require": { - "php": ">=5.3.3", - "symfony/console": "~2.0", - "symfony/yaml": "~2.0", - "symfony/process": "~2.0", + "php": ">=5.3.9", + "symfony/console": "~2.3|^3.0", + "symfony/yaml": "~2.3|^3.0", + "symfony/process": "~2.3|^3.0", "vierbergenlars/php-semver": "~3.0", - "sensiolabs/security-checker": "~2.0" + "sensiolabs/security-checker": "~2.0|^3.0" }, "autoload": { "psr-0": { diff --git a/composer.lock b/composer.lock index 3f17e4fd..794a9b53 100644 --- a/composer.lock +++ b/composer.lock @@ -1,28 +1,28 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "84312b83d558321fd3d802272c47263a", + "hash": "86929e172b304960891fce99d1c74c7c", + "content-hash": "71d16497bc43e579bd52c75052d49851", "packages": [ { "name": "sensiolabs/security-checker", - "version": "v2.0.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee" + "reference": "21696b0daa731064c23cfb694c60a2584a7b6e93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", - "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/21696b0daa731064c23cfb694c60a2584a7b6e93", + "reference": "21696b0daa731064c23cfb694c60a2584a7b6e93", "shasum": "" }, "require": { - "ext-curl": "*", - "symfony/console": "~2.0" + "symfony/console": "~2.0|~3.0" }, "bin": [ "security-checker" @@ -30,7 +30,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -49,42 +49,43 @@ } ], "description": "A security checker for your composer.lock", - "time": "2014-07-19 10:52:35" + "time": "2015-11-07 08:07:40" }, { "name": "symfony/console", - "version": "v2.5.6", - "target-dir": "Symfony/Component/Console", + "version": "v2.7.6", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0" + "url": "https://github.com/symfony/console.git", + "reference": "5efd632294c8320ea52492db22292ff853a43766" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/6f177fca24200a5b97aef5ce7a5c98124a0f0db0", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0", + "url": "https://api.github.com/repos/symfony/console/zipball/5efd632294c8320ea52492db22292ff853a43766", + "reference": "5efd632294c8320ea52492db22292ff853a43766", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1" + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.1" }, "suggest": { "psr/log": "For using the console logger", - "symfony/event-dispatcher": "" + "symfony/event-dispatcher": "", + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Console\\": "" } }, @@ -93,45 +94,44 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2014-10-05 13:57:04" + "homepage": "https://symfony.com", + "time": "2015-10-20 14:38:46" }, { "name": "symfony/process", - "version": "v2.5.6", - "target-dir": "Symfony/Component/Process", + "version": "v2.7.6", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a" + "url": "https://github.com/symfony/process.git", + "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", + "url": "https://api.github.com/repos/symfony/process/zipball/4a959dd4e19c2c5d7512689413921e0a74386ec7", + "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Process\\": "" } }, @@ -140,45 +140,44 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "2014-10-01 05:50:18" + "homepage": "https://symfony.com", + "time": "2015-10-23 14:47:27" }, { "name": "symfony/yaml", - "version": "v2.5.6", - "target-dir": "Symfony/Component/Yaml", + "version": "v2.7.6", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726" + "url": "https://github.com/symfony/yaml.git", + "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726", + "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", + "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Yaml\\": "" } }, @@ -187,31 +186,31 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-10-01 05:50:18" + "homepage": "https://symfony.com", + "time": "2015-10-11 09:39:48" }, { "name": "vierbergenlars/php-semver", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/vierbergenlars/php-semver.git", - "reference": "4dc35f3804f3b127ad557b8b2255c03204dec951" + "reference": "516bb3061577e60e9420cbecc479362d3ad8c7f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vierbergenlars/php-semver/zipball/4dc35f3804f3b127ad557b8b2255c03204dec951", - "reference": "4dc35f3804f3b127ad557b8b2255c03204dec951", + "url": "https://api.github.com/repos/vierbergenlars/php-semver/zipball/516bb3061577e60e9420cbecc479362d3ad8c7f1", + "reference": "516bb3061577e60e9420cbecc479362d3ad8c7f1", "shasum": "" }, "require": { @@ -250,7 +249,7 @@ "semver", "versioning" ], - "time": "2013-12-21 17:10:13" + "time": "2015-05-02 19:28:54" } ], "packages-dev": [], @@ -258,8 +257,9 @@ "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, + "prefer-lowest": false, "platform": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "platform-dev": [] } diff --git a/src/Liip/RMT/Command/BaseCommand.php b/src/Liip/RMT/Command/BaseCommand.php index f9ea6c00..db0ed991 100644 --- a/src/Liip/RMT/Command/BaseCommand.php +++ b/src/Liip/RMT/Command/BaseCommand.php @@ -11,12 +11,13 @@ namespace Liip\RMT\Command; +use Liip\RMT\Application; use Liip\RMT\VCS\VCSInterface; +use Liip\RMT\Config\Handler; +use Liip\RMT\Context; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Liip\RMT\Config\Handler; -use Liip\RMT\Context; /** * Wrapper/helper around sf2 command @@ -34,7 +35,11 @@ public function run(InputInterface $input, OutputInterface $output) // Store the input and output for easier usage $this->input = $input; $this->output = $output; - $this->output->setDialogHelper($this->getHelperSet()->get('dialog')); + $dialogHelper = class_exists('Symfony\Component\Console\Helper\QuestionHelper') + ? $this->getHelperSet()->get('question') + : $this->getHelperSet()->get('dialog') + ; + $this->output->setDialogHelper($dialogHelper); $this->output->setFormatterHelper($this->getHelperSet()->get('formatter')); Context::getInstance()->setService('output', $this->output); @@ -100,6 +105,6 @@ public function loadContext() */ public function getApplication() { - return \Liip\RMT\Application::$instance; + return Application::$instance; } }