Skip to content

Commit 856a4aa

Browse files
Support for Codeception 5 (#25)
Co-authored-by: Dan Barrett <dan@danbarrett.com.au>
1 parent fda6d97 commit 856a4aa

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [7.4, 8.0]
11+
php: [8.0, 8.1]
1212

1313
steps:
1414
- name: Checkout code

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
"name": "Gintautas Miselis"
1414
}
1515
],
16-
"minimum-stability": "RC",
16+
"minimum-stability": "dev",
1717
"require": {
18-
"php": "^7.4 | ^8.0",
18+
"php": "^8.0",
1919
"ext-json": "*",
2020
"guzzlehttp/guzzle": "^7.4",
2121
"codeception/lib-innerbrowser": "^2.0 | *@dev",
22-
"codeception/codeception": "^4.1 | *@dev"
22+
"codeception/codeception": "^5.0.0-alpha1"
2323
},
2424
"require-dev": {
2525
"ext-curl": "*",
2626
"aws/aws-sdk-php": "^3.199",
2727
"codeception/module-rest": "^2.0 | *@dev"
2828
},
2929
"conflict": {
30-
"codeception/codeception": "<4.1"
30+
"codeception/codeception": "<5.0"
3131
},
3232
"suggest": {
3333
"codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests"

src/Codeception/Module/PhpBrowser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public function _getResponseCode()
222222
return $this->getResponseStatusCode();
223223
}
224224

225-
public function _initializeSession()
225+
public function _initializeSession(): void
226226
{
227227
// independent sessions need independent cookies
228228
$this->client = new Guzzle();
@@ -259,7 +259,7 @@ public function _prepareSession(): void
259259
$this->client->setClient($this->guzzle);
260260
}
261261

262-
public function _backupSession()
262+
public function _backupSession(): array
263263
{
264264
return [
265265
'client' => $this->client,
@@ -269,14 +269,14 @@ public function _backupSession()
269269
];
270270
}
271271

272-
public function _loadSession($session)
272+
public function _loadSession($session): void
273273
{
274274
foreach ($session as $key => $val) {
275275
$this->$key = $val;
276276
}
277277
}
278278

279-
public function _closeSession($session = null)
279+
public function _closeSession($session = null): void
280280
{
281281
unset($session);
282282
}

0 commit comments

Comments
 (0)