Skip to content

Commit

Permalink
Restore "minor #45899 [Messenger] [Security/Core] Remove legacy class…
Browse files Browse the repository at this point in the history
… aliases (nicolas-grekas)"

This reverts commit 235262eebd111b224b583564e74c423c1acd31cb.
  • Loading branch information
nicolas-grekas committed Mar 31, 2022
1 parent 0d3fffd commit 0d76fc3
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 33 deletions.
4 changes: 0 additions & 4 deletions Transport/AmqpFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ public function createExchange(\AMQPChannel $channel): \AMQPExchange
return new \AMQPExchange($channel);
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpFactory::class, false)) {
class_alias(AmqpFactory::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpFactory::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpReceivedStamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ public function getQueueName(): string
return $this->queueName;
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceivedStamp::class, false)) {
class_alias(AmqpReceivedStamp::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceivedStamp::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpReceiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,3 @@ private function findAmqpStamp(Envelope $envelope): AmqpReceivedStamp
return $amqpReceivedStamp;
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceiver::class, false)) {
class_alias(AmqpReceiver::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceiver::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ public function send(Envelope $envelope): Envelope
return $envelope;
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpSender::class, false)) {
class_alias(AmqpSender::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpSender::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpStamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,3 @@ public static function createWithAttributes(array $attributes, self $previousSta
);
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpStamp::class, false)) {
class_alias(AmqpStamp::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpStamp::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,3 @@ private function getSender(): AmqpSender
return $this->sender ??= new AmqpSender($this->connection, $this->serializer);
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransport::class, false)) {
class_alias(AmqpTransport::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransport::class);
}
4 changes: 0 additions & 4 deletions Transport/AmqpTransportFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ public function supports(string $dsn, array $options): bool
return str_starts_with($dsn, 'amqp://') || str_starts_with($dsn, 'amqps://');
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class, false)) {
class_alias(AmqpTransportFactory::class, \Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class);
}
4 changes: 0 additions & 4 deletions Transport/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,3 @@ private function getRoutingKeyForMessage(?AmqpStamp $amqpStamp): ?string
return $amqpStamp?->getRoutingKey() ?? $this->getDefaultPublishRoutingKey();
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\Connection::class, false)) {
class_alias(Connection::class, \Symfony\Component\Messenger\Transport\AmqpExt\Connection::class);
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": ">=8.1",
"ext-amqp": "*",
"symfony/messenger": "^5.4|^6.0"
"symfony/messenger": "^6.1"
},
"require-dev": {
"symfony/event-dispatcher": "^5.4|^6.0",
Expand Down

0 comments on commit 0d76fc3

Please sign in to comment.