Skip to content

Commit 4ceae5e

Browse files
Merge branch '3.3' into 3.4
* 3.3: [HttpKernel] DebugHandlersListener should always replace the existing exception handler fix the Composer API being used [Debug] Always decorate existing exception handlers to deal with fatal errors Enableable ArrayNodeDefinition is disabled for empty configuration Fixing a bug where the dump() function depended on bundle ordering [Cache] Fix handling of apcu_fetch() edgy behavior Add nn (Norwegian Nynorsk) translation files, and improve existing file Problem in phar see mergerequest #25579 [Form] Disallow transform dates beyond the year 9999 Copied NO language files to the new NB locale. [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object) [Console] Improve phpdoc on StyleInterface::ask()
2 parents 35f957c + 3e0b806 commit 4ceae5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Loader/XmlFileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,16 +599,20 @@ public function validateSchema(\DOMDocument $dom)
599599
$imports = '';
600600
foreach ($schemaLocations as $namespace => $location) {
601601
$parts = explode('/', $location);
602+
$locationstart = 'file:///';
602603
if (0 === stripos($location, 'phar://')) {
603604
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
604605
if ($tmpfile) {
605606
copy($location, $tmpfile);
606607
$tmpfiles[] = $tmpfile;
607608
$parts = explode('/', str_replace('\\', '/', $tmpfile));
609+
} else {
610+
array_shift($parts);
611+
$locationstart = 'phar:///';
608612
}
609613
}
610614
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
611-
$location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
615+
$location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
612616

613617
$imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />'."\n", $namespace, $location);
614618
}

0 commit comments

Comments
 (0)