File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,9 @@ private function parseDsn($dsn)
402
402
'port ' => $ dsn ->getPort (),
403
403
'user ' => $ dsn ->getUser (),
404
404
'pass ' => $ dsn ->getPassword (),
405
- 'vhost ' => null !== $ dsn ->getPath () ? ltrim ($ dsn ->getPath (), '/ ' ) : null ,
405
+ 'vhost ' => null !== ($ path = $ dsn ->getPath ()) ?
406
+ (0 === strpos ($ path , '/ ' ) ? substr ($ path , 1 ) : $ path )
407
+ : null ,
406
408
'read_timeout ' => $ dsn ->getFloat ('read_timeout ' ),
407
409
'write_timeout ' => $ dsn ->getFloat ('write_timeout ' ),
408
410
'connection_timeout ' => $ dsn ->getFloat ('connection_timeout ' ),
Original file line number Diff line number Diff line change @@ -534,5 +534,31 @@ public static function provideConfigs()
534
534
'ssl_passphrase ' => '' ,
535
535
],
536
536
];
537
+
538
+ yield [
539
+ 'amqp://guest:guest@localhost:5672/%2f ' ,
540
+ [
541
+ 'host ' => 'localhost ' ,
542
+ 'port ' => 5672 ,
543
+ 'vhost ' => '/ ' ,
544
+ 'user ' => 'guest ' ,
545
+ 'pass ' => 'guest ' ,
546
+ 'read_timeout ' => 3. ,
547
+ 'write_timeout ' => 3. ,
548
+ 'connection_timeout ' => 3. ,
549
+ 'persisted ' => false ,
550
+ 'lazy ' => true ,
551
+ 'qos_prefetch_size ' => 0 ,
552
+ 'qos_prefetch_count ' => 1 ,
553
+ 'qos_global ' => false ,
554
+ 'heartbeat ' => 0.0 ,
555
+ 'ssl_on ' => false ,
556
+ 'ssl_verify ' => true ,
557
+ 'ssl_cacert ' => '' ,
558
+ 'ssl_cert ' => '' ,
559
+ 'ssl_key ' => '' ,
560
+ 'ssl_passphrase ' => '' ,
561
+ ],
562
+ ];
537
563
}
538
564
}
You can’t perform that action at this time.
0 commit comments