8000 Merge branch '5.1' · symfony/messenger@4278abf · GitHub
[go: up one dir, main page]

Skip to content

Commit 4278abf

Browse files
Merge branch '5.1'
* 5.1: (33 commits) [Cache] $lifetime cannot be null [Serializer] minor cleanup fix merge Run PHP 8 as 7.4.99 Remove calls to deprecated ReflectionParameter::getClass(). [VarDumper] fix PHP 8 support Removed "services" prototype node from "custom_authenticator" Add php 8 to travis. [Cache] Accessing undefined constants raises an Error in php8 [Cache] allow DBAL v3 Skip Doctrine DBAL on php 8 until we have a compatible version. [DomCrawler] Catch expected ValueError. Made method signatures compatible with their corresponding traits. [ErrorHandler] Apply php8 fixes from Debug component. [DomCrawler] Catch expected ValueError. [Validator] Catch expected ValueError. [VarDumper] ReflectionFunction::isDisabled() is deprecated. [BrowserKit] Raw body with custom Content-Type header Revert symfo 10000 ny/symfony#34986 Make ExpressionLanguageSyntax validator usable with annotation ...
2 parents a4df522 + d8a1834 commit 4278abf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Transport/TransportFactory.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ public function createTransport(string $dsn, array $options, SerializerInterface
3939

4040
// Help the user to select Symfony packages based on protocol.
4141
$packageSuggestion = '';
42-
if ('amqp://' === substr($dsn, 0, 7)) {
42+
if (0 === strpos($dsn, 'amqp://')) {
4343
$packageSuggestion = ' Run "composer require symfony/amqp-messenger" to install AMQP transport.';
44-
} elseif ('doctrine://' === substr($dsn, 0, 11)) {
44+
} elseif (0 === strpos($dsn, 'doctrine://')) {
4545
$packageSuggestion = ' Run "composer require symfony/doctrine-messenger" to install Doctrine transport.';
46-
} elseif ('redis://' === substr($dsn, 0, 8)) {
46+
} elseif (0 === strpos($dsn, 'redis://')) {
4747
$packageSuggestion = ' Run "composer require symfony/redis-messenger" to install Redis transport.';
48+
} elseif (0 === strpos($dsn, 'sqs://')) {
49+
$packageSuggestion = ' Run "composer require symfony/amazon-sqs-messenger" to install Amazon SQS transport.';
4850
}
4951

5052
throw new InvalidArgumentException(sprintf('No transport supports the given Messenger DSN "%s".%s.', $dsn, $packageSuggestion));

0 commit comments

Comments
 (0)
0