From aa6fcea16894081284d1b137f1e02df2fa7e54a6 Mon Sep 17 00:00:00 2001 From: Andrea Giannantonio Date: Mon, 4 Jan 2021 11:56:25 +0100 Subject: [PATCH] enhancement minor compatibility to php 7.3 --- .travis.yml | 16 +++++++--------- composer.json | 12 ++++++------ features/bootstrap/Console/ApplicationTester.php | 4 +--- features/bootstrap/PHPSpecContext.php | 1 + 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb410fd..cc7d57e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,25 @@ language: php php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - 7.3 - 7.4 - 8.0 env: - - COMPOSER_OPTIONS='install --prefer-source' + matrix: + - PREFER_LOWEST="--prefer-lowest" + - PREFER_LOWEST="" before_install: - composer self-update before_script: - - COMPOSER_ROOT_VERSION=dev-master composer $COMPOSER_OPTIONS + - COMPOSER_ROOT_VERSION=dev-master composer update --prefer-source $PREFER_LOWEST script: - ./bin/phpspec run --format=dot - ./bin/behat -matrix: - allow_failures: - - php: 7.1 \ No newline at end of file +#matrix: +# allow_failures: +# - php: 7.1 diff --git a/composer.json b/composer.json index 93a0a02..8fb382c 100644 --- a/composer.json +++ b/composer.json @@ -14,14 +14,14 @@ } ], "require": { - "php": "^7.0 | ^8.0", - "phpspec/phpspec": "6.* | 7.*" + "php": "^7.3|^8.0", + "phpspec/phpspec": "^6.0|^7.0" }, "require-dev": { - "behat/behat": "^3.1", - "symfony/filesystem": "^3.1", - "symfony/process": "^3.1", - "symfony/console": "^3.1", + "behat/behat": "^3.8", + "symfony/filesystem": "^4.0|^5.0", + "symfony/process": "^4.0|^5.0", + "symfony/console": "^4.0|^5.0", "bossa/phpspec2-expect": "^3.0" }, "autoload": { diff --git a/features/bootstrap/Console/ApplicationTester.php b/features/bootstrap/Console/ApplicationTester.php index dbad5cd..1269815 100644 --- a/features/bootstrap/Console/ApplicationTester.php +++ b/features/bootstrap/Console/ApplicationTester.php @@ -59,9 +59,7 @@ public function run($input) $inputStream = $this->getInputStream(); rewind($inputStream); - $this->application->getHelperSet() - ->get('question') - ->setInputStream($inputStream); + $this->input->setStream($inputStream); $this->result = $this->application->run($this->input, $this->output); } diff --git a/features/bootstrap/PHPSpecContext.php b/features/bootstrap/PHPSpecContext.php index 02b2b47..4fa5fbf 100644 --- a/features/bootstrap/PHPSpecContext.php +++ b/features/bootstrap/PHPSpecContext.php @@ -2,6 +2,7 @@ use Behat\Behat\Context\SnippetAcceptingContext; use Behat\Gherkin\Node\PyStringNode; +use Console\ApplicationTester; use Symfony\Component\Filesystem\Filesystem; use PhpSpec\Console\Application;