Skip to content

Commit 66e6fef

Browse files
committed
Add support for codeception 5
1 parent bdf79c9 commit 66e6fef

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

.github/workflows/main.yml

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

1515
strategy:
1616
matrix:
17-
php: [7.4, 8.0, 8.1]
17+
php: [8.0, 8.1]
1818

1919
steps:
2020
- name: Checkout code

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
],
1616
"minimum-stability": "RC",
1717
"require": {
18-
"php": "^7.4 | ^8.0",
19-
"codeception/codeception": "^4.0",
18+
"php": "^8.0",
19+
"codeception/codeception": "^5.0.0-RC1",
2020
"php-amqplib/php-amqplib": "^2.10 | ^3.0"
2121
},
2222
"autoload": {

src/Codeception/Module/AMQP.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@
5151
*/
5252
class AMQP extends Module implements RequiresPackage
5353
{
54-
/**
55-
* @var array
56-
*/
57-
protected $config = [
54+
protected array $config = [
5855
'host' => 'localhost',
5956
'username' => 'guest',
6057
'password' => 'guest',
@@ -72,14 +69,14 @@ class AMQP extends Module implements RequiresPackage
7269
/**
7370
* @var string[]
7471
*/
75-
protected $requiredFields = ['host', 'username', 'password', 'vhost'];
72+
protected array $requiredFields = ['host', 'username', 'password', 'vhost'];
7673

77-
public function _requires()
74+
public function _requires(): array
7875
{
7976
return [AMQPStreamConnection::class => '"php-amqplib/php-amqplib": "~2.4"'];
8077
}
8178

82-
public function _initialize()
79+
public function _initialize(): void
8380
{
8481
$host = $this->config['host'];
8582
$port = $this->config['port'];
@@ -94,7 +91,7 @@ public function _initialize()
9491
}
9592
}
9693

97-
public function _before(TestInterface $test)
94+
public function _before(TestInterface $test): void
9895
{
9996
if ($this->config['cleanup']) {
10097
$this->cleanup();

tests/unit/Codeception/Module/AMQPTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Codeception\Lib\ModuleContainer;
66
use Codeception\Module\AMQP;
77
use Codeception\PHPUnit\TestCase;
8-
use Codeception\Util\Stub;
8+
use Codeception\Stub;
99

1010
final class AMQPTest extends TestCase
1111
{

0 commit comments

Comments
 (0)