Skip to content

Commit 43f6275

Browse files
committed
Add compatibility with codeception 5
- removes php 7.4 and php 8.0 compatibility - removes compatibility with codeception < v5
1 parent fcea419 commit 43f6275

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

.github/workflows/phpunit.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
strategy:
1414
matrix:
1515
php-version:
16-
- "7.4"
17-
- "8.0"
1816
- "8.1"
1917
dependencies:
2018
- "highest"

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
}
1818
],
1919
"require": {
20-
"php": "7.4.* | 8.0.* | 8.1.*",
20+
"php": "8.1.*",
2121
"ext-json": "*",
2222
"ericmartel/codeception-email": "^1.0.3",
2323
"guzzlehttp/guzzle": "^6.1 | ^7.0"
2424
},
2525
"require-dev": {
26-
"codeception/codeception": "^4.0",
26+
"codeception/codeception": "^5.0",
2727
"friendsofphp/php-cs-fixer": "^3.0",
2828
"phpunit/phpunit": "^9.5",
2929
"roave/security-advisories": "dev-latest"

src/MailHog.php

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ class MailHog extends Module
2424

2525
/**
2626
* Codeception exposed variables.
27-
*
28-
* @var array
2927
*/
30-
protected $config = [
28+
protected array $config = [
3129
'url',
3230
'port',
3331
'guzzleRequestOptions',
@@ -37,45 +35,33 @@ class MailHog extends Module
3735

3836
/**
3937
* Codeception required variables.
40-
*
41-
* @var array
4238
*/
43-
protected $requiredFields = ['url', 'port'];
39+
protected array $requiredFields = ['url', 'port'];
4440

4541
/**
4642
* HTTP Client to interact with MailHog.
47-
*
48-
* @var Client
4943
*/
50-
protected $mailhog;
44+
protected Client $mailhog;
5145

5246
/**
5347
* Raw email header data converted to JSON.
54-
*
55-
* @var array
5648
*/
57-
protected $fetchedEmails;
49+
protected array $fetchedEmails;
5850

5951
/**
6052
* Currently selected set of email headers to work with.
61-
*
62-
* @var array
6353
*/
64-
protected $currentInbox;
54+
protected array $currentInbox;
6555

6656
/**
6757
* Starts as the same data as the current inbox, but items are removed as they're used.
68-
*
69-
* @var array
7058
*/
71-
protected $unreadInbox;
59+
protected array $unreadInbox;
7260

7361
/**
7462
* Contains the currently open email on which test operations are conducted.
75-
*
76-
* @var mixed
7763
*/
78-
protected $openedEmail;
64+
protected mixed $openedEmail;
7965

8066
public function _initialize(): void
8167
{

0 commit comments

Comments
 (0)