From 27c97e994d0a92a285c559a6a41fe212b967cb90 Mon Sep 17 00:00:00 2001 From: Pavel Batanov Date: Thu, 16 May 2019 12:08:43 +0300 Subject: [PATCH] Check driver based paths for windows --- src/ReferenceContext.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ReferenceContext.php b/src/ReferenceContext.php index 32574662..6ad39e6c 100644 --- a/src/ReferenceContext.php +++ b/src/ReferenceContext.php @@ -46,6 +46,9 @@ private function normalizeUri($uri) if (strncmp($uri, '/', 1) === 0) { return "file://$uri"; } + if (stripos(PHP_OS, 'WIN') === 0 && strncmp(substr($uri, 1), ':\\', 2) === 0) { + return "file://$uri"; + } throw new UnresolvableReferenceException('Can not resolve references for a specification given as a relative path.'); }