File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -155,17 +155,17 @@ public static function invalidDsnProvider(): iterable
155
155
{
156
156
yield [
157
157
'some:// ' ,
158
- 'The "some://" notifier DSN is invalid. ' ,
158
+ 'The notifier DSN is invalid. ' ,
159
159
];
160
160
161
161
yield [
162
162
'//slack ' ,
163
- 'The "//slack" notifier DSN must contain a scheme. ' ,
163
+ 'The notifier DSN must contain a scheme. ' ,
164
164
];
165
165
166
166
yield [
167
167
'file:///some/path ' ,
168
- 'The "file:///some/path" notifier DSN must contain a host (use "default" by default). ' ,
168
+ 'The notifier DSN must contain a host (use "default" by default). ' ,
169
169
];
170
170
}
171
171
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ protected function getUser(Dsn $dsn): string
46
46
{
47
47
$ user = $ dsn ->getUser ();
48
48
if (null === $ user ) {
49
- throw new IncompleteDsnException ('User is not set. ' , $ dsn ->getOriginalDsn ());
49
+ throw new IncompleteDsnException ('User is not set. ' , $ dsn ->getScheme (). ' :// ' . $ dsn -> getHost ());
50
50
}
51
51
52
52
return $ user ;
Original file line number Diff line number Diff line change @@ -34,16 +34,16 @@ public function __construct(string $dsn)
34
34
$ this ->originalDsn = $ dsn ;
35
35
36
36
if (false === $ parsedDsn = parse_url ($ dsn )) {
37
- throw new InvalidArgumentException (sprintf ( 'The "%s" notifier DSN is invalid. ' , $ dsn ) );
37
+ throw new InvalidArgumentException ('The notifier DSN is invalid. ' );
38
38
}
39
39
40
40
if (!isset ($ parsedDsn ['scheme ' ])) {
41
- throw new InvalidArgumentException (sprintf ( 'The "%s" notifier DSN must contain a scheme. ' , $ dsn ) );
41
+ throw new InvalidArgumentException ('The notifier DSN must contain a scheme. ' );
42
42
}
43
43
$ this ->scheme = $ parsedDsn ['scheme ' ];
44
44
45
45
if (!isset ($ parsedDsn ['host ' ])) {
46
- throw new InvalidArgumentException (sprintf ( 'The "%s" notifier DSN must contain a host (use "default" by default). ' , $ dsn ) );
46
+ throw new InvalidArgumentException ('The notifier DSN must contain a host (use "default" by default). ' );
47
47
}
48
48
$ this ->host = $ parsedDsn ['host ' ];
49
49
You can’t perform that action at this time.
0 commit comments