Skip to content

Commit

Permalink
Revert "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 758ed6bf66648a17432496162cd02215b8809df4, reversing
changes made to 1bd3af4ec6303a4cf3de0218abc29ca9fdd7a793.
  • Loading branch information
nicolas-grekas committed Mar 31, 2022
1 parent 918178c commit 1f58a8e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Transport/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,7 @@ private function rawCommand(string $command, ...$arguments): mixed
return $result;
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\RedisExt\Connection::class, false)) {
class_alias(Connection::class, \Symfony\Component\Messenger\Transport\RedisExt\Connection::class);
}
4 changes: 4 additions & 0 deletions Transport/RedisReceivedStamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ public function getId(): string
return $this->id;
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisReceivedStamp::class, false)) {
class_alias(RedisReceivedStamp::class, \Symfony\Component\Messenger\Transport\RedisExt\RedisReceivedStamp::class);
}
4 changes: 4 additions & 0 deletions Transport/RedisReceiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ private function findRedisReceivedStamp(Envelope $envelope): RedisReceivedStamp
return $redisReceivedStamp;
}
}

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

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

if (!class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransport::class, false)) {
class_alias(RedisTransport::class, \Symfony\Component\Messenger\Transport\RedisExt\RedisTransport::class);
}
4 changes: 4 additions & 0 deletions Transport/RedisTransportFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ public function supports(string $dsn, array $options): bool
return 0 === strpos($dsn, 'redis://') || 0 === strpos($dsn, 'rediss://');
}
}

if (!class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class, false)) {
class_alias(RedisTransportFactory::class, \Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class);
}

0 comments on commit 1f58a8e

Please sign in to comment.