From 4631e03ae186130e6f7d649ff5698b0d01bc9103 Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Mon, 1 Mar 2021 15:32:30 +0100 Subject: [PATCH 1/2] [TASK] Allow PHP 8 * Allow a PHP 8 capable phpnunit composer req --dev phpunit/phpunit:"^6.5 || ^7.5 || ^8.5" * Allow PHP 8 composer req php:"^7.2 || ^8.0" * Test case method signature adaption for PHP 8 compat. This requires to drop PHP 7.0 since :void has been introduced with PHP 7.1. --- .github/workflows/ci.yml | 3 +-- composer.json | 4 ++-- tests/Installer/InstallerTestCase.php | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 170a23b..499adc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,10 @@ jobs: fail-fast: false matrix: php-versions: - - "7.0" - - "7.1" - "7.2" - "7.3" - "7.4" + - "8.0" composer-versions: - "v1" - "v2" diff --git a/composer.json b/composer.json index 6ba68f2..762ad3f 100644 --- a/composer.json +++ b/composer.json @@ -38,13 +38,13 @@ "netresearch/composer-installers": "*" }, "require": { - "php": ">=7.0.0 <7.5", + "php": "^7.2 || ^8.0", "composer-plugin-api": "^1.0.0 || ^2.0.0" }, "require-dev": { "composer/composer": "1.2.*@dev || 2.0.*@dev", "overtrue/phplint": "^2.0", - "phpunit/phpunit": "^6.5" + "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5" }, "conflict": { "composer/installers": "<1.0.24 || >1.0.24" diff --git a/tests/Installer/InstallerTestCase.php b/tests/Installer/InstallerTestCase.php index 8674def..cbaec91 100644 --- a/tests/Installer/InstallerTestCase.php +++ b/tests/Installer/InstallerTestCase.php @@ -62,7 +62,7 @@ class InstallerTestCase extends TestCase */ protected $io; - protected function setUp() + protected function setUp(): void { $this->previousDirectory = getcwd(); $this->rootDirectory = TestCase::getUniqueTmpDirectory(); @@ -87,7 +87,7 @@ protected function setUp() $this->io = $this->createMock(IOInterface::class); } - protected function tearDown() + protected function tearDown(): void { chdir($this->previousDirectory); if (is_dir($this->rootDirectory)) { From ffc02d973a0e939e184d290ecaaae49b079cd18c Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Tue, 2 Mar 2021 10:05:08 +0100 Subject: [PATCH 2/2] [TASK] Raise phpunit composer req --dev phpunit/phpunit:"^8.5" --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 762ad3f..3901eb9 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "require-dev": { "composer/composer": "1.2.*@dev || 2.0.*@dev", "overtrue/phplint": "^2.0", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5" + "phpunit/phpunit": "^8.5" }, "conflict": { "composer/installers": "<1.0.24 || >1.0.24"