[Config] fixed 'scheme://' not detected as absolute path
This also allows the use of configuration files stored in phar files.
This commit is contained in:
parent
4730f4303b
commit
b50ac5be36
@ -89,6 +89,7 @@ class FileLocator implements FileLocatorInterface
|
||||
&& $file[1] == ':'
|
||||
&& ($file[2] == '\\' || $file[2] == '/')
|
||||
)
|
||||
|| null !== parse_url($file, PHP_URL_SCHEME)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ class FileLocatorTest extends \PHPUnit_Framework_TestCase
|
||||
array('c:\\\\foo.xml'),
|
||||
array('c:/foo.xml'),
|
||||
array('\\server\\foo.xml'),
|
||||
array('https://server/foo.xml'),
|
||||
array('phar://server/foo.xml'),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user