From 883369f46e415f2047d2a8f49fedfb8b10a088cc Mon Sep 17 00:00:00 2001 From: Iesan Remus Date: Tue, 20 May 2025 10:41:49 +0300 Subject: [PATCH 1/4] Update the .gitignore file to prevent the .idea/ folder from being added to GitHub --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 611f35c..17f85e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ composer.phar composer.lock vendor/ +.idea/ # Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file From 87b46e935797dec6a451917f2010fd3a6161ad72 Mon Sep 17 00:00:00 2001 From: Iesan Remus Date: Tue, 20 May 2025 11:02:17 +0300 Subject: [PATCH 2/4] Update the composer.json file to support multiple PHP versions and allow compatibility with multiple Codeception versions --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b50ea58..8e52aee 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "description": "Switch between multiple databases in a Codeception Test", "type": "library", "require": { - "php": ">=5.4.0", - "codeception/codeception": "~2.1.0" + "php": "^5.4 || ^7.0 || ^8.0", + "codeception/codeception": "^2.1 || ^5.0" }, "license": "MIT", "authors": [ From ae2f9ad11117863ee557451ef08e80a2de2a4e52 Mon Sep 17 00:00:00 2001 From: Iesan Remus Date: Thu, 22 May 2025 10:15:08 +0300 Subject: [PATCH 3/4] Update the composer.json file to support PHP 5.4+ and ensure Codeception compatibility with all PHP versions --- composer.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8e52aee..4d8e1b0 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,13 @@ "description": "Switch between multiple databases in a Codeception Test", "type": "library", "require": { - "php": "^5.4 || ^7.0 || ^8.0", - "codeception/codeception": "^2.1 || ^5.0" + "php": ">=5.4.0", + "codeception/codeception": ">=2.1 <6.0" + }, + "config": { + "platform": { + "php": "8.4.0" + } }, "license": "MIT", "authors": [ @@ -24,4 +29,4 @@ "require-dev": { "fzaninotto/faker": "^1.5" } -} +} \ No newline at end of file From fccb0713f42a280817e1504c150d9a57942e1ec4 Mon Sep 17 00:00:00 2001 From: Iesan Remus Date: Thu, 22 May 2025 10:26:43 +0300 Subject: [PATCH 4/4] Fix type must be array and compatibility errors --- src/Codeception/Extension/MultiDb.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Codeception/Extension/MultiDb.php b/src/Codeception/Extension/MultiDb.php index 2db9832..76acacb 100644 --- a/src/Codeception/Extension/MultiDb.php +++ b/src/Codeception/Extension/MultiDb.php @@ -28,9 +28,9 @@ class MultiDb extends Module protected $dbh; - protected $config = ['connectors' => false, 'timezone' => 'UTC']; + protected array $config = ['connectors' => false, 'timezone' => 'UTC']; - protected $requiredFields = ['connectors']; + protected array $requiredFields = ['connectors']; /** @var Driver[] */ protected $drivers = []; @@ -154,7 +154,7 @@ protected function cleanup($connector) // HOOK: before scenario // @codingStandardsIgnoreLine overridden function from \Codeception\Module - public function _before(TestCase $test) + public function _before(TestCase|\Codeception\TestInterface $test) { if ($this->transaction_level > 0) { $this->rollbackTransaction(); @@ -164,7 +164,7 @@ public function _before(TestCase $test) // HOOK: after scenario // @codingStandardsIgnoreLine overridden function from \Codeception\Module - public function _after(TestCase $test) + public function _after(TestCase|\Codeception\TestInterface $test) { $this->debug(__CLASS__.'::'.__FUNCTION__.'()'); @@ -206,7 +206,7 @@ public function _afterSuite() } // @codingStandardsIgnoreLine overridden function from \Codeception\Module - public function _failed(TestCase $test, $fail) + public function _failed(TestCase|\Codeception\TestInterface $test, $fail) { /** @var \PHPUnit_Framework_Exception $fail */