Skip to content

Commit 306d594

Browse files
committed
1 parent a465a87 commit 306d594

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

etc/infrastructure/php/extensions/amqp.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
git clone -n https://github.com/php-amqp/php-amqp.git
1+
git clone --branch issue-php8 https://github.com/remicollet/php-amqp.git
22
cd php-amqp
3-
git checkout 96cd5cb5eddd3db2faaa3643dad2fe4677d7c438
43
phpize
54
./configure
65
make

src/Shared/Infrastructure/Bus/CallableFirstParameterExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function extract($class): ?string
6060

6161
private function firstParameterClassFrom(ReflectionMethod $method): string
6262
{
63-
return $method->getParameters()[0]->getType()->getName();
63+
return $method->getParameters()[0]->getType()->getName();
6464
}
6565

6666
private function hasOnlyOneParameter(ReflectionMethod $method): bool

src/Shared/Infrastructure/Bus/Event/RabbitMq/RabbitMqConnection.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ public function exchange(string $name): AMQPExchange
5050

5151
private function channel(): AMQPChannel
5252
{
53-
return self::$channel = self::$channel && self::$channel->isConnected()
54-
? self::$channel
55-
: new AMQPChannel($this->connection());
53+
if (!self::$channel?->isConnected()) {
54+
self::$channel = new AMQPChannel($this->connection());
55+
}
56+
57+
return self::$channel;
5658
}
5759

5860
private function connection(): AMQPConnection
5961
{
60-
self::$connection = self::$connection ?: new AMQPConnection($this->configuration);
62+
if (null === self::$connection) {
63+
self::$connection = new AMQPConnection($this->configuration);
64+
}
6165

6266
if (!self::$connection->isConnected()) {
6367
self::$connection->pconnect();

0 commit comments

Comments
 (0)