Skip to content

Commit

Permalink
bumped minimal requirement to PHP 5.3.9 and Symfony 2.3, allow Symfon…
Browse files Browse the repository at this point in the history
…y 3.0
  • Loading branch information
lsmith77 committed Nov 10, 2015
1 parent 8dbd1db commit 0f4e3f7
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 89 deletions.
37 changes: 20 additions & 17 deletions .travis.yml
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Expand Up @@ -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": {
Expand Down
126 changes: 63 additions & 63 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions src/Liip/RMT/Command/BaseCommand.php
Expand Up @@ -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
Expand All @@ -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);

Expand Down Expand Up @@ -100,6 +105,6 @@ public function loadContext()
*/
public function getApplication()
{
return \Liip\RMT\Application::$instance;
return Application::$instance;
}
}

0 comments on commit 0f4e3f7

Please sign in to comment.