Skip to content

Commit 86853dc

Browse files
Merge branch '3.4' into 4.0
* 3.4: [HttpKernel] DebugHandlersListener should always replace the existing exception handler fix the Composer API being used [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are 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 Avoid button label translation when it's set to false 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) Fix options resolver with array allowed types [Console] Improve phpdoc on StyleInterface::ask() [TwigBridge][WIP] Pass the form-check-inline in parent
2 parents 67bf5e4 + 4ceae5e commit 86853dc

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
@@ -581,16 +581,20 @@ public function validateSchema(\DOMDocument $dom)
581581
$imports = '';
582582
foreach ($schemaLocations as $namespace => $location) {
583583
$parts = explode('/', $location);
584+
$locationstart = 'file:///';
584585
if (0 === stripos($location, 'phar://')) {
585586
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
586587
if ($tmpfile) {
587588
copy($location, $tmpfile);
588589
$tmpfiles[] = $tmpfile;
589590
$parts = explode('/', str_replace('\\', '/', $tmpfile));
591+
} else {
592+
array_shift($parts);
593+
$locationstart = 'phar:///';
590594
}
591595
}
592596
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
593-
$location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
597+
$location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
594598

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

0 commit comments

Comments
 (0)