From 177b6b5238bb532170dd7563c03146f9e1dff27b Mon Sep 17 00:00:00 2001 From: Netkas Date: Fri, 24 Feb 2023 21:46:51 -0500 Subject: [PATCH] Updated `Symfony\Filesystem` to version 6.2.5 --- CHANGELOG.md | 3 + .../Filesystem/Exception/IOException.php | 3 - src/ncc/ThirdParty/Symfony/Filesystem/LICENSE | 2 +- .../ThirdParty/Symfony/Filesystem/Path.php | 60 +++++++++---------- src/ncc/ThirdParty/Symfony/Filesystem/VERSION | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df6342..2c02f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.0.2] - Unreleased +### Changed + - Updated `Symfony\Filesystem` to version 6.2.5 + ## [1.0.1] - 2023-02-07 diff --git a/src/ncc/ThirdParty/Symfony/Filesystem/Exception/IOException.php b/src/ncc/ThirdParty/Symfony/Filesystem/Exception/IOException.php index 39479f1..b4272dc 100644 --- a/src/ncc/ThirdParty/Symfony/Filesystem/Exception/IOException.php +++ b/src/ncc/ThirdParty/Symfony/Filesystem/Exception/IOException.php @@ -29,9 +29,6 @@ class IOException extends \RuntimeException implements IOExceptionInterface parent::__construct($message, $code, $previous); } - /** - * {@inheritdoc} - */ public function getPath(): ?string { return $this->path; diff --git a/src/ncc/ThirdParty/Symfony/Filesystem/LICENSE b/src/ncc/ThirdParty/Symfony/Filesystem/LICENSE index 88bf75b..0083704 100644 --- a/src/ncc/ThirdParty/Symfony/Filesystem/LICENSE +++ b/src/ncc/ThirdParty/Symfony/Filesystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/ncc/ThirdParty/Symfony/Filesystem/Path.php b/src/ncc/ThirdParty/Symfony/Filesystem/Path.php index 4da2bee..f936166 100644 --- a/src/ncc/ThirdParty/Symfony/Filesystem/Path.php +++ b/src/ncc/ThirdParty/Symfony/Filesystem/Path.php @@ -81,7 +81,7 @@ final class Path // Replace "~" with user's home directory. if ('~' === $path[0]) { - $path = self::getHomeDirectory().mb_substr($path, 1); + $path = self::getHomeDirectory().substr($path, 1); } $path = self::normalize($path); @@ -151,14 +151,14 @@ final class Path $path = self::canonicalize($path); // Maintain scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $scheme = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); + if (false !== $schemeSeparatorPosition = strpos($path, '://')) { + $scheme = substr($path, 0, $schemeSeparatorPosition + 3); + $path = substr($path, $schemeSeparatorPosition + 3); } else { $scheme = ''; } - if (false === ($dirSeparatorPosition = strrpos($path, '/'))) { + if (false === $dirSeparatorPosition = strrpos($path, '/')) { return ''; } @@ -169,10 +169,10 @@ final class Path // Directory equals Windows root "C:/" if (2 === $dirSeparatorPosition && ctype_alpha($path[0]) && ':' === $path[1]) { - return $scheme.mb_substr($path, 0, 3); + return $scheme.substr($path, 0, 3); } - return $scheme.mb_substr($path, 0, $dirSeparatorPosition); + return $scheme.substr($path, 0, $dirSeparatorPosition); } /** @@ -219,7 +219,7 @@ final class Path } // Maintain scheme - if (false !== ($schemeSeparatorPosition = strpos($path, '://'))) { + if (false !== $schemeSeparatorPosition = strpos($path, '://')) { $scheme = substr($path, 0, $schemeSeparatorPosition + 3); $path = substr($path, $schemeSeparatorPosition + 3); } else { @@ -233,7 +233,7 @@ final class Path return $scheme.'/'; } - $length = mb_strlen($path); + $length = \strlen($path); // Windows root if ($length > 1 && ':' === $path[1] && ctype_alpha($firstCharacter)) { @@ -349,16 +349,16 @@ final class Path $extension = ltrim($extension, '.'); // No extension for paths - if ('/' === mb_substr($path, -1)) { + if ('/' === substr($path, -1)) { return $path; } // No actual extension in path if (empty($actualExtension)) { - return $path.('.' === mb_substr($path, -1) ? '' : '.').$extension; + return $path.('.' === substr($path, -1) ? '' : '.').$extension; } - return mb_substr($path, 0, -mb_strlen($actualExtension)).$extension; + return substr($path, 0, -\strlen($actualExtension)).$extension; } public static function isAbsolute(string $path): bool @@ -368,8 +368,8 @@ final class Path } // Strip scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $path = mb_substr($path, $schemeSeparatorPosition + 3); + if (false !== $schemeSeparatorPosition = strpos($path, '://')) { + $path = substr($path, $schemeSeparatorPosition + 3); } $firstCharacter = $path[0]; @@ -380,9 +380,9 @@ final class Path } // Windows root - if (mb_strlen($path) > 1 && ctype_alpha($firstCharacter) && ':' === $path[1]) { + if (\strlen($path) > 1 && ctype_alpha($firstCharacter) && ':' === $path[1]) { // Special case: "C:" - if (2 === mb_strlen($path)) { + if (2 === \strlen($path)) { return true; } @@ -451,9 +451,9 @@ final class Path return self::canonicalize($path); } - if (false !== ($schemeSeparatorPosition = mb_strpos($basePath, '://'))) { - $scheme = mb_substr($basePath, 0, $schemeSeparatorPosition + 3); - $basePath = mb_substr($basePath, $schemeSeparatorPosition + 3); + if (false !== $schemeSeparatorPosition = strpos($basePath, '://')) { + $scheme = substr($basePath, 0, $schemeSeparatorPosition + 3); + $basePath = substr($basePath, $schemeSeparatorPosition + 3); } else { $scheme = ''; } @@ -671,7 +671,7 @@ final class Path } // Only add slash if previous part didn't end with '/' or '\' - if (!\in_array(mb_substr($finalPath, -1), ['/', '\\'])) { + if (!\in_array(substr($finalPath, -1), ['/', '\\'])) { $finalPath .= '/'; } @@ -721,7 +721,7 @@ final class Path } /** - * @return non-empty-string[] + * @return string[] */ private static function findCanonicalParts(string $root, string $pathWithoutRoot): array { @@ -776,19 +776,19 @@ final class Path } // Remember scheme as part of the root, if any - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $root = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); + if (false !== $schemeSeparatorPosition = strpos($path, '://')) { + $root = substr($path, 0, $schemeSeparatorPosition + 3); + $path = substr($path, $schemeSeparatorPosition + 3); } else { $root = ''; } - $length = mb_strlen($path); + $length = \strlen($path); // Remove and remember root directory if (str_starts_with($path, '/')) { $root .= '/'; - $path = $length > 1 ? mb_substr($path, 1) : ''; + $path = $length > 1 ? substr($path, 1) : ''; } elseif ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) { if (2 === $length) { // Windows special case: "C:" @@ -796,8 +796,8 @@ final class Path $path = ''; } elseif ('/' === $path[2]) { // Windows normal case: "C:/".. - $root .= mb_substr($path, 0, 3); - $path = $length > 3 ? mb_substr($path, 3) : ''; + $root .= substr($path, 0, 3); + $path = $length > 3 ? substr($path, 3) : ''; } } @@ -806,11 +806,11 @@ final class Path private static function toLower(string $string): string { - if (false !== $encoding = mb_detect_encoding($string)) { + if (false !== $encoding = mb_detect_encoding($string, null, true)) { return mb_strtolower($string, $encoding); } - return strtolower($string, $encoding); + return strtolower($string); } private function __construct() diff --git a/src/ncc/ThirdParty/Symfony/Filesystem/VERSION b/src/ncc/ThirdParty/Symfony/Filesystem/VERSION index d7ff925..03825cd 100644 --- a/src/ncc/ThirdParty/Symfony/Filesystem/VERSION +++ b/src/ncc/ThirdParty/Symfony/Filesystem/VERSION @@ -1 +1 @@ -6.1.3 \ No newline at end of file +6.2.5 \ No newline at end of file