From 695caba2db72f19933afacd8159d058792974a5f Mon Sep 17 00:00:00 2001 From: TavoNiievez Date: Sat, 5 Feb 2022 14:18:22 -0500 Subject: [PATCH] Support for Codeception 5 Co-authored-by: Dan Barrett --- .github/workflows/main.yml | 2 +- composer.json | 8 ++++---- src/Codeception/Module/PhpBrowser.php | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c563b02..f3b7f28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [7.4, 8.0] + php: [8.0, 8.1] steps: - name: Checkout code diff --git a/composer.json b/composer.json index 54ac7f8..b0c3292 100644 --- a/composer.json +++ b/composer.json @@ -13,13 +13,13 @@ "name": "Gintautas Miselis" } ], - "minimum-stability": "RC", + "minimum-stability": "dev", "require": { - "php": "^7.4 | ^8.0", + "php": "^8.0", "ext-json": "*", "guzzlehttp/guzzle": "^7.4", "codeception/lib-innerbrowser": "^2.0 | *@dev", - "codeception/codeception": "^4.1 | *@dev" + "codeception/codeception": "^5.0.0-alpha1" }, "require-dev": { "ext-curl": "*", @@ -27,7 +27,7 @@ "codeception/module-rest": "^2.0 | *@dev" }, "conflict": { - "codeception/codeception": "<4.1" + "codeception/codeception": "<5.0" }, "suggest": { "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" diff --git a/src/Codeception/Module/PhpBrowser.php b/src/Codeception/Module/PhpBrowser.php index edc99b6..672e4c1 100644 --- a/src/Codeception/Module/PhpBrowser.php +++ b/src/Codeception/Module/PhpBrowser.php @@ -222,7 +222,7 @@ public function _getResponseCode() return $this->getResponseStatusCode(); } - public function _initializeSession() + public function _initializeSession(): void { // independent sessions need independent cookies $this->client = new Guzzle(); @@ -259,7 +259,7 @@ public function _prepareSession(): void $this->client->setClient($this->guzzle); } - public function _backupSession() + public function _backupSession(): array { return [ 'client' => $this->client, @@ -269,14 +269,14 @@ public function _backupSession() ]; } - public function _loadSession($session) + public function _loadSession($session): void { foreach ($session as $key => $val) { $this->$key = $val; } } - public function _closeSession($session = null) + public function _closeSession($session = null): void { unset($session); }