File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,10 @@ public function __construct($config = null)
107
107
/**
108
108
* @param string[] $extensions
109
109
*/
110
- public function addSupportedScheme (string $ schema, array $ extensions = [] ): self
110
+ public function addSupportedScheme (string $ schema ): self
111
111
{
112
- $ this ->supportedSchemes [$ schema ] = $ extensions ;
112
+ $ this ->supportedSchemes [] = $ schema ;
113
+ $ this ->supportedSchemes = array_unique ($ this ->supportedSchemes );
113
114
114
115
return $ this ;
115
116
}
@@ -380,7 +381,7 @@ private function parseDsn($dsn)
380
381
{
381
382
$ dsn = new Dsn ($ dsn );
382
383
383
- $ supportedSchemes = array_keys ( $ this ->supportedSchemes ) ;
384
+ $ supportedSchemes = $ this ->supportedSchemes ;
384
385
if (false == in_array ($ dsn ->getSchemeProtocol (), $ supportedSchemes , true )) {
385
386
throw new \LogicException (sprintf (
386
387
'The given scheme protocol "%s" is not supported. It must be one of "%s". ' ,
You can’t perform that action at this time.
0 commit comments