diff --git a/composer.json b/composer.json
index f37ba4994..27df644e5 100644
--- a/composer.json
+++ b/composer.json
@@ -45,14 +45,14 @@
"scssphp/scssphp": "^1.4.0",
"stecman/symfony-console-completion": "^0.11.0",
"swiftmailer/swiftmailer": "^6.0",
- "symfony/console": "4.4.19",
- "symfony/event-dispatcher": "4.4.19",
+ "symfony/console": "4.4.25",
+ "symfony/event-dispatcher": "4.4.25",
"symfony/event-dispatcher-contracts": "1.1.9",
"symfony/polyfill-intl-grapheme": "^1.20",
"symfony/polyfill-intl-normalizer": "^1.20",
- "symfony/process": "4.4.19",
- "symfony/routing": "4.4.19",
- "symfony/translation": "4.4.19",
+ "symfony/process": "4.4.25",
+ "symfony/routing": "4.4.25",
+ "symfony/translation": "4.4.25",
"web-auth/webauthn-lib": "^3.1"
},
"scripts": {
diff --git a/composer.lock b/composer.lock
index 9bb30d17e..05d32a134 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": "8b8c7f1617423e95fe02d57343e4d991",
+ "content-hash": "1f3e05d9ba73ccfcdef63d932a860baf",
"packages": [
{
"name": "aws/aws-sdk-php",
@@ -4313,16 +4313,16 @@
},
{
"name": "symfony/console",
- "version": "v4.4.19",
+ "version": "v4.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "24026c44fc37099fa145707fecd43672831b837a"
+ "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/24026c44fc37099fa145707fecd43672831b837a",
- "reference": "24026c44fc37099fa145707fecd43672831b837a",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095",
+ "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095",
"shasum": ""
},
"require": {
@@ -4382,7 +4382,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/console/tree/v4.4.19"
+ "source": "https://github.com/symfony/console/tree/v4.4.25"
},
"funding": [
{
@@ -4398,20 +4398,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-27T09:09:26+00:00"
+ "time": "2021-05-26T11:20:16+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.19",
+ "version": "v4.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c"
+ "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c352647244bd376bf7d31efbd5401f13f50dad0c",
- "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f",
+ "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f",
"shasum": ""
},
"require": {
@@ -4465,7 +4465,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.19"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.25"
},
"funding": [
{
@@ -4481,7 +4481,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-27T09:09:26+00:00"
+ "time": "2021-05-26T17:39:37+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -5293,16 +5293,16 @@
},
{
"name": "symfony/process",
- "version": "v4.4.19",
+ "version": "v4.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a"
+ "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a",
- "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a",
+ "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9",
+ "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9",
"shasum": ""
},
"require": {
@@ -5334,7 +5334,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v4.4.19"
+ "source": "https://github.com/symfony/process/tree/v4.4.25"
},
"funding": [
{
@@ -5350,20 +5350,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-27T09:09:26+00:00"
+ "time": "2021-05-26T11:20:16+00:00"
},
{
"name": "symfony/routing",
- "version": "v4.4.19",
+ "version": "v4.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "87529f6e305c7acb162840d1ea57922038072425"
+ "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/87529f6e305c7acb162840d1ea57922038072425",
- "reference": "87529f6e305c7acb162840d1ea57922038072425",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/3a3c2f197ad0846ac6413225fc78868ba1c61434",
+ "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434",
"shasum": ""
},
"require": {
@@ -5422,7 +5422,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v4.4.19"
+ "source": "https://github.com/symfony/routing/tree/v4.4.25"
},
"funding": [
{
@@ -5438,7 +5438,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-27T09:09:26+00:00"
+ "time": "2021-05-26T17:39:37+00:00"
},
{
"name": "symfony/service-contracts",
@@ -5521,16 +5521,16 @@
},
{
"name": "symfony/translation",
- "version": "v4.4.19",
+ "version": "v4.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "e1d0c67167a553556d9f974b5fa79c2448df317a"
+ "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/e1d0c67167a553556d9f974b5fa79c2448df317a",
- "reference": "e1d0c67167a553556d9f974b5fa79c2448df317a",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
+ "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
"shasum": ""
},
"require": {
@@ -5545,7 +5545,7 @@
"symfony/yaml": "<3.4"
},
"provide": {
- "symfony/translation-implementation": "1.0"
+ "symfony/translation-implementation": "1.0|2.0"
},
"require-dev": {
"psr/log": "~1.0",
@@ -5589,7 +5589,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/translation/tree/v4.4.19"
+ "source": "https://github.com/symfony/translation/tree/v4.4.25"
},
"funding": [
{
@@ -5605,7 +5605,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-27T09:09:26+00:00"
+ "time": "2021-05-26T17:39:37+00:00"
},
{
"name": "symfony/translation-contracts",
diff --git a/composer/InstalledVersions.php b/composer/InstalledVersions.php
index 7d4fd24b2..f4120b256 100644
--- a/composer/InstalledVersions.php
+++ b/composer/InstalledVersions.php
@@ -32,7 +32,7 @@ class InstalledVersions
'aliases' =>
array (
),
- 'reference' => '0d7c15582f5d2478f333c0487acf88ae881d9206',
+ 'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
@@ -314,7 +314,7 @@ class InstalledVersions
'aliases' =>
array (
),
- 'reference' => '0d7c15582f5d2478f333c0487acf88ae881d9206',
+ 'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
),
'nextcloud/lognormalizer' =>
array (
@@ -719,21 +719,21 @@ class InstalledVersions
),
'symfony/console' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '24026c44fc37099fa145707fecd43672831b837a',
+ 'reference' => 'a62acecdf5b50e314a4f305cd01b5282126f3095',
),
'symfony/event-dispatcher' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => 'c352647244bd376bf7d31efbd5401f13f50dad0c',
+ 'reference' => '047773e7016e4fd45102cedf4bd2558ae0d0c32f',
),
'symfony/event-dispatcher-contracts' =>
array (
@@ -834,21 +834,21 @@ class InstalledVersions
),
'symfony/process' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '7e950b6366d4da90292c2e7fa820b3c1842b965a',
+ 'reference' => 'cd61e6dd273975c6625316de9d141ebd197f93c9',
),
'symfony/routing' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '87529f6e305c7acb162840d1ea57922038072425',
+ 'reference' => '3a3c2f197ad0846ac6413225fc78868ba1c61434',
),
'symfony/service-contracts' =>
array (
@@ -861,12 +861,12 @@ class InstalledVersions
),
'symfony/translation' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => 'e1d0c67167a553556d9f974b5fa79c2448df317a',
+ 'reference' => 'dfe132c5c6d89f90ce7f961742cc532e9ca16dd4',
),
'symfony/translation-contracts' =>
array (
@@ -881,7 +881,7 @@ class InstalledVersions
array (
'provided' =>
array (
- 0 => '1.0',
+ 0 => '1.0|2.0',
),
),
'thecodingmachine/safe' =>
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 1893105ba..8ef510918 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -3019,9 +3019,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 61d71cd6f..4e2cfcf53 100644
--- a/composer/autoload_files.php
+++ b/composer/autoload_files.php
@@ -20,13 +20,14 @@
'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php',
- '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/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',
'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php',
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
+ 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php',
'47f619d9197b36cf5ab70738d7743fe2' => $vendorDir . '/thecodingmachine/safe/deprecated/libevent.php',
'ea6bb8a12ef9b68f6ada99058e530760' => $vendorDir . '/thecodingmachine/safe/deprecated/mssql.php',
@@ -116,7 +117,6 @@
'4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php',
- 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'8a9dc1de0ca7e01f3e08231539562f61' => $vendorDir . '/aws/aws-sdk-php/src/functions.php',
'538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php',
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 6089e1be4..4cadd8c67 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -21,13 +21,14 @@ 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',
- '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/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',
'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php',
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
+ 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/apc.php',
'47f619d9197b36cf5ab70738d7743fe2' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/libevent.php',
'ea6bb8a12ef9b68f6ada99058e530760' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/mssql.php',
@@ -117,7 +118,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php',
- 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'8a9dc1de0ca7e01f3e08231539562f61' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/functions.php',
'538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php',
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
@@ -3651,9 +3651,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/installed.json b/composer/installed.json
index 855c4bb2e..16f8a581c 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -4501,17 +4501,17 @@
},
{
"name": "symfony/console",
- "version": "v4.4.19",
- "version_normalized": "4.4.19.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "24026c44fc37099fa145707fecd43672831b837a"
+ "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/24026c44fc37099fa145707fecd43672831b837a",
- "reference": "24026c44fc37099fa145707fecd43672831b837a",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095",
+ "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095",
"shasum": ""
},
"require": {
@@ -4545,7 +4545,7 @@
"symfony/lock": "",
"symfony/process": ""
},
- "time": "2021-01-27T09:09:26+00:00",
+ "time": "2021-05-26T11:20:16+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4573,7 +4573,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/console/tree/v4.4.19"
+ "source": "https://github.com/symfony/console/tree/v4.4.25"
},
"funding": [
{
@@ -4593,17 +4593,17 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.19",
- "version_normalized": "4.4.19.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c"
+ "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c352647244bd376bf7d31efbd5401f13f50dad0c",
- "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f",
+ "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f",
"shasum": ""
},
"require": {
@@ -4631,7 +4631,7 @@
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
- "time": "2021-01-27T09:09:26+00:00",
+ "time": "2021-05-26T17:39:37+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4659,7 +4659,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.19"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.25"
},
"funding": [
{
@@ -5517,23 +5517,23 @@
},
{
"name": "symfony/process",
- "version": "v4.4.19",
- "version_normalized": "4.4.19.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a"
+ "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a",
- "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a",
+ "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9",
+ "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9",
"shasum": ""
},
"require": {
"php": ">=7.1.3"
},
- "time": "2021-01-27T09:09:26+00:00",
+ "time": "2021-05-26T11:20:16+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5561,7 +5561,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v4.4.19"
+ "source": "https://github.com/symfony/process/tree/v4.4.25"
},
"funding": [
{
@@ -5581,17 +5581,17 @@
},
{
"name": "symfony/routing",
- "version": "v4.4.19",
- "version_normalized": "4.4.19.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "87529f6e305c7acb162840d1ea57922038072425"
+ "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/87529f6e305c7acb162840d1ea57922038072425",
- "reference": "87529f6e305c7acb162840d1ea57922038072425",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/3a3c2f197ad0846ac6413225fc78868ba1c61434",
+ "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434",
"shasum": ""
},
"require": {
@@ -5618,7 +5618,7 @@
"symfony/http-foundation": "For using a Symfony Request object",
"symfony/yaml": "For using the YAML loader"
},
- "time": "2021-01-27T09:09:26+00:00",
+ "time": "2021-05-26T17:39:37+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5652,7 +5652,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v4.4.19"
+ "source": "https://github.com/symfony/routing/tree/v4.4.25"
},
"funding": [
{
@@ -5754,17 +5754,17 @@
},
{
"name": "symfony/translation",
- "version": "v4.4.19",
- "version_normalized": "4.4.19.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "e1d0c67167a553556d9f974b5fa79c2448df317a"
+ "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/e1d0c67167a553556d9f974b5fa79c2448df317a",
- "reference": "e1d0c67167a553556d9f974b5fa79c2448df317a",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
+ "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
"shasum": ""
},
"require": {
@@ -5779,7 +5779,7 @@
"symfony/yaml": "<3.4"
},
"provide": {
- "symfony/translation-implementation": "1.0"
+ "symfony/translation-implementation": "1.0|2.0"
},
"require-dev": {
"psr/log": "~1.0",
@@ -5797,7 +5797,7 @@
"symfony/config": "",
"symfony/yaml": ""
},
- "time": "2021-01-27T09:09:26+00:00",
+ "time": "2021-05-26T17:39:37+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5825,7 +5825,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/translation/tree/v4.4.19"
+ "source": "https://github.com/symfony/translation/tree/v4.4.25"
},
"funding": [
{
@@ -6280,6 +6280,6 @@
"install-path": "../web-auth/webauthn-lib"
}
],
- "dev": true,
+ "dev": false,
"dev-package-names": []
}
diff --git a/composer/installed.php b/composer/installed.php
index 3cd13c892..1d6375a86 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -6,7 +6,7 @@
'aliases' =>
array (
),
- 'reference' => '0d7c15582f5d2478f333c0487acf88ae881d9206',
+ 'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
@@ -288,7 +288,7 @@
'aliases' =>
array (
),
- 'reference' => '0d7c15582f5d2478f333c0487acf88ae881d9206',
+ 'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
),
'nextcloud/lognormalizer' =>
array (
@@ -693,21 +693,21 @@
),
'symfony/console' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '24026c44fc37099fa145707fecd43672831b837a',
+ 'reference' => 'a62acecdf5b50e314a4f305cd01b5282126f3095',
),
'symfony/event-dispatcher' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => 'c352647244bd376bf7d31efbd5401f13f50dad0c',
+ 'reference' => '047773e7016e4fd45102cedf4bd2558ae0d0c32f',
),
'symfony/event-dispatcher-contracts' =>
array (
@@ -808,21 +808,21 @@
),
'symfony/process' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '7e950b6366d4da90292c2e7fa820b3c1842b965a',
+ 'reference' => 'cd61e6dd273975c6625316de9d141ebd197f93c9',
),
'symfony/routing' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => '87529f6e305c7acb162840d1ea57922038072425',
+ 'reference' => '3a3c2f197ad0846ac6413225fc78868ba1c61434',
),
'symfony/service-contracts' =>
array (
@@ -835,12 +835,12 @@
),
'symfony/translation' =>
array (
- 'pretty_version' => 'v4.4.19',
- 'version' => '4.4.19.0',
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
'aliases' =>
array (
),
- 'reference' => 'e1d0c67167a553556d9f974b5fa79c2448df317a',
+ 'reference' => 'dfe132c5c6d89f90ce7f961742cc532e9ca16dd4',
),
'symfony/translation-contracts' =>
array (
@@ -855,7 +855,7 @@
array (
'provided' =>
array (
- 0 => '1.0',
+ 0 => '1.0|2.0',
),
),
'thecodingmachine/safe' =>
diff --git a/composer/package-versions-deprecated/src/PackageVersions/Versions.php b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
index 98ecea626..28a2c172d 100644
--- a/composer/package-versions-deprecated/src/PackageVersions/Versions.php
+++ b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
@@ -99,8 +99,8 @@ final class Versions
'spomky-labs/cbor-php' => 'v2.0.1@9776578000be884cd7864eeb7c37a4ac92d8c995',
'stecman/symfony-console-completion' => '0.11.0@a9502dab59405e275a9f264536c4e1cb61fc3518',
'swiftmailer/swiftmailer' => 'v6.2.5@698a6a9f54d7eb321274de3ad19863802c879fb7',
- 'symfony/console' => 'v4.4.19@24026c44fc37099fa145707fecd43672831b837a',
- 'symfony/event-dispatcher' => 'v4.4.19@c352647244bd376bf7d31efbd5401f13f50dad0c',
+ 'symfony/console' => 'v4.4.25@a62acecdf5b50e314a4f305cd01b5282126f3095',
+ 'symfony/event-dispatcher' => 'v4.4.25@047773e7016e4fd45102cedf4bd2558ae0d0c32f',
'symfony/event-dispatcher-contracts' => 'v1.1.9@84e23fdcd2517bf37aecbd16967e83f0caee25a7',
'symfony/polyfill-ctype' => 'v1.23.0@46cd95797e9df938fdd2b03693b5fca5e64b01ce',
'symfony/polyfill-iconv' => 'v1.23.0@63b5bb7db83e5673936d6e3b8b3e022ff6474933',
@@ -111,16 +111,16 @@ final class Versions
'symfony/polyfill-php72' => 'v1.23.0@9a142215a36a3888e30d0a9eeea9766764e96976',
'symfony/polyfill-php73' => 'v1.23.0@fba8933c384d6476ab14fb7b8526e5287ca7e010',
'symfony/polyfill-php80' => 'v1.23.0@eca0bf41ed421bed1b57c4958bab16aa86b757d0',
- 'symfony/process' => 'v4.4.19@7e950b6366d4da90292c2e7fa820b3c1842b965a',
- 'symfony/routing' => 'v4.4.19@87529f6e305c7acb162840d1ea57922038072425',
+ 'symfony/process' => 'v4.4.25@cd61e6dd273975c6625316de9d141ebd197f93c9',
+ 'symfony/routing' => 'v4.4.25@3a3c2f197ad0846ac6413225fc78868ba1c61434',
'symfony/service-contracts' => 'v2.4.0@f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb',
- 'symfony/translation' => 'v4.4.19@e1d0c67167a553556d9f974b5fa79c2448df317a',
+ 'symfony/translation' => 'v4.4.25@dfe132c5c6d89f90ce7f961742cc532e9ca16dd4',
'symfony/translation-contracts' => 'v2.4.0@95c812666f3e91db75385749fe219c5e494c7f95',
'thecodingmachine/safe' => 'v1.3.3@a8ab0876305a4cdaef31b2350fcb9811b5608dbc',
'web-auth/cose-lib' => 'v3.3.1@eea6fae63ff5c81bf98c115b1be5f38a69682c16',
'web-auth/metadata-service' => 'v3.3.1@8488d3a832a38cc81c670fce05de1e515c6e64b1',
'web-auth/webauthn-lib' => 'v3.3.1@e411527a41c1013512fccdfce61681eb36484c77',
- 'nextcloud/3rdparty' => 'dev-master@0d7c15582f5d2478f333c0487acf88ae881d9206',
+ 'nextcloud/3rdparty' => 'dev-master@ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
);
private function __construct()
diff --git a/symfony/console/Command/Command.php b/symfony/console/Command/Command.php
index 71ad4a49e..d4ab2eb8d 100644
--- a/symfony/console/Command/Command.php
+++ b/symfony/console/Command/Command.php
@@ -394,11 +394,11 @@ public function addArgument($name, $mode = null, $description = '', $default = n
/**
* Adds an option.
*
- * @param string $name The option name
- * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
- * @param string $description A description text
- * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE)
+ * @param string $name The option name
+ * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
+ * @param string $description A description text
+ * @param string|string[]|bool|null $default The default value (must be null for InputOption::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*
diff --git a/symfony/console/Command/HelpCommand.php b/symfony/console/Command/HelpCommand.php
index b32be4c95..cece78299 100644
--- a/symfony/console/Command/HelpCommand.php
+++ b/symfony/console/Command/HelpCommand.php
@@ -40,7 +40,7 @@ protected function configure()
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
])
- ->setDescription('Displays help for a command')
+ ->setDescription('Display help for a command')
->setHelp(<<<'EOF'
The %command.name% command displays help for a given command:
diff --git a/symfony/console/Command/ListCommand.php b/symfony/console/Command/ListCommand.php
index 8af952652..44324a5e7 100644
--- a/symfony/console/Command/ListCommand.php
+++ b/symfony/console/Command/ListCommand.php
@@ -33,7 +33,7 @@ protected function configure()
$this
->setName('list')
->setDefinition($this->createDefinition())
- ->setDescription('Lists commands')
+ ->setDescription('List commands')
->setHelp(<<<'EOF'
The %command.name% command lists all commands:
diff --git a/symfony/console/Descriptor/Descriptor.php b/symfony/console/Descriptor/Descriptor.php
index d25a708e4..9c3878d1e 100644
--- a/symfony/console/Descriptor/Descriptor.php
+++ b/symfony/console/Descriptor/Descriptor.php
@@ -72,36 +72,26 @@ protected function write($content, $decorated = false)
/**
* Describes an InputArgument instance.
- *
- * @return string|mixed
*/
abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
/**
* Describes an InputOption instance.
- *
- * @return string|mixed
*/
abstract protected function describeInputOption(InputOption $option, array $options = []);
/**
* Describes an InputDefinition instance.
- *
- * @return string|mixed
*/
abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
/**
* Describes a Command instance.
- *
- * @return string|mixed
*/
abstract protected function describeCommand(Command $command, array $options = []);
/**
* Describes an Application instance.
- *
- * @return string|mixed
*/
abstract protected function describeApplication(Application $application, array $options = []);
}
diff --git a/symfony/console/Descriptor/TextDescriptor.php b/symfony/console/Descriptor/TextDescriptor.php
index 1db3686be..7d4d5f0bb 100644
--- a/symfony/console/Descriptor/TextDescriptor.php
+++ b/symfony/console/Descriptor/TextDescriptor.php
@@ -117,7 +117,7 @@ protected function describeInputDefinition(InputDefinition $definition, array $o
$this->writeText('Options:', $options);
foreach ($definition->getOptions() as $option) {
- if (\strlen($option->getShortcut()) > 1) {
+ if (\strlen($option->getShortcut() ?? '') > 1) {
$laterOptions[] = $option;
continue;
}
@@ -298,7 +298,7 @@ private function formatDefaultValue($default): string
}
/**
- * @param (Command|string)[] $commands
+ * @param array $commands
*/
private function getColumnWidth(array $commands): int
{
diff --git a/symfony/console/Descriptor/XmlDescriptor.php b/symfony/console/Descriptor/XmlDescriptor.php
index a6288d44f..e0ed53a38 100644
--- a/symfony/console/Descriptor/XmlDescriptor.php
+++ b/symfony/console/Descriptor/XmlDescriptor.php
@@ -201,7 +201,7 @@ private function getInputOptionDocument(InputOption $option): \DOMDocument
$dom->appendChild($objectXML = $dom->createElement('option'));
$objectXML->setAttribute('name', '--'.$option->getName());
- $pos = strpos($option->getShortcut(), '|');
+ $pos = strpos($option->getShortcut() ?? '', '|');
if (false !== $pos) {
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
$objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
diff --git a/symfony/console/EventListener/ErrorListener.php b/symfony/console/EventListener/ErrorListener.php
index a34075793..897d9853f 100644
--- a/symfony/console/EventListener/ErrorListener.php
+++ b/symfony/console/EventListener/ErrorListener.php
@@ -40,12 +40,12 @@ public function onConsoleError(ConsoleErrorEvent $event)
$error = $event->getError();
if (!$inputString = $this->getInputString($event)) {
- $this->logger->error('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]);
+ $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]);
return;
}
- $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
+ $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
}
public function onConsoleTerminate(ConsoleTerminateEvent $event)
diff --git a/symfony/console/Exception/CommandNotFoundException.php b/symfony/console/Exception/CommandNotFoundException.php
index 69d5cb996..590a71c77 100644
--- a/symfony/console/Exception/CommandNotFoundException.php
+++ b/symfony/console/Exception/CommandNotFoundException.php
@@ -21,10 +21,10 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
private $alternatives;
/**
- * @param string $message Exception message to throw
- * @param array $alternatives List of similar defined names
- * @param int $code Exception code
- * @param \Throwable $previous Previous exception used for the exception chaining
+ * @param string $message Exception message to throw
+ * @param string[] $alternatives List of similar defined names
+ * @param int $code Exception code
+ * @param \Throwable|null $previous Previous exception used for the exception chaining
*/
public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
{
@@ -34,7 +34,7 @@ public function __construct(string $message, array $alternatives = [], int $code
}
/**
- * @return array A list of similar defined names
+ * @return string[] A list of similar defined names
*/
public function getAlternatives()
{
diff --git a/symfony/console/Formatter/OutputFormatterStyleStack.php b/symfony/console/Formatter/OutputFormatterStyleStack.php
index 33f7d5222..fc48dc0e1 100644
--- a/symfony/console/Formatter/OutputFormatterStyleStack.php
+++ b/symfony/console/Formatter/OutputFormatterStyleStack.php
@@ -28,7 +28,7 @@ class OutputFormatterStyleStack implements ResetInterface
public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
{
- $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle();
+ $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle();
$this->reset();
}
diff --git a/symfony/console/Helper/Helper.php b/symfony/console/Helper/Helper.php
index 0ddddf6bc..0521aaf7d 100644
--- a/symfony/console/Helper/Helper.php
+++ b/symfony/console/Helper/Helper.php
@@ -47,6 +47,8 @@ public function getHelperSet()
*/
public static function strlen($string)
{
+ $string = (string) $string;
+
if (false === $encoding = mb_detect_encoding($string, null, true)) {
return \strlen($string);
}
@@ -65,6 +67,8 @@ public static function strlen($string)
*/
public static function substr($string, $from, $length = null)
{
+ $string = (string) $string;
+
if (false === $encoding = mb_detect_encoding($string, null, true)) {
return substr($string, $from, $length);
}
diff --git a/symfony/console/Helper/ProgressBar.php b/symfony/console/Helper/ProgressBar.php
index 4690cffbd..5049c7dae 100644
--- a/symfony/console/Helper/ProgressBar.php
+++ b/symfony/console/Helper/ProgressBar.php
@@ -441,8 +441,15 @@ private function overwrite(string $message): void
if ($this->overwrite) {
if (null !== $this->previousMessage) {
if ($this->output instanceof ConsoleSectionOutput) {
- $lines = floor(Helper::strlen($message) / $this->terminal->getWidth()) + $this->formatLineCount + 1;
- $this->output->clear($lines);
+ $messageLines = explode("\n", $message);
+ $lineCount = \count($messageLines);
+ foreach ($messageLines as $messageLine) {
+ $messageLineLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $messageLine);
+ if ($messageLineLength > $this->terminal->getWidth()) {
+ $lineCount += floor($messageLineLength / $this->terminal->getWidth());
+ }
+ }
+ $this->output->clear($lineCount);
} else {
// Erase previous lines
if ($this->formatLineCount > 0) {
diff --git a/symfony/console/Helper/ProgressIndicator.php b/symfony/console/Helper/ProgressIndicator.php
index c189ba804..dc37148ed 100644
--- a/symfony/console/Helper/ProgressIndicator.php
+++ b/symfony/console/Helper/ProgressIndicator.php
@@ -197,7 +197,7 @@ private function display()
}
return $matches[0];
- }, $this->format));
+ }, $this->format ?? ''));
}
private function determineBestFormat(): string
diff --git a/symfony/console/Helper/QuestionHelper.php b/symfony/console/Helper/QuestionHelper.php
index e7ea00555..2f582d458 100644
--- a/symfony/console/Helper/QuestionHelper.php
+++ b/symfony/console/Helper/QuestionHelper.php
@@ -97,7 +97,7 @@ public static function disableStty()
/**
* Asks the question to the user.
*
- * @return bool|mixed|string|null
+ * @return mixed
*
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
@@ -108,11 +108,6 @@ private function doAsk(OutputInterface $output, Question $question)
$inputStream = $this->inputStream ?: \STDIN;
$autocomplete = $question->getAutocompleterCallback();
- if (\function_exists('sapi_windows_cp_set')) {
- // Codepage used by cmd.exe on Windows to allow special characters (éàüñ).
- @sapi_windows_cp_set(1252);
- }
-
if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {
$ret = false;
if ($question->isHidden()) {
@@ -127,7 +122,9 @@ private function doAsk(OutputInterface $output, Question $question)
}
if (false === $ret) {
+ $cp = $this->setIOCodepage();
$ret = fgets($inputStream, 4096);
+ $ret = $this->resetIOCodepage($cp, $ret);
if (false === $ret) {
throw new MissingInputException('Aborted.');
}
@@ -309,7 +306,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
$remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))));
$output->write($remainingCharacters);
$fullChoice .= $remainingCharacters;
- $i = self::strlen($fullChoice);
+ $i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding);
$matches = array_filter(
$autocomplete($ret),
@@ -412,7 +409,7 @@ private function getHiddenResponse(OutputInterface $output, $inputStream, bool $
$exe = $tmpExe;
}
- $sExec = shell_exec($exe);
+ $sExec = shell_exec('"'.$exe.'"');
$value = $trimmable ? rtrim($sExec) : $sExec;
$output->writeln('');
@@ -503,4 +500,41 @@ private function isInteractiveInput($inputStream): bool
return self::$stdinIsInteractive = 1 !== $status;
}
+
+ /**
+ * Sets console I/O to the host code page.
+ *
+ * @return int Previous code page in IBM/EBCDIC format
+ */
+ private function setIOCodepage(): int
+ {
+ if (\function_exists('sapi_windows_cp_set')) {
+ $cp = sapi_windows_cp_get();
+ sapi_windows_cp_set(sapi_windows_cp_get('oem'));
+
+ return $cp;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Sets console I/O to the specified code page and converts the user input.
+ *
+ * @param string|false $input
+ *
+ * @return string|false
+ */
+ private function resetIOCodepage(int $cp, $input)
+ {
+ if (0 !== $cp) {
+ sapi_windows_cp_set($cp);
+
+ if (false !== $input && '' !== $input) {
+ $input = sapi_windows_cp_conv(sapi_windows_cp_get('oem'), $cp, $input);
+ }
+ }
+
+ return $input;
+ }
}
diff --git a/symfony/console/Helper/Table.php b/symfony/console/Helper/Table.php
index e7a9b6ccb..329f24082 100644
--- a/symfony/console/Helper/Table.php
+++ b/symfony/console/Helper/Table.php
@@ -561,7 +561,7 @@ private function buildTableRows(array $rows): TableRows
if (isset($this->columnMaxWidths[$column]) && Helper::strlenWithoutDecoration($formatter, $cell) > $this->columnMaxWidths[$column]) {
$cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan);
}
- if (!strstr($cell, "\n")) {
+ if (!strstr($cell ?? '', "\n")) {
continue;
}
$escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell)));
diff --git a/symfony/console/Input/ArrayInput.php b/symfony/console/Input/ArrayInput.php
index 25d2b750b..bf9a8a455 100644
--- a/symfony/console/Input/ArrayInput.php
+++ b/symfony/console/Input/ArrayInput.php
@@ -108,12 +108,13 @@ public function __toString()
$params = [];
foreach ($this->parameters as $param => $val) {
if ($param && \is_string($param) && '-' === $param[0]) {
+ $glue = ('-' === $param[1]) ? '=' : ' ';
if (\is_array($val)) {
foreach ($val as $v) {
- $params[] = $param.('' != $v ? '='.$this->escapeToken($v) : '');
+ $params[] = $param.('' != $v ? $glue.$this->escapeToken($v) : '');
}
} else {
- $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : '');
+ $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : '');
}
} else {
$params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val);
diff --git a/symfony/console/Input/InputOption.php b/symfony/console/Input/InputOption.php
index 66f857a6c..5e48f88b8 100644
--- a/symfony/console/Input/InputOption.php
+++ b/symfony/console/Input/InputOption.php
@@ -21,9 +21,24 @@
*/
class InputOption
{
+ /**
+ * Do not accept input for the option (e.g. --yell). This is the default behavior of options.
+ */
public const VALUE_NONE = 1;
+
+ /**
+ * A value must be passed when the option is used (e.g. --iterations=5 or -i5).
+ */
public const VALUE_REQUIRED = 2;
+
+ /**
+ * The option may or may not have a value (e.g. --yell or --yell=loud).
+ */
public const VALUE_OPTIONAL = 4;
+
+ /**
+ * The option accepts multiple values (e.g. --dir=/foo --dir=/bar).
+ */
public const VALUE_IS_ARRAY = 8;
private $name;
@@ -33,11 +48,11 @@ class InputOption
private $description;
/**
- * @param string $name The option name
- * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the VALUE_* constants
- * @param string $description A description text
- * @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE)
+ * @param string $name The option name
+ * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param int|null $mode The option mode: One of the VALUE_* constants
+ * @param string $description A description text
+ * @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
@@ -149,7 +164,7 @@ public function isArray()
/**
* Sets the default value.
*
- * @param string|string[]|int|bool|null $default The default value
+ * @param string|string[]|bool|null $default The default value
*
* @throws LogicException When incorrect default value is given
*/
@@ -173,7 +188,7 @@ public function setDefault($default = null)
/**
* Returns the default value.
*
- * @return string|string[]|int|bool|null The default value
+ * @return string|string[]|bool|null The default value
*/
public function getDefault()
{
diff --git a/symfony/console/Input/StringInput.php b/symfony/console/Input/StringInput.php
index 2890b0f5f..2625514ef 100644
--- a/symfony/console/Input/StringInput.php
+++ b/symfony/console/Input/StringInput.php
@@ -48,12 +48,12 @@ private function tokenize(string $input): array
$length = \strlen($input);
$cursor = 0;
while ($cursor < $length) {
- if (preg_match('/\s+/A', $input, $match, null, $cursor)) {
- } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) {
+ if (preg_match('/\s+/A', $input, $match, 0, $cursor)) {
+ } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) {
$tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, \strlen($match[3]) - 2)));
- } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) {
+ } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
$tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2));
- } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) {
+ } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) {
$tokens[] = stripcslashes($match[1]);
} else {
// should never happen
diff --git a/symfony/console/Output/Output.php b/symfony/console/Output/Output.php
index 9dd765113..857248133 100644
--- a/symfony/console/Output/Output.php
+++ b/symfony/console/Output/Output.php
@@ -40,7 +40,7 @@ abstract class Output implements OutputInterface
public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
{
$this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity;
- $this->formatter = $formatter ?: new OutputFormatter();
+ $this->formatter = $formatter ?? new OutputFormatter();
$this->formatter->setDecorated($decorated);
}
diff --git a/symfony/console/README.md b/symfony/console/README.md
index 3e2fc605e..c89b4a1a2 100644
--- a/symfony/console/README.md
+++ b/symfony/console/README.md
@@ -7,11 +7,11 @@ interfaces.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/console.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/console.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
Credits
-------
diff --git a/symfony/console/Style/SymfonyStyle.php b/symfony/console/Style/SymfonyStyle.php
index 2056f04c9..ecdf9b1a3 100644
--- a/symfony/console/Style/SymfonyStyle.php
+++ b/symfony/console/Style/SymfonyStyle.php
@@ -471,7 +471,12 @@ private function createBlock(iterable $messages, string $type = null, string $st
$message = OutputFormatter::escape($message);
}
- $lines = array_merge($lines, explode(\PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, \PHP_EOL, true)));
+ $decorationLength = Helper::strlen($message) - Helper::strlenWithoutDecoration($this->getFormatter(), $message);
+ $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
+ $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true));
+ foreach ($messageLines as $messageLine) {
+ $lines[] = $messageLine;
+ }
if (\count($messages) > 1 && $key < \count($messages) - 1) {
$lines[] = '';
@@ -491,7 +496,7 @@ private function createBlock(iterable $messages, string $type = null, string $st
}
$line = $prefix.$line;
- $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
+ $line .= str_repeat(' ', max($this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line), 0));
if ($style) {
$line = sprintf('<%s>%s>', $style, $line);
diff --git a/symfony/event-dispatcher/CHANGELOG.md b/symfony/event-dispatcher/CHANGELOG.md
index 54fd04227..4a3ea066e 100644
--- a/symfony/event-dispatcher/CHANGELOG.md
+++ b/symfony/event-dispatcher/CHANGELOG.md
@@ -29,21 +29,21 @@ CHANGELOG
3.4.0
-----
- * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
+ * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
3.3.0
-----
- * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
+ * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
3.0.0
-----
- * The method `getListenerPriority($eventName, $listener)` has been added to the
- `EventDispatcherInterface`.
- * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
- and `Event::getName()` have been removed.
- The event dispatcher and the event name are passed to the listener call.
+ * The method `getListenerPriority($eventName, $listener)` has been added to the
+ `EventDispatcherInterface`.
+ * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
+ and `Event::getName()` have been removed.
+ The event dispatcher and the event name are passed to the listener call.
2.5.0
-----
diff --git a/symfony/event-dispatcher/README.md b/symfony/event-dispatcher/README.md
index e0d38eed0..dcdb68d21 100644
--- a/symfony/event-dispatcher/README.md
+++ b/symfony/event-dispatcher/README.md
@@ -8,8 +8,8 @@ them.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/symfony/process/Process.php b/symfony/process/Process.php
index 70e97d18a..57420e1dc 100644
--- a/symfony/process/Process.php
+++ b/symfony/process/Process.php
@@ -132,7 +132,7 @@ class Process implements \IteratorAggregate
* @param array $command The command to run and its arguments listed as separate entries
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
- * @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
+ * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
* @param int|float|null $timeout The timeout in seconds or null to disable
*
* @throws LogicException When proc_open is not installed
@@ -183,7 +183,7 @@ public function __construct($command, string $cwd = null, array $env = null, $in
* @param string $command The command line to pass to the shell of the OS
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
- * @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
+ * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
* @param int|float|null $timeout The timeout in seconds or null to disable
*
* @return static
diff --git a/symfony/process/README.md b/symfony/process/README.md
index b7ca5b425..afce5e45e 100644
--- a/symfony/process/README.md
+++ b/symfony/process/README.md
@@ -6,8 +6,8 @@ The Process component executes commands in sub-processes.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/process.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/process.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/symfony/routing/CHANGELOG.md b/symfony/routing/CHANGELOG.md
index 4eebca620..5df451356 100644
--- a/symfony/routing/CHANGELOG.md
+++ b/symfony/routing/CHANGELOG.md
@@ -44,15 +44,15 @@ CHANGELOG
3.3.0
-----
- * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0.
- * router.options.generator_class
- * router.options.generator_base_class
- * router.options.generator_dumper_class
- * router.options.matcher_class
- * router.options.matcher_base_class
- * router.options.matcher_dumper_class
- * router.options.matcher.cache_class
- * router.options.generator.cache_class
+ * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0.
+ * router.options.generator_class
+ * router.options.generator_base_class
+ * router.options.generator_dumper_class
+ * router.options.matcher_class
+ * router.options.matcher_base_class
+ * router.options.matcher_dumper_class
+ * router.options.matcher.cache_class
+ * router.options.generator.cache_class
3.2.0
-----
diff --git a/symfony/routing/Exception/MethodNotAllowedException.php b/symfony/routing/Exception/MethodNotAllowedException.php
index b897081bd..8a4371403 100644
--- a/symfony/routing/Exception/MethodNotAllowedException.php
+++ b/symfony/routing/Exception/MethodNotAllowedException.php
@@ -22,7 +22,10 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
{
protected $allowedMethods = [];
- public function __construct(array $allowedMethods, string $message = null, int $code = 0, \Throwable $previous = null)
+ /**
+ * @param string[] $allowedMethods
+ */
+ public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null)
{
$this->allowedMethods = array_map('strtoupper', $allowedMethods);
@@ -32,7 +35,7 @@ public function __construct(array $allowedMethods, string $message = null, int $
/**
* Gets the allowed HTTP methods.
*
- * @return array
+ * @return string[]
*/
public function getAllowedMethods()
{
diff --git a/symfony/routing/Generator/UrlGenerator.php b/symfony/routing/Generator/UrlGenerator.php
index 7adf2ed27..58d438488 100644
--- a/symfony/routing/Generator/UrlGenerator.php
+++ b/symfony/routing/Generator/UrlGenerator.php
@@ -188,7 +188,7 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
if (!$optional || $important || !\array_key_exists($varName, $defaults) || (null !== $mergedParams[$varName] && (string) $mergedParams[$varName] !== (string) $defaults[$varName])) {
// check requirement (while ignoring look-around patterns)
- if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) {
throw new InvalidParameterException(strtr($message, ['{parameter}' => $varName, '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$varName]]));
}
diff --git a/symfony/routing/Loader/AnnotationFileLoader.php b/symfony/routing/Loader/AnnotationFileLoader.php
index 8f9af3a8f..cd262f1ad 100644
--- a/symfony/routing/Loader/AnnotationFileLoader.php
+++ b/symfony/routing/Loader/AnnotationFileLoader.php
@@ -97,12 +97,10 @@ protected function findClass($file)
$nsTokens = [\T_NS_SEPARATOR => true, \T_STRING => true];
if (\defined('T_NAME_QUALIFIED')) {
- $nsTokens[T_NAME_QUALIFIED] = true;
+ $nsTokens[\T_NAME_QUALIFIED] = true;
}
-
for ($i = 0; isset($tokens[$i]); ++$i) {
$token = $tokens[$i];
-
if (!isset($token[1])) {
continue;
}
@@ -124,6 +122,9 @@ protected function findClass($file)
$skipClassToken = false;
for ($j = $i - 1; $j > 0; --$j) {
if (!isset($tokens[$j][1])) {
+ if ('(' === $tokens[$j] || ',' === $tokens[$j]) {
+ $skipClassToken = true;
+ }
break;
}
diff --git a/symfony/routing/Loader/XmlFileLoader.php b/symfony/routing/Loader/XmlFileLoader.php
index c78213387..2f087793b 100644
--- a/symfony/routing/Loader/XmlFileLoader.php
+++ b/symfony/routing/Loader/XmlFileLoader.php
@@ -370,7 +370,7 @@ private function parseDefaultsConfig(\DOMElement $element, string $path)
/**
* Recursively parses the value of a "default" element.
*
- * @return array|bool|float|int|string The parsed value
+ * @return array|bool|float|int|string|null The parsed value
*
* @throws \InvalidArgumentException when the XML is invalid
*/
diff --git a/symfony/routing/README.md b/symfony/routing/README.md
index 03b258ec8..ae8284f54 100644
--- a/symfony/routing/README.md
+++ b/symfony/routing/README.md
@@ -44,8 +44,8 @@ $url = $generator->generate('blog_show', [
Resources
---------
- * [Documentation](https://symfony.com/doc/current/routing.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/routing.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/symfony/routing/Route.php b/symfony/routing/Route.php
index fb7f98c0c..63d1f6fe3 100644
--- a/symfony/routing/Route.php
+++ b/symfony/routing/Route.php
@@ -137,15 +137,15 @@ public function getPath()
public function setPath($pattern)
{
if (false !== strpbrk($pattern, '?<')) {
- $pattern = preg_replace_callback('#\{(!?\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) {
- if (isset($m[3][0])) {
- $this->setDefault($m[1], '?' !== $m[3] ? substr($m[3], 1) : null);
+ $pattern = preg_replace_callback('#\{(!?)(\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) {
+ if (isset($m[4][0])) {
+ $this->setDefault($m[2], '?' !== $m[4] ? substr($m[4], 1) : null);
}
- if (isset($m[2][0])) {
- $this->setRequirement($m[1], substr($m[2], 1, -1));
+ if (isset($m[3][0])) {
+ $this->setRequirement($m[2], substr($m[3], 1, -1));
}
- return '{'.$m[1].'}';
+ return '{'.$m[1].$m[2].'}';
}, $pattern);
}
diff --git a/symfony/routing/RouteCollectionBuilder.php b/symfony/routing/RouteCollectionBuilder.php
index 92cf7e793..02740262b 100644
--- a/symfony/routing/RouteCollectionBuilder.php
+++ b/symfony/routing/RouteCollectionBuilder.php
@@ -362,11 +362,11 @@ private function load($resource, string $type = null): array
}
if (null === $resolver = $this->loader->getResolver()) {
- throw new LoaderLoadException($resource, null, null, null, $type);
+ throw new LoaderLoadException($resource, null, 0, null, $type);
}
if (false === $loader = $resolver->resolve($resource, $type)) {
- throw new LoaderLoadException($resource, null, null, null, $type);
+ throw new LoaderLoadException($resource, null, 0, null, $type);
}
$collections = $loader->load($resource, $type);
diff --git a/symfony/routing/Router.php b/symfony/routing/Router.php
index 8bc6f21af..30c6e5261 100644
--- a/symfony/routing/Router.php
+++ b/symfony/routing/Router.php
@@ -107,7 +107,7 @@ public function __construct(LoaderInterface $loader, $resource, array $options =
$this->loader = $loader;
$this->resource = $resource;
$this->logger = $logger;
- $this->context = $context ?: new RequestContext();
+ $this->context = $context ?? new RequestContext();
$this->setOptions($options);
$this->defaultLocale = $defaultLocale;
}
diff --git a/symfony/translation/Catalogue/MergeOperation.php b/symfony/translation/Catalogue/MergeOperation.php
index d2f4abd13..d55542c0c 100644
--- a/symfony/translation/Catalogue/MergeOperation.php
+++ b/symfony/translation/Catalogue/MergeOperation.php
@@ -38,9 +38,10 @@ protected function processDomain($domain)
foreach ($this->source->all($domain) as $id => $message) {
$this->messages[$domain]['all'][$id] = $message;
- $this->result->add([$id => $message], $this->source->defines($id, $intlDomain) ? $intlDomain : $domain);
- if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) {
- $this->result->setMetadata($id, $keyMetadata, $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);
}
}
@@ -48,9 +49,10 @@ protected function processDomain($domain)
if (!$this->source->has($id, $domain)) {
$this->messages[$domain]['all'][$id] = $message;
$this->messages[$domain]['new'][$id] = $message;
- $this->result->add([$id => $message], $this->target->defines($id, $intlDomain) ? $intlDomain : $domain);
- if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) {
- $this->result->setMetadata($id, $keyMetadata, $domain);
+ $d = $this->target->defines($id, $intlDomain) ? $intlDomain : $domain;
+ $this->result->add([$id => $message], $d);
+ if (null !== $keyMetadata = $this->target->getMetadata($id, $d)) {
+ $this->result->setMetadata($id, $keyMetadata, $d);
}
}
}
diff --git a/symfony/translation/Catalogue/TargetOperation.php b/symfony/translation/Catalogue/TargetOperation.php
index 22aa9a391..8221d184d 100644
--- a/symfony/translation/Catalogue/TargetOperation.php
+++ b/symfony/translation/Catalogue/TargetOperation.php
@@ -49,9 +49,10 @@ protected function processDomain($domain)
foreach ($this->source->all($domain) as $id => $message) {
if ($this->target->has($id, $domain)) {
$this->messages[$domain]['all'][$id] = $message;
- $this->result->add([$id => $message], $this->target->defines($id, $intlDomain) ? $intlDomain : $domain);
- if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) {
- $this->result->setMetadata($id, $keyMetadata, $domain);
+ $d = $this->target->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);
}
} else {
$this->messages[$domain]['obsolete'][$id] = $message;
@@ -62,9 +63,10 @@ protected function processDomain($domain)
if (!$this->source->has($id, $domain)) {
$this->messages[$domain]['all'][$id] = $message;
$this->messages[$domain]['new'][$id] = $message;
- $this->result->add([$id => $message], $this->target->defines($id, $intlDomain) ? $intlDomain : $domain);
- if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) {
- $this->result->setMetadata($id, $keyMetadata, $domain);
+ $d = $this->target->defines($id, $intlDomain) ? $intlDomain : $domain;
+ $this->result->add([$id => $message], $d);
+ if (null !== $keyMetadata = $this->target->getMetadata($id, $d)) {
+ $this->result->setMetadata($id, $keyMetadata, $d);
}
}
}
diff --git a/symfony/translation/Command/XliffLintCommand.php b/symfony/translation/Command/XliffLintCommand.php
index e96effbcd..80d45bf53 100644
--- a/symfony/translation/Command/XliffLintCommand.php
+++ b/symfony/translation/Command/XliffLintCommand.php
@@ -53,11 +53,11 @@ public function __construct(string $name = null, callable $directoryIteratorProv
protected function configure()
{
$this
- ->setDescription('Lints a XLIFF file and outputs encountered errors')
+ ->setDescription('Lint an XLIFF file and outputs encountered errors')
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
->setHelp(<<%command.name% command lints a XLIFF file and outputs to STDOUT
+The %command.name% command lints an XLIFF file and outputs to STDOUT
the first encountered syntax error.
You can validates XLIFF contents passed from STDIN:
@@ -129,12 +129,12 @@ private function validate(string $content, string $file = null): array
$document->loadXML($content);
if (null !== $targetLanguage = $this->getTargetLanguageFromFile($document)) {
- $normalizedLocale = preg_quote(str_replace('-', '_', $targetLanguage), '/');
+ $normalizedLocalePattern = sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/'));
// strict file names require translation files to be named '____.locale.xlf'
// otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed
// also, the regexp matching must be case-insensitive, as defined for 'target-language' values
// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language
- $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocale) : sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocale, $normalizedLocale);
+ $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern);
if (0 === preg_match($expectedFilenamePattern, basename($file))) {
$errors[] = [
diff --git a/symfony/translation/Dumper/XliffFileDumper.php b/symfony/translation/Dumper/XliffFileDumper.php
index 72d9c6e9f..63f30a5b6 100644
--- a/symfony/translation/Dumper/XliffFileDumper.php
+++ b/symfony/translation/Dumper/XliffFileDumper.php
@@ -150,11 +150,11 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ?
foreach ($messages->all($domain) as $source => $target) {
$translation = $dom->createElement('unit');
$translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._'));
- $name = $source;
- if (\strlen($source) > 80) {
- $name = substr(md5($source), -7);
+
+ if (\strlen($source) <= 80) {
+ $translation->setAttribute('name', $source);
}
- $translation->setAttribute('name', $name);
+
$metadata = $messages->getMetadata($source, $domain);
// Add notes section
diff --git a/symfony/translation/Extractor/PhpExtractor.php b/symfony/translation/Extractor/PhpExtractor.php
index 88811418c..32389c677 100644
--- a/symfony/translation/Extractor/PhpExtractor.php
+++ b/symfony/translation/Extractor/PhpExtractor.php
@@ -178,6 +178,19 @@ private function getValue(\Iterator $tokenIterator)
}
break;
case \T_END_HEREDOC:
+ if ($indentation = strspn($t[1], ' ')) {
+ $docPartWithLineBreaks = $docPart;
+ $docPart = '';
+
+ foreach (preg_split('~(\r\n|\n|\r)~', $docPartWithLineBreaks, -1, \PREG_SPLIT_DELIM_CAPTURE) as $str) {
+ if (\in_array($str, ["\r\n", "\n", "\r"], true)) {
+ $docPart .= $str;
+ } else {
+ $docPart .= substr($str, $indentation);
+ }
+ }
+ }
+
$message .= PhpStringTokenParser::parseDocString($docToken, $docPart);
$docToken = '';
$docPart = '';
diff --git a/symfony/translation/Loader/MoFileLoader.php b/symfony/translation/Loader/MoFileLoader.php
index 1f2e62ced..accd023ab 100644
--- a/symfony/translation/Loader/MoFileLoader.php
+++ b/symfony/translation/Loader/MoFileLoader.php
@@ -19,19 +19,19 @@
class MoFileLoader extends FileLoader
{
/**
- * Magic used for validating the format of a MO file as well as
+ * 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;
/**
- * Magic used for validating the format of a MO file as well as
+ * 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;
/**
- * The size of the header of a MO file in bytes.
+ * The size of the header of an MO file in bytes.
*/
public const MO_HEADER_SIZE = 28;
diff --git a/symfony/translation/Loader/XliffFileLoader.php b/symfony/translation/Loader/XliffFileLoader.php
index 11a721f45..a949e59ce 100644
--- a/symfony/translation/Loader/XliffFileLoader.php
+++ b/symfony/translation/Loader/XliffFileLoader.php
@@ -129,7 +129,7 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s
private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain)
{
$xml = simplexml_import_dom($dom);
- $encoding = strtoupper($dom->encoding);
+ $encoding = $dom->encoding ? strtoupper($dom->encoding) : null;
$xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0');
diff --git a/symfony/translation/MessageCatalogue.php b/symfony/translation/MessageCatalogue.php
index f2fc9a926..cc8d3ceef 100644
--- a/symfony/translation/MessageCatalogue.php
+++ b/symfony/translation/MessageCatalogue.php
@@ -167,7 +167,7 @@ public function add($messages, $domain = 'messages')
}
$intlDomain = $domain;
$suffixLength = \strlen(self::INTL_DOMAIN_SUFFIX);
- if (\strlen($domain) > $suffixLength && false !== strpos($domain, self::INTL_DOMAIN_SUFFIX, -$suffixLength)) {
+ if (\strlen($domain) < $suffixLength || false === strpos($domain, self::INTL_DOMAIN_SUFFIX, -$suffixLength)) {
$intlDomain .= self::INTL_DOMAIN_SUFFIX;
}
foreach ($messages as $id => $message) {
diff --git a/symfony/translation/README.md b/symfony/translation/README.md
index dc090df5b..720bee3b8 100644
--- a/symfony/translation/README.md
+++ b/symfony/translation/README.md
@@ -26,8 +26,8 @@ echo $translator->trans('Hello World!'); // outputs « Bonjour ! »
Resources
---------
- * [Documentation](https://symfony.com/doc/current/translation.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/translation.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/symfony/translation/Translator.php b/symfony/translation/Translator.php
index f3d8d620e..0f03b5afc 100644
--- a/symfony/translation/Translator.php
+++ b/symfony/translation/Translator.php
@@ -507,7 +507,7 @@ protected function computeFallbackLocales($locale)
*/
protected function assertValidLocale($locale)
{
- if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
+ if (null !== $locale && 1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
}
}
diff --git a/symfony/translation/composer.json b/symfony/translation/composer.json
index e58a7beec..fbc084666 100644
--- a/symfony/translation/composer.json
+++ b/symfony/translation/composer.json
@@ -38,7 +38,7 @@
"symfony/yaml": "<3.4"
},
"provide": {
- "symfony/translation-implementation": "1.0"
+ "symfony/translation-implementation": "1.0|2.0"
},
"suggest": {
"symfony/config": "",