Skip to content

Commit a9c4e4c

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 2bb1b9d + 10b32cf commit a9c4e4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Loader/XliffFileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,20 @@ private function fixXmlLocation(string $schemaSource, string $xmlUri): string
215215
{
216216
$newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
217217
$parts = explode('/', $newPath);
218+
$locationstart = 'file:///';
218219
if (0 === stripos($newPath, 'phar://')) {
219220
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
220221
if ($tmpfile) {
221222
copy($newPath, $tmpfile);
222223
$parts = explode('/', str_replace('\\', '/', $tmpfile));
224+
} else {
225+
array_shift($parts);
226+
$locationstart = 'phar:///';
223227
}
224228
}
225229

226230
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
227-
$newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
231+
$newPath = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
228232

229233
return str_replace($xmlUri, $newPath, $schemaSource);
230234
}

0 commit comments

Comments
 (0)