Skip to content

Commit f1e5c63

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: fix lowest deps synchronize RelayProxy [Form] Adding more `@var` PHPDoc's to silence psalm [Validator] added missing Hungarian translation [Validator] add missing lv translation fix the exception being thrown fix syntax error fix redis messenger scheme comparison [Scheduler] Separate id and description in message providers [Form] Adding `@var` PHPDoc to silence psalm append instead of replacing potentially non-existent named-arguments [Validator] added missing Polish translation add translations for the MacAddress constraint remove invalid changelog entry Added missing Serbian (sr_Latn) translations [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results [Security] added missing Albanian translations [Validator] Add missing Hungarian translation [Serializer] Fix using deserialization path [Validator] Add missing hr translation
2 parents d947cbe + 1eaec83 commit f1e5c63

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Transport/Dsn.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ public function __construct(#[\SensitiveParameter] string $dsn)
3333
{
3434
$this->originalDsn = $dsn;
3535

36-
if (false === $parsedDsn = parse_url($dsn)) {
36+
if (false === $params = parse_url($dsn)) {
3737
throw new InvalidArgumentException('The notifier DSN is invalid.');
3838
}
3939

40-
if (!isset($parsedDsn['scheme'])) {
40+
if (!isset($params['scheme'])) {
4141
throw new InvalidArgumentException('The notifier DSN must contain a scheme.');
4242
}
43-
$this->scheme = $parsedDsn['scheme'];
43+
$this->scheme = $params['scheme'];
4444

45-
if (!isset($parsedDsn['host'])) {
45+
if (!isset($params['host'])) {
4646
throw new InvalidArgumentException('The notifier DSN must contain a host (use "default" by default).');
4747
}
48-
$this->host = $parsedDsn['host'];
48+
$this->host = $params['host'];
4949

50-
$this->user = '' !== ($parsedDsn['user'] ?? '') ? urldecode($parsedDsn['user']) : null;
51-
$this->password = '' !== ($parsedDsn['pass'] ?? '') ? urldecode($parsedDsn['pass']) : null;
52-
$this->port = $parsedDsn['port'] ?? null;
53-
$this->path = $parsedDsn['path'] ?? null;
54-
parse_str($parsedDsn['query'] ?? '', $this->options);
50+
$this->user = '' !== ($params['user'] ?? '') ? rawurldecode($params['user']) : null;
51+
$this->password = '' !== ($params['pass'] ?? '') ? rawurldecode($params['pass']) : null;
52+
$this->port = $params['port'] ?? null;
53+
$this->path = $params['path'] ?? null;
54+
parse_str($params['query'] ?? '', $this->options);
5555
}
5656

5757
public function getScheme(): string

0 commit comments

Comments
 (0)