From 272e7027b6a217d59f5c40fc47df09ccd0e7cba3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 23 May 2022 09:43:57 +0200 Subject: [PATCH] Bump symfony/translation to 4.4.41 Signed-off-by: Joas Schilling --- autoload.php | 5 ++++ composer.json | 2 +- composer.lock | 19 ++++++------ composer/InstalledVersions.php | 2 ++ composer/autoload_classmap.php | 16 +--------- composer/autoload_files.php | 8 ++--- composer/autoload_namespaces.php | 2 +- composer/autoload_psr4.php | 2 +- composer/autoload_real.php | 21 +++----------- composer/autoload_static.php | 20 ++----------- composer/include_paths.php | 2 +- composer/installed.json | 19 ++++++------ composer/installed.php | 12 ++++---- .../translation/Catalogue/TargetOperation.php | 2 +- .../TranslatorPathsPass.php | 3 ++ .../translation/Dumper/XliffFileDumper.php | 6 ++-- .../Extractor/ExtractorInterface.php | 2 +- .../Extractor/PhpStringTokenParser.php | 2 +- symfony/translation/LICENSE | 2 +- symfony/translation/Loader/MoFileLoader.php | 8 ++--- .../translation/Loader/XliffFileLoader.php | 2 +- symfony/translation/MessageCatalogue.php | 18 +++++------- symfony/translation/PluralizationRules.php | 3 +- .../translation/Resources/data/parents.json | 7 +++-- symfony/translation/Translator.php | 29 ++++++++++--------- symfony/translation/composer.json | 3 +- 26 files changed, 95 insertions(+), 122 deletions(-) diff --git a/autoload.php b/autoload.php index 7558d271f..abdc5a52d 100644 --- a/autoload.php +++ b/autoload.php @@ -2,6 +2,11 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + exit(1); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit2f23f73bc0cc116b4b1eee1521aa8652::getLoader(); diff --git a/composer.json b/composer.json index 105f6b6e1..0cff2cc3c 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "symfony/polyfill-intl-normalizer": "^1.20", "symfony/process": "4.4.25", "symfony/routing": "4.4.25", - "symfony/translation": "4.4.25", + "symfony/translation": "^4.4.41", "web-auth/webauthn-lib": "^3.1" }, "extra": { diff --git a/composer.lock b/composer.lock index bbc444498..568fbb59d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "62c30cf3cd397070420c51fc3c520d97", + "content-hash": "0cee71fcb7f3737ed57d66f6692425ce", "packages": [ { "name": "aws/aws-crt-php", @@ -5831,21 +5831,22 @@ }, { "name": "symfony/translation", - "version": "v4.4.25", + "version": "v4.4.41", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4" + "reference": "dcb67eae126e74507e0b4f0b9ac6ef35b37c3331" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", + "url": "https://github.com/gitapi/repos/symfony/translation/zipball/dcb67eae126e74507e0b4f0b9ac6ef35b37c3331", + "reference": "dcb67eae126e74507e0b4f0b9ac6ef35b37c3331", "shasum": "" }, "require": { "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^1.1.6|^2" }, "conflict": { @@ -5858,7 +5859,7 @@ "symfony/translation-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^3.4|^4.0|^5.0", "symfony/console": "^3.4|^4.0|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", @@ -5899,7 +5900,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v4.4.25" + "source": "https://github.com/symfony/translation/tree/v4.4.41" }, "funding": [ { @@ -5915,7 +5916,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:39:37+00:00" + "time": "2022-04-21T07:22:34+00:00" }, { "name": "symfony/translation-contracts", @@ -6362,5 +6363,5 @@ "platform-overrides": { "php": "7.3.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/composer/InstalledVersions.php b/composer/InstalledVersions.php index d50e0c9fc..41bc143c1 100644 --- a/composer/InstalledVersions.php +++ b/composer/InstalledVersions.php @@ -21,6 +21,8 @@ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 64856a100..000910421 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( @@ -2222,15 +2222,6 @@ 'Pimple\\Psr11\\ServiceLocator' => $vendorDir . '/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php', 'Pimple\\ServiceIterator' => $vendorDir . '/pimple/pimple/src/Pimple/ServiceIterator.php', 'Pimple\\ServiceProviderInterface' => $vendorDir . '/pimple/pimple/src/Pimple/ServiceProviderInterface.php', - 'Pimple\\Tests\\Fixtures\\Invokable' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php', - 'Pimple\\Tests\\Fixtures\\NonInvokable' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php', - 'Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php', - 'Pimple\\Tests\\Fixtures\\Service' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php', - 'Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php', - 'Pimple\\Tests\\PimpleTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/PimpleTest.php', - 'Pimple\\Tests\\Psr11\\ContainerTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php', - 'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php', - 'Pimple\\Tests\\ServiceIteratorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php', 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', @@ -2262,9 +2253,6 @@ 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', 'Punic\\Calendar' => $vendorDir . '/punic/punic/code/Calendar.php', 'Punic\\Comparer' => $vendorDir . '/punic/punic/code/Comparer.php', 'Punic\\Currency' => $vendorDir . '/punic/punic/code/Currency.php', @@ -3168,9 +3156,7 @@ 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/translation-contracts/Test/TranslatorTest.php', 'Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/translation-contracts/TranslatableInterface.php', 'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php', 'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php', diff --git a/composer/autoload_files.php b/composer/autoload_files.php index 3db742fbf..7be09b3ad 100644 --- a/composer/autoload_files.php +++ b/composer/autoload_files.php @@ -2,16 +2,14 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '383eaff206634a77a1be54e64e6459c7' => $vendorDir . '/sabre/uri/lib/functions.php', - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', 'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', @@ -20,11 +18,13 @@ 'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php', '3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php', '93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'ebdb698ed4152ae445614b69b5e4bb6a' => $vendorDir . '/sabre/http/lib/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', 'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php', 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', diff --git a/composer/autoload_namespaces.php b/composer/autoload_namespaces.php index f05134514..225f7eb6a 100644 --- a/composer/autoload_namespaces.php +++ b/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php index 9fe3e478a..420a68a15 100644 --- a/composer/autoload_psr4.php +++ b/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/composer/autoload_real.php b/composer/autoload_real.php index bab03a3b9..2703bd367 100644 --- a/composer/autoload_real.php +++ b/composer/autoload_real.php @@ -25,33 +25,20 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit2f23f73bc0cc116b4b1eee1521aa8652', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit2f23f73bc0cc116b4b1eee1521aa8652', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); set_include_path(implode(PATH_SEPARATOR, $includePaths)); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::getInitializer($loader)); - } else { - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } + $includeFiles = \Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::$files; foreach ($includeFiles as $fileIdentifier => $file) { composerRequire2f23f73bc0cc116b4b1eee1521aa8652($fileIdentifier, $file); } diff --git a/composer/autoload_static.php b/composer/autoload_static.php index 4f650c375..d307853ab 100644 --- a/composer/autoload_static.php +++ b/composer/autoload_static.php @@ -7,12 +7,10 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 { public static $files = array ( - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '383eaff206634a77a1be54e64e6459c7' => __DIR__ . '/..' . '/sabre/uri/lib/functions.php', - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', 'a4ecaeafb8cfb009ad0e052c90355e98' => __DIR__ . '/..' . '/beberlei/assert/lib/Assert/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', @@ -21,11 +19,13 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'a1cce3d26cc15c00fcd0b3354bd72c88' => __DIR__ . '/..' . '/sabre/event/lib/Promise/functions.php', '3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php', '93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', 'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php', 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', @@ -2867,15 +2867,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Pimple\\Psr11\\ServiceLocator' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php', 'Pimple\\ServiceIterator' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/ServiceIterator.php', 'Pimple\\ServiceProviderInterface' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/ServiceProviderInterface.php', - 'Pimple\\Tests\\Fixtures\\Invokable' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php', - 'Pimple\\Tests\\Fixtures\\NonInvokable' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php', - 'Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php', - 'Pimple\\Tests\\Fixtures\\Service' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php', - 'Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php', - 'Pimple\\Tests\\PimpleTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/PimpleTest.php', - 'Pimple\\Tests\\Psr11\\ContainerTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php', - 'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php', - 'Pimple\\Tests\\ServiceIteratorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php', 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', @@ -2907,9 +2898,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', 'Punic\\Calendar' => __DIR__ . '/..' . '/punic/punic/code/Calendar.php', 'Punic\\Comparer' => __DIR__ . '/..' . '/punic/punic/code/Comparer.php', 'Punic\\Currency' => __DIR__ . '/..' . '/punic/punic/code/Currency.php', @@ -3813,9 +3801,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/translation-contracts/Test/TranslatorTest.php', 'Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatableInterface.php', 'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php', 'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php', diff --git a/composer/include_paths.php b/composer/include_paths.php index e7d0ea320..8c87e2c20 100644 --- a/composer/include_paths.php +++ b/composer/include_paths.php @@ -2,7 +2,7 @@ // include_paths.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/composer/installed.json b/composer/installed.json index c45c0b547..f3518fe30 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -6080,22 +6080,23 @@ }, { "name": "symfony/translation", - "version": "v4.4.25", - "version_normalized": "4.4.25.0", + "version": "v4.4.41", + "version_normalized": "4.4.41.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4" + "reference": "dcb67eae126e74507e0b4f0b9ac6ef35b37c3331" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", - "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4", + "url": "https://github.com/gitapi/repos/symfony/translation/zipball/dcb67eae126e74507e0b4f0b9ac6ef35b37c3331", + "reference": "dcb67eae126e74507e0b4f0b9ac6ef35b37c3331", "shasum": "" }, "require": { "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^1.1.6|^2" }, "conflict": { @@ -6108,7 +6109,7 @@ "symfony/translation-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^3.4|^4.0|^5.0", "symfony/console": "^3.4|^4.0|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", @@ -6123,7 +6124,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2021-05-26T17:39:37+00:00", + "time": "2022-04-21T07:22:34+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6151,7 +6152,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v4.4.25" + "source": "https://github.com/symfony/translation/tree/v4.4.41" }, "funding": [ { @@ -6616,6 +6617,6 @@ "install-path": "../web-auth/webauthn-lib" } ], - "dev": false, + "dev": true, "dev-package-names": [] } diff --git a/composer/installed.php b/composer/installed.php index c956fa6e8..ea6d789c9 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -5,9 +5,9 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), - 'reference' => '58686d576d5865b8a92e075a4f27b65ef56d7c0b', + 'reference' => 'b83b10a0808b054f8cfbac0c5fbdffab15f90591', 'name' => 'nextcloud/3rdparty', - 'dev' => false, + 'dev' => true, ), 'versions' => array( 'aws/aws-crt-php' => array( @@ -313,7 +313,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), - 'reference' => '58686d576d5865b8a92e075a4f27b65ef56d7c0b', + 'reference' => 'b83b10a0808b054f8cfbac0c5fbdffab15f90591', 'dev_requirement' => false, ), 'nextcloud/lognormalizer' => array( @@ -863,12 +863,12 @@ 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v4.4.25', - 'version' => '4.4.25.0', + 'pretty_version' => 'v4.4.41', + 'version' => '4.4.41.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), - 'reference' => 'dfe132c5c6d89f90ce7f961742cc532e9ca16dd4', + 'reference' => 'dcb67eae126e74507e0b4f0b9ac6ef35b37c3331', 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( diff --git a/symfony/translation/Catalogue/TargetOperation.php b/symfony/translation/Catalogue/TargetOperation.php index 8221d184d..c8b065512 100644 --- a/symfony/translation/Catalogue/TargetOperation.php +++ b/symfony/translation/Catalogue/TargetOperation.php @@ -49,7 +49,7 @@ protected function processDomain($domain) foreach ($this->source->all($domain) as $id => $message) { if ($this->target->has($id, $domain)) { $this->messages[$domain]['all'][$id] = $message; - $d = $this->target->defines($id, $intlDomain) ? $intlDomain : $domain; + $d = $this->source->defines($id, $intlDomain) ? $intlDomain : $domain; $this->result->add([$id => $message], $d); if (null !== $keyMetadata = $this->source->getMetadata($id, $d)) { $this->result->setMetadata($id, $keyMetadata, $d); diff --git a/symfony/translation/DependencyInjection/TranslatorPathsPass.php b/symfony/translation/DependencyInjection/TranslatorPathsPass.php index a91aef617..37c8c5719 100644 --- a/symfony/translation/DependencyInjection/TranslatorPathsPass.php +++ b/symfony/translation/DependencyInjection/TranslatorPathsPass.php @@ -60,6 +60,9 @@ public function process(ContainerBuilder $container) foreach ($this->paths as $class => $_) { if (($r = $container->getReflectionClass($class)) && !$r->isInterface()) { $paths[] = $r->getFileName(); + foreach ($r->getTraits() as $trait) { + $paths[] = $trait->getFileName(); + } } } if ($paths) { diff --git a/symfony/translation/Dumper/XliffFileDumper.php b/symfony/translation/Dumper/XliffFileDumper.php index 63f30a5b6..37e162aa9 100644 --- a/symfony/translation/Dumper/XliffFileDumper.php +++ b/symfony/translation/Dumper/XliffFileDumper.php @@ -141,8 +141,8 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ? $xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale())); $xliffFile = $xliff->appendChild($dom->createElement('file')); - if (MessageCatalogue::INTL_DOMAIN_SUFFIX === substr($domain, -($suffixLength = \strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX)))) { - $xliffFile->setAttribute('id', substr($domain, 0, -$suffixLength).'.'.$messages->getLocale()); + if (str_ends_with($domain, MessageCatalogue::INTL_DOMAIN_SUFFIX)) { + $xliffFile->setAttribute('id', substr($domain, 0, -\strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX)).'.'.$messages->getLocale()); } else { $xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale()); } @@ -198,6 +198,6 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ? private function hasMetadataArrayInfo(string $key, array $metadata = null): bool { - return null !== $metadata && \array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || \is_array($metadata[$key])); + return is_iterable($metadata[$key] ?? null); } } diff --git a/symfony/translation/Extractor/ExtractorInterface.php b/symfony/translation/Extractor/ExtractorInterface.php index 91de20192..34e6b2d6e 100644 --- a/symfony/translation/Extractor/ExtractorInterface.php +++ b/symfony/translation/Extractor/ExtractorInterface.php @@ -24,7 +24,7 @@ interface ExtractorInterface /** * Extracts translation messages from files, a file or a directory to the catalogue. * - * @param string|array $resource Files, a file or a directory + * @param string|iterable $resource Files, a file or a directory */ public function extract($resource, MessageCatalogue $catalogue); diff --git a/symfony/translation/Extractor/PhpStringTokenParser.php b/symfony/translation/Extractor/PhpStringTokenParser.php index 4531e9122..f468fe5ea 100644 --- a/symfony/translation/Extractor/PhpStringTokenParser.php +++ b/symfony/translation/Extractor/PhpStringTokenParser.php @@ -133,7 +133,7 @@ public static function parseDocString($startToken, $str) $str = preg_replace('~(\r\n|\n|\r)$~', '', $str); // nowdoc string - if (false !== strpos($startToken, '\'')) { + if (str_contains($startToken, '\'')) { return $str; } diff --git a/symfony/translation/LICENSE b/symfony/translation/LICENSE index 9ff2d0d63..88bf75bb4 100644 --- a/symfony/translation/LICENSE +++ b/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2021 Fabien Potencier +Copyright (c) 2004-2022 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/symfony/translation/Loader/MoFileLoader.php b/symfony/translation/Loader/MoFileLoader.php index accd023ab..ce8611cdf 100644 --- a/symfony/translation/Loader/MoFileLoader.php +++ b/symfony/translation/Loader/MoFileLoader.php @@ -22,13 +22,13 @@ class MoFileLoader extends FileLoader * Magic used for validating the format of an MO file as well as * detecting if the machine used to create that file was little endian. */ - public const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; + public const MO_LITTLE_ENDIAN_MAGIC = 0x950412DE; /** * Magic used for validating the format of an MO file as well as * detecting if the machine used to create that file was big endian. */ - public const MO_BIG_ENDIAN_MAGIC = 0xde120495; + public const MO_BIG_ENDIAN_MAGIC = 0xDE120495; /** * The size of the header of an MO file in bytes. @@ -89,7 +89,7 @@ protected function loadResource($resource) fseek($stream, $offset); $singularId = fread($stream, $length); - if (false !== strpos($singularId, "\000")) { + if (str_contains($singularId, "\000")) { [$singularId, $pluralId] = explode("\000", $singularId); } @@ -104,7 +104,7 @@ protected function loadResource($resource) fseek($stream, $offset); $translated = fread($stream, $length); - if (false !== strpos($translated, "\000")) { + if (str_contains($translated, "\000")) { $translated = explode("\000", $translated); } diff --git a/symfony/translation/Loader/XliffFileLoader.php b/symfony/translation/Loader/XliffFileLoader.php index a949e59ce..35e2d9c10 100644 --- a/symfony/translation/Loader/XliffFileLoader.php +++ b/symfony/translation/Loader/XliffFileLoader.php @@ -76,7 +76,7 @@ private function extract($resource, MessageCatalogue $catalogue, string $domain) private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) { $xml = simplexml_import_dom($dom); - $encoding = strtoupper($dom->encoding); + $encoding = $dom->encoding ? strtoupper($dom->encoding) : null; $namespace = 'urn:oasis:names:tc:xliff:document:1.2'; $xml->registerXPathNamespace('xliff', $namespace); diff --git a/symfony/translation/MessageCatalogue.php b/symfony/translation/MessageCatalogue.php index cc8d3ceef..6e6b9fe0e 100644 --- a/symfony/translation/MessageCatalogue.php +++ b/symfony/translation/MessageCatalogue.php @@ -27,8 +27,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf private $parent; /** - * @param string $locale The locale - * @param array $messages An array of messages classified by domain + * @param array $messages An array of messages classified by domain */ public function __construct(?string $locale, array $messages = []) { @@ -54,11 +53,10 @@ public function getLocale() public function getDomains() { $domains = []; - $suffixLength = \strlen(self::INTL_DOMAIN_SUFFIX); foreach ($this->messages as $domain => $messages) { - if (\strlen($domain) > $suffixLength && false !== $i = strpos($domain, self::INTL_DOMAIN_SUFFIX, -$suffixLength)) { - $domain = substr($domain, 0, $i); + if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { + $domain = substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)); } $domains[$domain] = $domain; } @@ -73,7 +71,7 @@ public function all($domain = null) { if (null !== $domain) { // skip messages merge if intl-icu requested explicitly - if (false !== strpos($domain, self::INTL_DOMAIN_SUFFIX)) { + if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { return $this->messages[$domain] ?? []; } @@ -81,11 +79,10 @@ public function all($domain = null) } $allMessages = []; - $suffixLength = \strlen(self::INTL_DOMAIN_SUFFIX); foreach ($this->messages as $domain => $messages) { - if (\strlen($domain) > $suffixLength && false !== $i = strpos($domain, self::INTL_DOMAIN_SUFFIX, -$suffixLength)) { - $domain = substr($domain, 0, $i); + if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { + $domain = substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)); $allMessages[$domain] = $messages + ($allMessages[$domain] ?? []); } else { $allMessages[$domain] = ($allMessages[$domain] ?? []) + $messages; @@ -166,8 +163,7 @@ public function add($messages, $domain = 'messages') $this->messages[$domain] = []; } $intlDomain = $domain; - $suffixLength = \strlen(self::INTL_DOMAIN_SUFFIX); - if (\strlen($domain) < $suffixLength || false === strpos($domain, self::INTL_DOMAIN_SUFFIX, -$suffixLength)) { + if (!str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { $intlDomain .= self::INTL_DOMAIN_SUFFIX; } foreach ($messages as $id => $message) { diff --git a/symfony/translation/PluralizationRules.php b/symfony/translation/PluralizationRules.php index 2a46ce094..e69ceabc1 100644 --- a/symfony/translation/PluralizationRules.php +++ b/symfony/translation/PluralizationRules.php @@ -43,7 +43,7 @@ public static function get($number, $locale/*, bool $triggerDeprecation = true*/ $locale = 'xbr'; } - if (\strlen($locale) > 3) { + if ('en_US_POSIX' !== $locale && \strlen($locale) > 3) { $locale = substr($locale, 0, -\strlen(strrchr($locale, '_'))); } @@ -88,6 +88,7 @@ public static function get($number, $locale/*, bool $triggerDeprecation = true*/ case 'de': case 'el': case 'en': + case 'en_US_POSIX': case 'eo': case 'es': case 'et': diff --git a/symfony/translation/Resources/data/parents.json b/symfony/translation/Resources/data/parents.json index d334b2982..32a33cdaf 100644 --- a/symfony/translation/Resources/data/parents.json +++ b/symfony/translation/Resources/data/parents.json @@ -12,7 +12,6 @@ "en_BS": "en_001", "en_BW": "en_001", "en_BZ": "en_001", - "en_CA": "en_001", "en_CC": "en_001", "en_CH": "en_150", "en_CK": "en_001", @@ -55,6 +54,7 @@ "en_MS": "en_001", "en_MT": "en_001", "en_MU": "en_001", + "en_MV": "en_001", "en_MW": "en_001", "en_MY": "en_001", "en_NA": "en_001", @@ -65,7 +65,6 @@ "en_NU": "en_001", "en_NZ": "en_001", "en_PG": "en_001", - "en_PH": "en_001", "en_PK": "en_001", "en_PN": "en_001", "en_PW": "en_001", @@ -118,6 +117,10 @@ "es_UY": "es_419", "es_VE": "es_419", "ff_Adlm": "root", + "hi_Latn": "en_IN", + "ks_Deva": "root", + "nb": "no", + "nn": "no", "pa_Arab": "root", "pt_AO": "pt_PT", "pt_CH": "pt_PT", diff --git a/symfony/translation/Translator.php b/symfony/translation/Translator.php index 0f03b5afc..5eb0183cb 100644 --- a/symfony/translation/Translator.php +++ b/symfony/translation/Translator.php @@ -143,6 +143,7 @@ public function addResource($format, $resource, $locale, $domain = null) } $this->assertValidLocale($locale); + $locale ?: $locale = class_exists(\Locale::class) ? \Locale::getDefault() : 'en'; $this->resources[$locale][] = [$format, $resource, $domain]; @@ -163,7 +164,7 @@ public function setLocale($locale) } $this->assertValidLocale($locale); - $this->locale = $locale ?? (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); + $this->locale = $locale; } /** @@ -171,14 +172,12 @@ public function setLocale($locale) */ public function getLocale() { - return $this->locale; + return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); } /** * Sets the fallback locales. * - * @param array $locales The fallback locales - * * @throws InvalidArgumentException If a locale contains invalid characters */ public function setFallbackLocales(array $locales) @@ -283,7 +282,7 @@ public function transChoice($id, $number, array $parameters = [], $domain = null */ public function getCatalogue($locale = null) { - if (null === $locale) { + if (!$locale) { $locale = $this->getLocale(); } else { $this->assertValidLocale($locale); @@ -463,14 +462,8 @@ protected function computeFallbackLocales($locale) $this->parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true); } + $originLocale = $locale; $locales = []; - foreach ($this->fallbackLocales as $fallback) { - if ($fallback === $locale) { - continue; - } - - $locales[] = $fallback; - } while ($locale) { $parent = $this->parentLocales[$locale] ?? null; @@ -491,10 +484,18 @@ protected function computeFallbackLocales($locale) } if (null !== $locale) { - array_unshift($locales, $locale); + $locales[] = $locale; } } + foreach ($this->fallbackLocales as $fallback) { + if ($fallback === $originLocale) { + continue; + } + + $locales[] = $fallback; + } + return array_unique($locales); } @@ -507,7 +508,7 @@ protected function computeFallbackLocales($locale) */ protected function assertValidLocale($locale) { - if (null !== $locale && 1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { + if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', (string) $locale)) { throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); } } diff --git a/symfony/translation/composer.json b/symfony/translation/composer.json index fbc084666..9eafc1b14 100644 --- a/symfony/translation/composer.json +++ b/symfony/translation/composer.json @@ -18,6 +18,7 @@ "require": { "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^1.1.6|^2" }, "require-dev": { @@ -29,7 +30,7 @@ "symfony/service-contracts": "^1.1.2|^2", "symfony/yaml": "^3.4|^4.0|^5.0", "symfony/finder": "~2.8|~3.0|~4.0|^5.0", - "psr/log": "~1.0" + "psr/log": "^1|^2|^3" }, "conflict": { "symfony/config": "<3.4",