Skip to content

Commit 3d69fc5

Browse files
committed
Removed .idea folder, updated php-etl/pipeline-contracts to 0.3 and added new functions from RejectionInterface and StateInterface
1 parent c5bc23f commit 3d69fc5

File tree

9 files changed

+112
-138
lines changed

9 files changed

+112
-138
lines changed

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/php.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.idea/rabbitmq-flow.iml

Lines changed: 0 additions & 8 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"require": {
3434
"php": "^8.0",
3535
"psr/log": "^1.1@dev",
36-
"php-etl/pipeline-contracts": "^0.2.0",
37-
"php-etl/bucket": "^0.2.0",
36+
"php-etl/pipeline-contracts": "^0.3.0",
37+
"php-etl/bucket": "dev-feature/update-bucket-contracts as 0.2.0",
3838
"bunny/bunny": "@dev"
3939
},
4040
"require-dev": {
@@ -44,7 +44,7 @@
4444
"mybuilder/phpunit-accelerator": "*",
4545
"infection/infection": "^0.20",
4646
"adlawson/vfs": "dev-develop",
47-
"php-etl/phpunit-extension": "*"
47+
"php-etl/phpunit-extension": "dev-feature/update-pipeline-0.4"
4848
},
4949
"extra": {
5050
"branch-alias": {

composer.lock

Lines changed: 43 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Rejection.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ final class Rejection implements RejectionInterface
1111
private Channel $channel;
1212

1313
public function __construct(
14-
Client $connection,
14+
private Client $connection,
1515
private string $stepUuid,
1616
private string $topic,
1717
private ?string $exchange = null,
1818
) {
19-
$this->channel = $connection->channel();
19+
$this->channel = $this->connection->channel();
2020
$this->channel->queueDeclare(
2121
queue: $this->topic,
2222
passive: false,
@@ -83,4 +83,21 @@ public function reject(object|array $rejection, ?\Throwable $exception = null):
8383
$this->exchange,
8484
);
8585
}
86+
87+
public function initialize(): void
88+
{
89+
$this->channel->queueDeclare(
90+
queue: $this->topic,
91+
passive: false,
92+
durable: true,
93+
exclusive: false,
94+
autoDelete: true,
95+
);
96+
}
97+
98+
public function teardown(): void
99+
{
100+
$this->channel->close();
101+
$this->connection->stop();
102+
}
86103
}

0 commit comments

Comments
 (0)