From 42fae838117bc473acf445c0d45ca8009584e2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Rumi=C5=84ski?= Date: Tue, 20 Oct 2020 03:42:17 +0200 Subject: [PATCH 1/4] Allow PHP 8 and PHPUnit 8+9 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2d2eabb..88a3917 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", "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": { From a88b5a1bd64ce508fb7f6b3d558e4a6b3aebbd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Rumi=C5=84ski?= Date: Tue, 20 Oct 2020 03:43:01 +0200 Subject: [PATCH 2/4] Update .travis.yml --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" From 30b624e98628475b2e06cb6cf68888d097e8ed2a Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Tue, 20 Oct 2020 03:46:55 +0200 Subject: [PATCH 3/4] update CS config --- .php_cs.dist | 1 + 1 file changed, 1 insertion(+) 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, )) From 097fb9fbe434cf3fe33b0a2d4595ee3461e1550a Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Tue, 20 Oct 2020 03:52:57 +0200 Subject: [PATCH 4/4] update codebase to match reqs changes --- composer.json | 2 +- tests/CommandExecutorTest.php | 12 ++++++++++-- tests/ScriptExecutorTest.php | 6 +++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 88a3917..da7b329 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "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 || ^8 || ^9", "symfony/phpunit-bridge": "^4.0 || ^5.0" 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()); + } } }