mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
in() does not handle absolute paths under Windows
This fixes plugins to be included incorrectly under Windows
This commit is contained in:
@ -61,7 +61,7 @@ final class UsesCall
|
||||
$targets = array_map(function ($path): string {
|
||||
$startChar = DIRECTORY_SEPARATOR;
|
||||
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
if ('\\' === DIRECTORY_SEPARATOR || preg_match('~\A[A-Z]:(?![^/\\\\])~i', $path) > 0) {
|
||||
$path = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', function ($match): string {
|
||||
return strtolower($match['drive']);
|
||||
}, $path);
|
||||
|
||||
Reference in New Issue
Block a user