diff --git a/.php_cs.dist b/.php_cs.dist index e4b62e2..fc1ac99 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -38,6 +38,7 @@ return PhpCsFixer\Config::create() 'phpdoc_add_missing_param_annotation' => true, 'phpdoc_order' => true, 'semicolon_after_instruction' => true, + 'single_line_throw' => false, 'strict_comparison' => true, 'strict_param' => true, )) diff --git a/.travis.yml b/.travis.yml index fdd0111..a913ea9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,5 +59,10 @@ jobs: - <<: *STANDARD_TEST_JOB stage: Test - php: 7.3 + php: 7.4 + + - + <<: *STANDARD_TEST_JOB + stage: Test + php: nightly env: COMPOSER_FLAGS="--ignore-platform-reqs" diff --git a/composer.json b/composer.json index 2d2eabb..da7b329 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,13 @@ } ], "require": { - "php": "^5.5.9 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", "symfony/process": "^3.4 || ^4 || ^5" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.9", + "friendsofphp/php-cs-fixer": "^2.16", "maglnet/composer-require-checker": "^0.1.6", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1 || ^8 || ^9", "symfony/phpunit-bridge": "^4.0 || ^5.0" }, "config": { diff --git a/tests/CommandExecutorTest.php b/tests/CommandExecutorTest.php index 04e1c1e..9b42dd0 100644 --- a/tests/CommandExecutorTest.php +++ b/tests/CommandExecutorTest.php @@ -27,7 +27,11 @@ public function testSimpleExecution() $cliResult = $scriptExecutor->getResult(); - $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + if (\is_callable([$this, 'assertStringContainsString'])) { + $this->assertStringContainsString(basename(__FILE__), $cliResult->getOutput()); + } else { + $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + } } public function testSimpleExecutionWithArray() @@ -36,6 +40,10 @@ public function testSimpleExecutionWithArray() $cliResult = $scriptExecutor->getResult(); - $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + if (\is_callable([$this, 'assertStringContainsString'])) { + $this->assertStringContainsString(basename(__FILE__), $cliResult->getOutput()); + } else { + $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + } } } diff --git a/tests/ScriptExecutorTest.php b/tests/ScriptExecutorTest.php index a5fd0d9..517adff 100644 --- a/tests/ScriptExecutorTest.php +++ b/tests/ScriptExecutorTest.php @@ -27,6 +27,10 @@ public function testSimpleExecution() $cliResult = $scriptExecutor->getResult(); - $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + if (\is_callable([$this, 'assertStringContainsString'])) { + $this->assertStringContainsString(basename(__FILE__), $cliResult->getOutput()); + } else { + $this->assertContains(basename(__FILE__), $cliResult->getOutput()); + } } }