mirror of
https://github.com/itflow-org/itflow
synced 2026-09-22 14:41:17 +00:00
Bump imapengine from 1.25.4 to 1.25.6 and dependencies
This commit is contained in:
@@ -158,11 +158,18 @@ class XliffUtils
|
||||
*/
|
||||
private static function fixXmlLocation(string $schemaSource, string $xmlUri): string
|
||||
{
|
||||
$path = __DIR__.'/../Resources/schemas/xml.xsd';
|
||||
static $newPath;
|
||||
|
||||
if (0 === stripos($path, 'phar://')) {
|
||||
if ($tmpfile = tempnam(sys_get_temp_dir(), 'symfony')) {
|
||||
if (null === $newPath) {
|
||||
$path = __DIR__.'/../Resources/schemas/xml.xsd';
|
||||
|
||||
if (0 !== stripos($path, 'phar://')) {
|
||||
$newPath = self::getFileUrl($path);
|
||||
} elseif ($tmpfile = tempnam(sys_get_temp_dir(), 'symfony')) {
|
||||
copy($path, $tmpfile);
|
||||
register_shutdown_function(static function () use ($tmpfile) {
|
||||
@unlink($tmpfile);
|
||||
});
|
||||
$newPath = self::getFileUrl($tmpfile);
|
||||
} else {
|
||||
$parts = explode('/', '\\' === \DIRECTORY_SEPARATOR ? str_replace('\\', '/', $path) : $path);
|
||||
@@ -170,8 +177,6 @@ class XliffUtils
|
||||
$drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
|
||||
$newPath = 'phar:///'.$drive.implode('/', array_map('rawurlencode', $parts));
|
||||
}
|
||||
} else {
|
||||
$newPath = self::getFileUrl($path);
|
||||
}
|
||||
|
||||
return str_replace($xmlUri, $newPath, $schemaSource);
|
||||
|
||||
Reference in New Issue
Block a user