diff --git a/composer.json b/composer.json
index 4ce109c45..32e85c07a 100644
--- a/composer.json
+++ b/composer.json
@@ -44,14 +44,14 @@
"scssphp/scssphp": "^1.4.0",
"stecman/symfony-console-completion": "^0.11.0",
"swiftmailer/swiftmailer": "^6.0",
- "symfony/console": "4.4.25",
- "symfony/event-dispatcher": "4.4.25",
+ "symfony/console": "4.4.30",
+ "symfony/event-dispatcher": "4.4.30",
"symfony/event-dispatcher-contracts": "1.1.9",
"symfony/polyfill-intl-grapheme": "^1.20",
"symfony/polyfill-intl-normalizer": "^1.20",
- "symfony/process": "4.4.25",
- "symfony/routing": "4.4.25",
- "symfony/translation": "4.4.25",
+ "symfony/process": "4.4.30",
+ "symfony/routing": "4.4.30",
+ "symfony/translation": "4.4.30",
"web-auth/webauthn-lib": "^3.1"
},
"extra": {
diff --git a/composer.lock b/composer.lock
index 15229b288..43942b5ae 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": "1672c7021b1a6161c3ac38ce1c585c75",
+ "content-hash": "4d00ce69041cf4588a8790825888e5db",
"packages": [
{
"name": "aws/aws-sdk-php",
@@ -4178,36 +4178,37 @@
},
{
"name": "symfony/console",
- "version": "v4.4.25",
+ "version": "v4.4.30",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095"
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22",
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
+ "psr/log": ">=3",
"symfony/dependency-injection": "<3.4",
"symfony/event-dispatcher": "<4.3|>=5",
"symfony/lock": "<4.4",
"symfony/process": "<3.3"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/event-dispatcher": "^4.3",
@@ -4247,7 +4248,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.25"
+ "source": "https://github.com/symfony/console/tree/v4.4.30"
},
"funding": [
{
@@ -4263,25 +4264,26 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-08-25T19:27:26+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.25",
+ "version": "v4.4.30",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f"
+ "reference": "2fe81680070043c4c80e7cedceb797e34f377bac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2fe81680070043c4c80e7cedceb797e34f377bac",
+ "reference": "2fe81680070043c4c80e7cedceb797e34f377bac",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
- "symfony/event-dispatcher-contracts": "^1.1"
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<3.4"
@@ -4291,7 +4293,7 @@
"symfony/event-dispatcher-implementation": "1.1"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/error-handler": "~3.4|~4.4",
@@ -4330,7 +4332,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.25"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.30"
},
"funding": [
{
@@ -4346,7 +4348,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-08-04T20:31:23+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -4588,16 +4590,16 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
},
"require": {
@@ -4649,7 +4651,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
},
"funding": [
{
@@ -4665,7 +4667,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T09:17:38+00:00"
+ "time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
@@ -5075,16 +5077,16 @@
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
@@ -5138,7 +5140,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
@@ -5154,24 +5156,25 @@
"type": "tidelift"
}
],
- "time": "2021-02-19T12:13:01+00:00"
+ "time": "2021-07-28T13:41:28+00:00"
},
{
"name": "symfony/process",
- "version": "v4.4.25",
+ "version": "v4.4.30",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9"
+ "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9",
+ "url": "https://api.github.com/repos/symfony/process/zipball/13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
+ "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -5199,7 +5202,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v4.4.25"
+ "source": "https://github.com/symfony/process/tree/v4.4.30"
},
"funding": [
{
@@ -5215,24 +5218,25 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-08-04T20:31:23+00:00"
},
{
"name": "symfony/routing",
- "version": "v4.4.25",
+ "version": "v4.4.30",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434"
+ "reference": "9ddf033927ad9f30ba2bfd167a7b342cafa13e8e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/3a3c2f197ad0846ac6413225fc78868ba1c61434",
- "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/9ddf033927ad9f30ba2bfd167a7b342cafa13e8e",
+ "reference": "9ddf033927ad9f30ba2bfd167a7b342cafa13e8e",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/config": "<4.2",
@@ -5241,7 +5245,7 @@
},
"require-dev": {
"doctrine/annotations": "^1.10.4",
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^4.2|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/expression-language": "^3.4|^4.0|^5.0",
@@ -5287,7 +5291,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v4.4.25"
+ "source": "https://github.com/symfony/routing/tree/v4.4.30"
},
"funding": [
{
@@ -5303,7 +5307,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-08-04T21:41:01+00:00"
},
{
"name": "symfony/service-contracts",
@@ -5386,21 +5390,22 @@
},
{
"name": "symfony/translation",
- "version": "v4.4.25",
+ "version": "v4.4.30",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4"
+ "reference": "db0ba1e85280d8ff11e38d53c70f8814d4d740f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
- "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/db0ba1e85280d8ff11e38d53c70f8814d4d740f5",
+ "reference": "db0ba1e85280d8ff11e38d53c70f8814d4d740f5",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "^1.16",
"symfony/translation-contracts": "^1.1.6|^2"
},
"conflict": {
@@ -5413,7 +5418,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",
@@ -5454,7 +5459,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.30"
},
"funding": [
{
@@ -5470,7 +5475,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-08-26T05:57:13+00:00"
},
{
"name": "symfony/translation-contracts",
diff --git a/composer/autoload_files.php b/composer/autoload_files.php
index 4e2cfcf53..d6626ae3b 100644
--- a/composer/autoload_files.php
+++ b/composer/autoload_files.php
@@ -6,9 +6,9 @@
$baseDir = $vendorDir;
return array(
+ 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'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',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index d2f298a8b..112037aff 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -7,9 +7,9 @@
class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
{
public static $files = array (
+ 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'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',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
diff --git a/composer/installed.json b/composer/installed.json
index 782196154..2c9049ef1 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -4369,37 +4369,38 @@
},
{
"name": "symfony/console",
- "version": "v4.4.25",
- "version_normalized": "4.4.25.0",
+ "version": "v4.4.30",
+ "version_normalized": "4.4.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095"
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22",
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
+ "psr/log": ">=3",
"symfony/dependency-injection": "<3.4",
"symfony/event-dispatcher": "<4.3|>=5",
"symfony/lock": "<4.4",
"symfony/process": "<3.3"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/event-dispatcher": "^4.3",
@@ -4413,7 +4414,7 @@
"symfony/lock": "",
"symfony/process": ""
},
- "time": "2021-05-26T11:20:16+00:00",
+ "time": "2021-08-25T19:27:26+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4441,7 +4442,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.25"
+ "source": "https://github.com/symfony/console/tree/v4.4.30"
},
"funding": [
{
@@ -4461,22 +4462,23 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.25",
- "version_normalized": "4.4.25.0",
+ "version": "v4.4.30",
+ "version_normalized": "4.4.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f"
+ "reference": "2fe81680070043c4c80e7cedceb797e34f377bac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2fe81680070043c4c80e7cedceb797e34f377bac",
+ "reference": "2fe81680070043c4c80e7cedceb797e34f377bac",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
- "symfony/event-dispatcher-contracts": "^1.1"
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<3.4"
@@ -4486,7 +4488,7 @@
"symfony/event-dispatcher-implementation": "1.1"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/error-handler": "~3.4|~4.4",
@@ -4499,7 +4501,7 @@
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
- "time": "2021-05-26T17:39:37+00:00",
+ "time": "2021-08-04T20:31:23+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4527,7 +4529,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.25"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.30"
},
"funding": [
{
@@ -4794,17 +4796,17 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.23.0",
- "version_normalized": "1.23.0.0",
+ "version": "v1.23.1",
+ "version_normalized": "1.23.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
},
"require": {
@@ -4813,7 +4815,7 @@
"suggest": {
"ext-intl": "For best performance"
},
- "time": "2021-05-27T09:17:38+00:00",
+ "time": "2021-05-27T12:26:48+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -4858,7 +4860,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
},
"funding": [
{
@@ -5299,23 +5301,23 @@
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.23.0",
- "version_normalized": "1.23.0.0",
+ "version": "v1.23.1",
+ "version_normalized": "1.23.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
- "time": "2021-02-19T12:13:01+00:00",
+ "time": "2021-07-28T13:41:28+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -5365,7 +5367,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
@@ -5385,23 +5387,24 @@
},
{
"name": "symfony/process",
- "version": "v4.4.25",
- "version_normalized": "4.4.25.0",
+ "version": "v4.4.30",
+ "version_normalized": "4.4.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9"
+ "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9",
+ "url": "https://api.github.com/repos/symfony/process/zipball/13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
+ "reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
- "time": "2021-05-26T11:20:16+00:00",
+ "time": "2021-08-04T20:31:23+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5429,7 +5432,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v4.4.25"
+ "source": "https://github.com/symfony/process/tree/v4.4.30"
},
"funding": [
{
@@ -5449,21 +5452,22 @@
},
{
"name": "symfony/routing",
- "version": "v4.4.25",
- "version_normalized": "4.4.25.0",
+ "version": "v4.4.30",
+ "version_normalized": "4.4.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434"
+ "reference": "9ddf033927ad9f30ba2bfd167a7b342cafa13e8e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/3a3c2f197ad0846ac6413225fc78868ba1c61434",
- "reference": "3a3c2f197ad0846ac6413225fc78868ba1c61434",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/9ddf033927ad9f30ba2bfd167a7b342cafa13e8e",
+ "reference": "9ddf033927ad9f30ba2bfd167a7b342cafa13e8e",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/config": "<4.2",
@@ -5472,7 +5476,7 @@
},
"require-dev": {
"doctrine/annotations": "^1.10.4",
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^4.2|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/expression-language": "^3.4|^4.0|^5.0",
@@ -5486,7 +5490,7 @@
"symfony/http-foundation": "For using a Symfony Request object",
"symfony/yaml": "For using the YAML loader"
},
- "time": "2021-05-26T17:39:37+00:00",
+ "time": "2021-08-04T21:41:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5520,7 +5524,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v4.4.25"
+ "source": "https://github.com/symfony/routing/tree/v4.4.30"
},
"funding": [
{
@@ -5622,22 +5626,23 @@
},
{
"name": "symfony/translation",
- "version": "v4.4.25",
- "version_normalized": "4.4.25.0",
+ "version": "v4.4.30",
+ "version_normalized": "4.4.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4"
+ "reference": "db0ba1e85280d8ff11e38d53c70f8814d4d740f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
- "reference": "dfe132c5c6d89f90ce7f961742cc532e9ca16dd4",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/db0ba1e85280d8ff11e38d53c70f8814d4d740f5",
+ "reference": "db0ba1e85280d8ff11e38d53c70f8814d4d740f5",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "^1.16",
"symfony/translation-contracts": "^1.1.6|^2"
},
"conflict": {
@@ -5650,7 +5655,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",
@@ -5665,7 +5670,7 @@
"symfony/config": "",
"symfony/yaml": ""
},
- "time": "2021-05-26T17:39:37+00:00",
+ "time": "2021-08-26T05:57:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5693,7 +5698,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.30"
},
"funding": [
{
@@ -6158,6 +6163,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 43b910953..ade31e6da 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -5,9 +5,9 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
- 'reference' => '019d4384a1dcf022e430821bfe8b100dbc4884f3',
+ 'reference' => 'f43adb17395165d337ee76ca5c1b9cc2e85f666c',
'name' => 'nextcloud/3rdparty',
- 'dev' => true,
+ 'dev' => false,
),
'versions' => array(
'aws/aws-sdk-php' => array(
@@ -277,7 +277,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
- 'reference' => '019d4384a1dcf022e430821bfe8b100dbc4884f3',
+ 'reference' => 'f43adb17395165d337ee76ca5c1b9cc2e85f666c',
'dev_requirement' => false,
),
'nextcloud/lognormalizer' => array(
@@ -499,7 +499,7 @@
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
- 0 => '1.0',
+ 0 => '1.0|2.0',
),
),
'punic/calendar' => array(
@@ -662,21 +662,21 @@
'dev_requirement' => false,
),
'symfony/console' => array(
- 'pretty_version' => 'v4.4.25',
- 'version' => '4.4.25.0',
+ 'pretty_version' => 'v4.4.30',
+ 'version' => '4.4.30.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/console',
'aliases' => array(),
- 'reference' => 'a62acecdf5b50e314a4f305cd01b5282126f3095',
+ 'reference' => 'a3f7189a0665ee33b50e9e228c46f50f5acbed22',
'dev_requirement' => false,
),
'symfony/event-dispatcher' => array(
- 'pretty_version' => 'v4.4.25',
- 'version' => '4.4.25.0',
+ 'pretty_version' => 'v4.4.30',
+ 'version' => '4.4.30.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(),
- 'reference' => '047773e7016e4fd45102cedf4bd2558ae0d0c32f',
+ 'reference' => '2fe81680070043c4c80e7cedceb797e34f377bac',
'dev_requirement' => false,
),
'symfony/event-dispatcher-contracts' => array(
@@ -713,12 +713,12 @@
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' => array(
- 'pretty_version' => 'v1.23.0',
- 'version' => '1.23.0.0',
+ 'pretty_version' => 'v1.23.1',
+ 'version' => '1.23.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(),
- 'reference' => '24b72c6baa32c746a4d0840147c9715e42bb68ab',
+ 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' => array(
@@ -767,30 +767,30 @@
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
- 'pretty_version' => 'v1.23.0',
- 'version' => '1.23.0.0',
+ 'pretty_version' => 'v1.23.1',
+ 'version' => '1.23.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(),
- 'reference' => 'eca0bf41ed421bed1b57c4958bab16aa86b757d0',
+ 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
'dev_requirement' => false,
),
'symfony/process' => array(
- 'pretty_version' => 'v4.4.25',
- 'version' => '4.4.25.0',
+ 'pretty_version' => 'v4.4.30',
+ 'version' => '4.4.30.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/process',
'aliases' => array(),
- 'reference' => 'cd61e6dd273975c6625316de9d141ebd197f93c9',
+ 'reference' => '13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d',
'dev_requirement' => false,
),
'symfony/routing' => array(
- 'pretty_version' => 'v4.4.25',
- 'version' => '4.4.25.0',
+ 'pretty_version' => 'v4.4.30',
+ 'version' => '4.4.30.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/routing',
'aliases' => array(),
- 'reference' => '3a3c2f197ad0846ac6413225fc78868ba1c61434',
+ 'reference' => '9ddf033927ad9f30ba2bfd167a7b342cafa13e8e',
'dev_requirement' => false,
),
'symfony/service-contracts' => array(
@@ -803,12 +803,12 @@
'dev_requirement' => false,
),
'symfony/translation' => array(
- 'pretty_version' => 'v4.4.25',
- 'version' => '4.4.25.0',
+ 'pretty_version' => 'v4.4.30',
+ 'version' => '4.4.30.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation',
'aliases' => array(),
- 'reference' => 'dfe132c5c6d89f90ce7f961742cc532e9ca16dd4',
+ 'reference' => 'db0ba1e85280d8ff11e38d53c70f8814d4d740f5',
'dev_requirement' => false,
),
'symfony/translation-contracts' => array(
diff --git a/composer/package-versions-deprecated/src/PackageVersions/Versions.php b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
index edc8be1d9..6ddb041ef 100644
--- a/composer/package-versions-deprecated/src/PackageVersions/Versions.php
+++ b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
@@ -97,28 +97,28 @@ final class Versions
'spomky-labs/cbor-php' => 'v2.0.1@9776578000be884cd7864eeb7c37a4ac92d8c995',
'stecman/symfony-console-completion' => '0.11.0@a9502dab59405e275a9f264536c4e1cb61fc3518',
'swiftmailer/swiftmailer' => 'v6.2.7@15f7faf8508e04471f666633addacf54c0ab5933',
- 'symfony/console' => 'v4.4.25@a62acecdf5b50e314a4f305cd01b5282126f3095',
- 'symfony/event-dispatcher' => 'v4.4.25@047773e7016e4fd45102cedf4bd2558ae0d0c32f',
+ 'symfony/console' => 'v4.4.30@a3f7189a0665ee33b50e9e228c46f50f5acbed22',
+ 'symfony/event-dispatcher' => 'v4.4.30@2fe81680070043c4c80e7cedceb797e34f377bac',
'symfony/event-dispatcher-contracts' => 'v1.1.9@84e23fdcd2517bf37aecbd16967e83f0caee25a7',
'symfony/polyfill-ctype' => 'v1.23.0@46cd95797e9df938fdd2b03693b5fca5e64b01ce',
'symfony/polyfill-iconv' => 'v1.23.0@63b5bb7db83e5673936d6e3b8b3e022ff6474933',
- 'symfony/polyfill-intl-grapheme' => 'v1.23.0@24b72c6baa32c746a4d0840147c9715e42bb68ab',
+ 'symfony/polyfill-intl-grapheme' => 'v1.23.1@16880ba9c5ebe3642d1995ab866db29270b36535',
'symfony/polyfill-intl-idn' => 'v1.23.0@65bd267525e82759e7d8c4e8ceea44f398838e65',
'symfony/polyfill-intl-normalizer' => 'v1.23.0@8590a5f561694770bdcd3f9b5c69dde6945028e8',
'symfony/polyfill-mbstring' => 'v1.23.1@9174a3d80210dca8daa7f31fec659150bbeabfc6',
'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.25@cd61e6dd273975c6625316de9d141ebd197f93c9',
- 'symfony/routing' => 'v4.4.25@3a3c2f197ad0846ac6413225fc78868ba1c61434',
+ 'symfony/polyfill-php80' => 'v1.23.1@1100343ed1a92e3a38f9ae122fc0eb21602547be',
+ 'symfony/process' => 'v4.4.30@13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d',
+ 'symfony/routing' => 'v4.4.30@9ddf033927ad9f30ba2bfd167a7b342cafa13e8e',
'symfony/service-contracts' => 'v2.4.0@f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb',
- 'symfony/translation' => 'v4.4.25@dfe132c5c6d89f90ce7f961742cc532e9ca16dd4',
+ 'symfony/translation' => 'v4.4.30@db0ba1e85280d8ff11e38d53c70f8814d4d740f5',
'symfony/translation-contracts' => 'v2.4.0@95c812666f3e91db75385749fe219c5e494c7f95',
'thecodingmachine/safe' => 'v1.3.3@a8ab0876305a4cdaef31b2350fcb9811b5608dbc',
'web-auth/cose-lib' => 'v3.3.9@ed172d2dc1a6b87b5c644c07c118cd30c1b3819b',
'web-auth/metadata-service' => 'v3.3.9@8488d3a832a38cc81c670fce05de1e515c6e64b1',
'web-auth/webauthn-lib' => 'v3.3.9@04b98ee3d39cb79dad68a7c15c297c085bf66bfe',
- 'nextcloud/3rdparty' => 'dev-master@019d4384a1dcf022e430821bfe8b100dbc4884f3',
+ 'nextcloud/3rdparty' => 'dev-master@f43adb17395165d337ee76ca5c1b9cc2e85f666c',
);
private function __construct()
diff --git a/symfony/console/Application.php b/symfony/console/Application.php
index e71a16d10..15d537dac 100644
--- a/symfony/console/Application.php
+++ b/symfony/console/Application.php
@@ -833,7 +833,7 @@ public function renderThrowable(\Throwable $e, OutputInterface $output): void
private function finishRenderThrowableOrException(OutputInterface $output): void
{
if (null !== $this->runningCommand) {
- $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET);
+ $output->writeln(sprintf('%s', OutputFormatter::escape(sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET);
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
}
}
@@ -877,7 +877,7 @@ private function doActuallyRenderThrowable(\Throwable $e, OutputInterface $outpu
$len = 0;
}
- if (false !== strpos($message, "@anonymous\0")) {
+ if (str_contains($message, "@anonymous\0")) {
$message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
}, $message);
@@ -1155,7 +1155,7 @@ private function findAlternatives(string $name, iterable $collection): array
}
$lev = levenshtein($subname, $parts[$i]);
- if ($lev <= \strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) {
+ if ($lev <= \strlen($subname) / 3 || '' !== $subname && str_contains($parts[$i], $subname)) {
$alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
} elseif ($exists) {
$alternatives[$collectionName] += $threshold;
@@ -1165,7 +1165,7 @@ private function findAlternatives(string $name, iterable $collection): array
foreach ($collection as $item) {
$lev = levenshtein($name, $item);
- if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
+ if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) {
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
}
}
diff --git a/symfony/console/Command/Command.php b/symfony/console/Command/Command.php
index d4ab2eb8d..da9b9f6af 100644
--- a/symfony/console/Command/Command.php
+++ b/symfony/console/Command/Command.php
@@ -375,10 +375,10 @@ public function getNativeDefinition()
/**
* Adds an argument.
*
- * @param string $name The argument name
- * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
- * @param string $description A description text
- * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only)
+ * @param string $name The argument name
+ * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
+ * @param string $description A description text
+ * @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
*
* @throws InvalidArgumentException When argument mode is not valid
*
@@ -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[]|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 mixed $default The default value (must be null for InputOption::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*
@@ -464,7 +464,7 @@ public function getName()
/**
* @param bool $hidden Whether or not the command should be hidden from the list of commands
*
- * @return Command The current instance
+ * @return $this
*/
public function setHidden($hidden)
{
@@ -613,7 +613,7 @@ public function getSynopsis($short = false)
*/
public function addUsage($usage)
{
- if (0 !== strpos($usage, $this->name)) {
+ if (!str_starts_with($usage, $this->name)) {
$usage = sprintf('%s %s', $this->name, $usage);
}
diff --git a/symfony/console/Event/ConsoleErrorEvent.php b/symfony/console/Event/ConsoleErrorEvent.php
index 25d9b8812..57d9b38ba 100644
--- a/symfony/console/Event/ConsoleErrorEvent.php
+++ b/symfony/console/Event/ConsoleErrorEvent.php
@@ -53,6 +53,6 @@ public function setExitCode(int $exitCode): void
public function getExitCode(): int
{
- return null !== $this->exitCode ? $this->exitCode : (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
+ return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
}
}
diff --git a/symfony/console/Event/ConsoleEvent.php b/symfony/console/Event/ConsoleEvent.php
index 5440da216..400eb5731 100644
--- a/symfony/console/Event/ConsoleEvent.php
+++ b/symfony/console/Event/ConsoleEvent.php
@@ -28,7 +28,7 @@ class ConsoleEvent extends Event
private $input;
private $output;
- public function __construct(Command $command = null, InputInterface $input, OutputInterface $output)
+ public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
{
$this->command = $command;
$this->input = $input;
diff --git a/symfony/console/Formatter/OutputFormatter.php b/symfony/console/Formatter/OutputFormatter.php
index fa4189d04..0f969c7ad 100644
--- a/symfony/console/Formatter/OutputFormatter.php
+++ b/symfony/console/Formatter/OutputFormatter.php
@@ -54,7 +54,7 @@ public static function escape($text)
*/
public static function escapeTrailingBackslash(string $text): string
{
- if ('\\' === substr($text, -1)) {
+ if (str_ends_with($text, '\\')) {
$len = \strlen($text);
$text = rtrim($text, '\\');
$text = str_replace("\0", '', $text);
@@ -180,7 +180,7 @@ public function formatAndWrap(string $message, int $width)
$output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength);
- if (false !== strpos($output, "\0")) {
+ if (str_contains($output, "\0")) {
return strtr($output, ["\0" => '\\', '\\<' => '<']);
}
diff --git a/symfony/console/Helper/HelperSet.php b/symfony/console/Helper/HelperSet.php
index d9d73f25f..9aa1e67ba 100644
--- a/symfony/console/Helper/HelperSet.php
+++ b/symfony/console/Helper/HelperSet.php
@@ -98,8 +98,9 @@ public function getCommand()
}
/**
- * @return Helper[]
+ * @return \Traversable
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->helpers);
diff --git a/symfony/console/Helper/ProgressBar.php b/symfony/console/Helper/ProgressBar.php
index 5049c7dae..1de9b7b3c 100644
--- a/symfony/console/Helper/ProgressBar.php
+++ b/symfony/console/Helper/ProgressBar.php
@@ -193,7 +193,7 @@ public function getProgressPercent(): float
public function getBarOffset(): int
{
- return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? min(5, $this->barWidth / 15) * $this->writeCount : $this->step) % $this->barWidth);
+ return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
}
public function setBarWidth(int $size)
@@ -249,7 +249,7 @@ public function setFormat(string $format)
/**
* Sets the redraw frequency.
*
- * @param int|float $freq The frequency in steps
+ * @param int|null $freq The frequency in steps
*/
public function setRedrawFrequency(?int $freq)
{
diff --git a/symfony/console/Helper/QuestionHelper.php b/symfony/console/Helper/QuestionHelper.php
index 2f582d458..089de76bd 100644
--- a/symfony/console/Helper/QuestionHelper.php
+++ b/symfony/console/Helper/QuestionHelper.php
@@ -311,7 +311,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
$matches = array_filter(
$autocomplete($ret),
function ($match) use ($ret) {
- return '' === $ret || 0 === strpos($match, $ret);
+ return '' === $ret || str_starts_with($match, $ret);
}
);
$numMatches = \count($matches);
@@ -348,7 +348,7 @@ function ($match) use ($ret) {
foreach ($autocomplete($ret) as $value) {
// If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
- if (0 === strpos($value, $tempRet)) {
+ if (str_starts_with($value, $tempRet)) {
$matches[$numMatches++] = $value;
}
}
@@ -377,12 +377,12 @@ function ($match) use ($ret) {
private function mostRecentlyEnteredValue(string $entered): string
{
// Determine the most recent value that the user entered
- if (false === strpos($entered, ',')) {
+ if (!str_contains($entered, ',')) {
return $entered;
}
$choices = explode(',', $entered);
- if (\strlen($lastChoice = trim($choices[\count($choices) - 1])) > 0) {
+ if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) {
return $lastChoice;
}
diff --git a/symfony/console/Helper/Table.php b/symfony/console/Helper/Table.php
index 329f24082..1d0a22baa 100644
--- a/symfony/console/Helper/Table.php
+++ b/symfony/console/Helper/Table.php
@@ -374,6 +374,7 @@ public function render()
$isHeader = !$this->horizontal;
$isFirstRow = $this->horizontal;
+ $hasTitle = (bool) $this->headerTitle;
foreach ($rows as $row) {
if ($divider === $row) {
$isHeader = false;
@@ -391,12 +392,13 @@ public function render()
}
if ($isHeader || $isFirstRow) {
- if ($isFirstRow) {
- $this->renderRowSeparator(self::SEPARATOR_TOP_BOTTOM);
- $isFirstRow = false;
- } else {
- $this->renderRowSeparator(self::SEPARATOR_TOP, $this->headerTitle, $this->style->getHeaderTitleFormat());
- }
+ $this->renderRowSeparator(
+ $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM,
+ $hasTitle ? $this->headerTitle : null,
+ $hasTitle ? $this->style->getHeaderTitleFormat() : null
+ );
+ $isFirstRow = false;
+ $hasTitle = false;
}
if ($this->horizontal) {
$this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat());
@@ -454,7 +456,7 @@ private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $tit
$formattedTitle = sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3).'...');
}
- $titleStart = ($markupLength - $titleLength) / 2;
+ $titleStart = intdiv($markupLength - $titleLength, 2);
if (false === mb_detect_encoding($markup, null, true)) {
$markup = substr_replace($markup, $formattedTitle, $titleStart, $titleLength);
} else {
@@ -585,11 +587,11 @@ private function buildTableRows(array $rows): TableRows
return new TableRows(function () use ($rows, $unmergedRows): \Traversable {
foreach ($rows as $rowKey => $row) {
- yield $this->fillCells($row);
+ yield $row instanceof TableSeparator ? $row : $this->fillCells($row);
if (isset($unmergedRows[$rowKey])) {
- foreach ($unmergedRows[$rowKey] as $unmergedRow) {
- yield $this->fillCells($unmergedRow);
+ foreach ($unmergedRows[$rowKey] as $row) {
+ yield $row instanceof TableSeparator ? $row : $this->fillCells($row);
}
}
}
@@ -670,7 +672,7 @@ private function fillNextRows(array $rows, int $line): array
/**
* fill cells for a row that contains colspan > 1.
*/
- private function fillCells($row)
+ private function fillCells(iterable $row)
{
$newRow = [];
diff --git a/symfony/console/Input/ArgvInput.php b/symfony/console/Input/ArgvInput.php
index 6d2946926..b63529509 100644
--- a/symfony/console/Input/ArgvInput.php
+++ b/symfony/console/Input/ArgvInput.php
@@ -75,7 +75,7 @@ protected function parse()
$this->parseArgument($token);
} elseif ($parseOptions && '--' == $token) {
$parseOptions = false;
- } elseif ($parseOptions && 0 === strpos($token, '--')) {
+ } elseif ($parseOptions && str_starts_with($token, '--')) {
$this->parseLongOption($token);
} elseif ($parseOptions && '-' === $token[0] && '-' !== $token) {
$this->parseShortOption($token);
@@ -243,7 +243,7 @@ public function getFirstArgument()
$isOption = false;
foreach ($this->tokens as $i => $token) {
if ($token && '-' === $token[0]) {
- if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) {
+ if (str_contains($token, '=') || !isset($this->tokens[$i + 1])) {
continue;
}
@@ -285,8 +285,8 @@ public function hasParameterOption($values, $onlyParams = false)
// Options with values:
// For long options, test for '--option=' at beginning
// For short options, test for '-o' at beginning
- $leading = 0 === strpos($value, '--') ? $value.'=' : $value;
- if ($token === $value || '' !== $leading && 0 === strpos($token, $leading)) {
+ $leading = str_starts_with($value, '--') ? $value.'=' : $value;
+ if ($token === $value || '' !== $leading && str_starts_with($token, $leading)) {
return true;
}
}
@@ -316,8 +316,8 @@ public function getParameterOption($values, $default = false, $onlyParams = fals
// Options with values:
// For long options, test for '--option=' at beginning
// For short options, test for '-o' at beginning
- $leading = 0 === strpos($value, '--') ? $value.'=' : $value;
- if ('' !== $leading && 0 === strpos($token, $leading)) {
+ $leading = str_starts_with($value, '--') ? $value.'=' : $value;
+ if ('' !== $leading && str_starts_with($token, $leading)) {
return substr($token, \strlen($leading));
}
}
diff --git a/symfony/console/Input/ArrayInput.php b/symfony/console/Input/ArrayInput.php
index bf9a8a455..30bd2054a 100644
--- a/symfony/console/Input/ArrayInput.php
+++ b/symfony/console/Input/ArrayInput.php
@@ -133,9 +133,9 @@ protected function parse()
if ('--' === $key) {
return;
}
- if (0 === strpos($key, '--')) {
+ if (str_starts_with($key, '--')) {
$this->addLongOption(substr($key, 2), $value);
- } elseif (0 === strpos($key, '-')) {
+ } elseif (str_starts_with($key, '-')) {
$this->addShortOption(substr($key, 1), $value);
} else {
$this->addArgument($key, $value);
diff --git a/symfony/console/Input/Input.php b/symfony/console/Input/Input.php
index 6e4c01e95..d7f29073e 100644
--- a/symfony/console/Input/Input.php
+++ b/symfony/console/Input/Input.php
@@ -106,7 +106,7 @@ public function getArguments()
*/
public function getArgument($name)
{
- if (!$this->definition->hasArgument($name)) {
+ if (!$this->definition->hasArgument((string) $name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
}
@@ -118,7 +118,7 @@ public function getArgument($name)
*/
public function setArgument($name, $value)
{
- if (!$this->definition->hasArgument($name)) {
+ if (!$this->definition->hasArgument((string) $name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
}
@@ -130,7 +130,7 @@ public function setArgument($name, $value)
*/
public function hasArgument($name)
{
- return $this->definition->hasArgument($name);
+ return $this->definition->hasArgument((string) $name);
}
/**
diff --git a/symfony/console/Input/InputArgument.php b/symfony/console/Input/InputArgument.php
index 140c86d0e..085aca5a7 100644
--- a/symfony/console/Input/InputArgument.php
+++ b/symfony/console/Input/InputArgument.php
@@ -31,10 +31,10 @@ class InputArgument
private $description;
/**
- * @param string $name The argument name
- * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
- * @param string $description A description text
- * @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
+ * @param string $name The argument name
+ * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
+ * @param string $description A description text
+ * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only)
*
* @throws InvalidArgumentException When argument mode is not valid
*/
@@ -86,7 +86,7 @@ public function isArray()
/**
* Sets the default value.
*
- * @param string|string[]|null $default The default value
+ * @param string|bool|int|float|array|null $default
*
* @throws LogicException When incorrect default value is given
*/
@@ -110,7 +110,7 @@ public function setDefault($default = null)
/**
* Returns the default value.
*
- * @return string|string[]|null The default value
+ * @return string|bool|int|float|array|null
*/
public function getDefault()
{
diff --git a/symfony/console/Input/InputDefinition.php b/symfony/console/Input/InputDefinition.php
index db55315a8..e2cd6d714 100644
--- a/symfony/console/Input/InputDefinition.php
+++ b/symfony/console/Input/InputDefinition.php
@@ -185,9 +185,7 @@ public function getArgumentRequiredCount()
}
/**
- * Gets the default values.
- *
- * @return array An array of default values
+ * @return array
*/
public function getArgumentDefaults()
{
@@ -316,9 +314,7 @@ public function getOptionForShortcut($shortcut)
}
/**
- * Gets an array of default values.
- *
- * @return array An array of all default values
+ * @return array
*/
public function getOptionDefaults()
{
diff --git a/symfony/console/Input/InputInterface.php b/symfony/console/Input/InputInterface.php
index b9bcf3bbc..8efc62326 100644
--- a/symfony/console/Input/InputInterface.php
+++ b/symfony/console/Input/InputInterface.php
@@ -51,9 +51,9 @@ public function hasParameterOption($values, $onlyParams = false);
* Does not necessarily return the correct result for short options
* when multiple flags are combined in the same option.
*
- * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
- * @param mixed $default The default value to return if no result is found
- * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
+ * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
+ * @param string|bool|int|float|array|null $default The default value to return if no result is found
+ * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
*
* @return mixed The option value
*/
@@ -76,7 +76,7 @@ public function validate();
/**
* Returns all the given arguments merged with the default values.
*
- * @return array
+ * @return array
*/
public function getArguments();
@@ -85,7 +85,7 @@ public function getArguments();
*
* @param string $name The argument name
*
- * @return string|string[]|null The argument value
+ * @return mixed
*
* @throws InvalidArgumentException When argument given doesn't exist
*/
@@ -94,8 +94,8 @@ public function getArgument($name);
/**
* Sets an argument value by name.
*
- * @param string $name The argument name
- * @param string|string[]|null $value The argument value
+ * @param string $name The argument name
+ * @param mixed $value The argument value
*
* @throws InvalidArgumentException When argument given doesn't exist
*/
@@ -104,7 +104,7 @@ public function setArgument($name, $value);
/**
* Returns true if an InputArgument object exists by name or position.
*
- * @param string|int $name The InputArgument name or position
+ * @param string $name The argument name
*
* @return bool true if the InputArgument object exists, false otherwise
*/
@@ -113,7 +113,7 @@ public function hasArgument($name);
/**
* Returns all the given options merged with the default values.
*
- * @return array
+ * @return array
*/
public function getOptions();
@@ -122,7 +122,7 @@ public function getOptions();
*
* @param string $name The option name
*
- * @return string|string[]|bool|null The option value
+ * @return mixed
*
* @throws InvalidArgumentException When option given doesn't exist
*/
@@ -131,8 +131,8 @@ public function getOption($name);
/**
* Sets an option value by name.
*
- * @param string $name The option name
- * @param string|string[]|bool|null $value The option value
+ * @param string $name The option name
+ * @param mixed $value The option value
*
* @throws InvalidArgumentException When option given doesn't exist
*/
diff --git a/symfony/console/Input/InputOption.php b/symfony/console/Input/InputOption.php
index 5e48f88b8..c7729db20 100644
--- a/symfony/console/Input/InputOption.php
+++ b/symfony/console/Input/InputOption.php
@@ -48,17 +48,17 @@ 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[]|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|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
{
- if (0 === strpos($name, '--')) {
+ if (str_starts_with($name, '--')) {
$name = substr($name, 2);
}
@@ -162,11 +162,7 @@ public function isArray()
}
/**
- * Sets the default value.
- *
- * @param string|string[]|bool|null $default The default value
- *
- * @throws LogicException When incorrect default value is given
+ * @param string|bool|int|float|array|null $default
*/
public function setDefault($default = null)
{
@@ -188,7 +184,7 @@ public function setDefault($default = null)
/**
* Returns the default value.
*
- * @return string|string[]|bool|null The default value
+ * @return string|bool|int|float|array|null
*/
public function getDefault()
{
diff --git a/symfony/console/Input/StringInput.php b/symfony/console/Input/StringInput.php
index 2625514ef..eb5c07fdd 100644
--- a/symfony/console/Input/StringInput.php
+++ b/symfony/console/Input/StringInput.php
@@ -50,9 +50,9 @@ private function tokenize(string $input): array
while ($cursor < $length) {
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)));
+ $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1)));
} elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
- $tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2));
+ $tokens[] = stripcslashes(substr($match[0], 1, -1));
} elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) {
$tokens[] = stripcslashes($match[1]);
} else {
diff --git a/symfony/console/Logger/ConsoleLogger.php b/symfony/console/Logger/ConsoleLogger.php
index 4a0315656..c9ee03561 100644
--- a/symfony/console/Logger/ConsoleLogger.php
+++ b/symfony/console/Logger/ConsoleLogger.php
@@ -104,7 +104,7 @@ public function hasErrored()
*/
private function interpolate(string $message, array $context): string
{
- if (false === strpos($message, '{')) {
+ if (!str_contains($message, '{')) {
return $message;
}
diff --git a/symfony/console/Output/Output.php b/symfony/console/Output/Output.php
index 857248133..fb838f053 100644
--- a/symfony/console/Output/Output.php
+++ b/symfony/console/Output/Output.php
@@ -163,7 +163,7 @@ public function write($messages, $newline = false, $options = self::OUTPUT_NORMA
break;
}
- $this->doWrite($message, $newline);
+ $this->doWrite($message ?? '', $newline);
}
}
diff --git a/symfony/console/Output/TrimmedBufferOutput.php b/symfony/console/Output/TrimmedBufferOutput.php
index a03aa835f..4ca63c49b 100644
--- a/symfony/console/Output/TrimmedBufferOutput.php
+++ b/symfony/console/Output/TrimmedBufferOutput.php
@@ -24,12 +24,7 @@ class TrimmedBufferOutput extends Output
private $maxLength;
private $buffer = '';
- public function __construct(
- int $maxLength,
- ?int $verbosity = self::VERBOSITY_NORMAL,
- bool $decorated = false,
- OutputFormatterInterface $formatter = null
- ) {
+ public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) {
if ($maxLength <= 0) {
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
}
diff --git a/symfony/console/Question/Question.php b/symfony/console/Question/Question.php
index 2d46d1a98..cc108018f 100644
--- a/symfony/console/Question/Question.php
+++ b/symfony/console/Question/Question.php
@@ -32,8 +32,8 @@ class Question
private $trimmable = true;
/**
- * @param string $question The question to ask to the user
- * @param mixed $default The default answer to return if the user enters nothing
+ * @param string $question The question to ask to the user
+ * @param string|bool|int|float|null $default The default answer to return if the user enters nothing
*/
public function __construct(string $question, $default = null)
{
@@ -54,7 +54,7 @@ public function getQuestion()
/**
* Returns the default answer.
*
- * @return mixed
+ * @return string|bool|int|float|null
*/
public function getDefault()
{
diff --git a/symfony/console/Style/SymfonyStyle.php b/symfony/console/Style/SymfonyStyle.php
index ecdf9b1a3..66db3ad5a 100644
--- a/symfony/console/Style/SymfonyStyle.php
+++ b/symfony/console/Style/SymfonyStyle.php
@@ -442,7 +442,7 @@ private function autoPrependText(): void
{
$fetched = $this->bufferedOutput->fetch();
//Prepend new line if last char isn't EOL:
- if ("\n" !== substr($fetched, -1)) {
+ if (!str_ends_with($fetched, "\n")) {
$this->newLine();
}
}
diff --git a/symfony/console/composer.json b/symfony/console/composer.json
index 5c573df2b..90cbd24f5 100644
--- a/symfony/console/composer.json
+++ b/symfony/console/composer.json
@@ -19,7 +19,7 @@
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2"
},
"require-dev": {
@@ -29,10 +29,10 @@
"symfony/lock": "^4.4|^5.0",
"symfony/process": "^3.4|^4.0|^5.0",
"symfony/var-dumper": "^4.3|^5.0",
- "psr/log": "~1.0"
+ "psr/log": "^1|^2"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"suggest": {
"symfony/event-dispatcher": "",
@@ -41,6 +41,7 @@
"psr/log": "For using the console logger"
},
"conflict": {
+ "psr/log": ">=3",
"symfony/dependency-injection": "<3.4",
"symfony/event-dispatcher": "<4.3|>=5",
"symfony/lock": "<4.4",
diff --git a/symfony/event-dispatcher/Debug/WrappedListener.php b/symfony/event-dispatcher/Debug/WrappedListener.php
index e04763908..9b910e667 100644
--- a/symfony/event-dispatcher/Debug/WrappedListener.php
+++ b/symfony/event-dispatcher/Debug/WrappedListener.php
@@ -52,7 +52,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, Even
$this->pretty = $this->name.'::'.$listener[1];
} elseif ($listener instanceof \Closure) {
$r = new \ReflectionFunction($listener);
- if (false !== strpos($r->name, '{closure}')) {
+ if (str_contains($r->name, '{closure}')) {
$this->pretty = $this->name = 'closure';
} elseif ($class = $r->getClosureScopeClass()) {
$this->name = $class->name;
diff --git a/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
index 1a52c3e86..1c4e12ec8 100644
--- a/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
+++ b/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
@@ -81,7 +81,7 @@ public function process(ContainerBuilder $container)
if (!isset($event['method'])) {
$event['method'] = 'on'.preg_replace_callback([
- '/(?<=\b)[a-z]/i',
+ '/(?<=\b|_)[a-z]/i',
'/[^a-z0-9]/i',
], function ($matches) { return strtoupper($matches[0]); }, $event['event']);
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
diff --git a/symfony/event-dispatcher/EventSubscriberInterface.php b/symfony/event-dispatcher/EventSubscriberInterface.php
index 741590b1b..a0fc96dfe 100644
--- a/symfony/event-dispatcher/EventSubscriberInterface.php
+++ b/symfony/event-dispatcher/EventSubscriberInterface.php
@@ -43,7 +43,7 @@ interface EventSubscriberInterface
* The code must not depend on runtime state as it will only be called at compile time.
* All logic depending on runtime state must be put into the individual methods handling the events.
*
- * @return array The event names to listen to
+ * @return array The event names to listen to
*/
public static function getSubscribedEvents();
}
diff --git a/symfony/event-dispatcher/GenericEvent.php b/symfony/event-dispatcher/GenericEvent.php
index f005e3a3d..23333bc21 100644
--- a/symfony/event-dispatcher/GenericEvent.php
+++ b/symfony/event-dispatcher/GenericEvent.php
@@ -123,6 +123,7 @@ public function hasArgument($key)
*
* @throws \InvalidArgumentException if key does not exist in $this->args
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->getArgument($key);
@@ -133,7 +134,10 @@ public function offsetGet($key)
*
* @param string $key Array key to set
* @param mixed $value Value
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
$this->setArgument($key, $value);
@@ -143,7 +147,10 @@ public function offsetSet($key, $value)
* ArrayAccess for unset argument.
*
* @param string $key Array key
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($key)
{
if ($this->hasArgument($key)) {
@@ -158,6 +165,7 @@ public function offsetUnset($key)
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->hasArgument($key);
@@ -168,6 +176,7 @@ public function offsetExists($key)
*
* @return \ArrayIterator
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->arguments);
diff --git a/symfony/event-dispatcher/composer.json b/symfony/event-dispatcher/composer.json
index 8f6b5cefa..55c2716a6 100644
--- a/symfony/event-dispatcher/composer.json
+++ b/symfony/event-dispatcher/composer.json
@@ -17,7 +17,8 @@
],
"require": {
"php": ">=7.1.3",
- "symfony/event-dispatcher-contracts": "^1.1"
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
@@ -27,7 +28,7 @@
"symfony/http-foundation": "^3.4|^4.0|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/stopwatch": "^3.4|^4.0|^5.0",
- "psr/log": "~1.0"
+ "psr/log": "^1|^2|^3"
},
"conflict": {
"symfony/dependency-injection": "<3.4"
diff --git a/symfony/polyfill-intl-grapheme/Grapheme.php b/symfony/polyfill-intl-grapheme/Grapheme.php
index b42df8e57..572da5df6 100644
--- a/symfony/polyfill-intl-grapheme/Grapheme.php
+++ b/symfony/polyfill-intl-grapheme/Grapheme.php
@@ -37,6 +37,11 @@ final class Grapheme
// This regular expression is a work around for http://bugs.exim.org/1279
public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])';
+ private const CASE_FOLD = [
+ ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
+ ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
+ ];
+
public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0)
{
if (0 > $start) {
@@ -222,9 +227,14 @@ private static function grapheme_position($s, $needle, $offset, $mode)
// Use the same case folding mode as mbstring does for mb_stripos().
// Stick to SIMPLE case folding to avoid changing the length of the string, which
// might result in offsets being shifted.
- $mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_UPPER;
+ $mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_LOWER;
$s = mb_convert_case($s, $mode, 'UTF-8');
$needle = mb_convert_case($needle, $mode, 'UTF-8');
+
+ if (!\defined('MB_CASE_FOLD_SIMPLE')) {
+ $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
+ $needle = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $needle);
+ }
}
if ($reverse) {
$needlePos = strrpos($s, $needle);
diff --git a/symfony/polyfill-php80/README.md b/symfony/polyfill-php80/README.md
index eaa3050ab..10b8ee49a 100644
--- a/symfony/polyfill-php80/README.md
+++ b/symfony/polyfill-php80/README.md
@@ -16,7 +16,7 @@ This component provides features added to PHP 8.0 core:
- [`get_resource_id`](https://php.net/get_resource_id)
More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
diff --git a/symfony/polyfill-php80/bootstrap.php b/symfony/polyfill-php80/bootstrap.php
index 4f791f9e3..e5f7dbc1a 100644
--- a/symfony/polyfill-php80/bootstrap.php
+++ b/symfony/polyfill-php80/bootstrap.php
@@ -26,13 +26,13 @@ function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $nu
function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
}
if (!function_exists('str_contains')) {
- function str_contains(string $haystack, string $needle): bool { return p\Php80::str_contains($haystack, $needle); }
+ function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_starts_with')) {
- function str_starts_with(string $haystack, string $needle): bool { return p\Php80::str_starts_with($haystack, $needle); }
+ function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_ends_with')) {
- function str_ends_with(string $haystack, string $needle): bool { return p\Php80::str_ends_with($haystack, $needle); }
+ function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('get_debug_type')) {
function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
diff --git a/symfony/process/InputStream.php b/symfony/process/InputStream.php
index c86fca868..4f8f71331 100644
--- a/symfony/process/InputStream.php
+++ b/symfony/process/InputStream.php
@@ -69,6 +69,7 @@ public function isClosed()
/**
* @return \Traversable
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
$this->open = true;
diff --git a/symfony/process/Pipes/AbstractPipes.php b/symfony/process/Pipes/AbstractPipes.php
index 6b72aed7d..21ab3e389 100644
--- a/symfony/process/Pipes/AbstractPipes.php
+++ b/symfony/process/Pipes/AbstractPipes.php
@@ -171,7 +171,7 @@ protected function write(): ?array
/**
* @internal
*/
- public function handleError($type, $msg)
+ public function handleError(int $type, string $msg)
{
$this->lastError = $msg;
}
diff --git a/symfony/process/Pipes/UnixPipes.php b/symfony/process/Pipes/UnixPipes.php
index 7cb5bab76..58a8da07c 100644
--- a/symfony/process/Pipes/UnixPipes.php
+++ b/symfony/process/Pipes/UnixPipes.php
@@ -35,6 +35,9 @@ public function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveRea
parent::__construct($input);
}
+ /**
+ * @return array
+ */
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
diff --git a/symfony/process/Pipes/WindowsPipes.php b/symfony/process/Pipes/WindowsPipes.php
index b2c3f4f4f..69768f3d8 100644
--- a/symfony/process/Pipes/WindowsPipes.php
+++ b/symfony/process/Pipes/WindowsPipes.php
@@ -71,7 +71,7 @@ public function __construct($input, bool $haveReadSupport)
}
$this->lockHandles[$pipe] = $h;
- if (!fclose(fopen($file, 'w')) || !$h = fopen($file, 'r')) {
+ if (!($h = fopen($file, 'w')) || !fclose($h) || !$h = fopen($file, 'r')) {
flock($this->lockHandles[$pipe], \LOCK_UN);
fclose($this->lockHandles[$pipe]);
unset($this->lockHandles[$pipe]);
@@ -88,6 +88,9 @@ public function __construct($input, bool $haveReadSupport)
parent::__construct($input);
}
+ /**
+ * @return array
+ */
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
diff --git a/symfony/process/Process.php b/symfony/process/Process.php
index 57420e1dc..9fafddd64 100644
--- a/symfony/process/Process.php
+++ b/symfony/process/Process.php
@@ -198,6 +198,9 @@ public static function fromShellCommandline(string $command, string $cwd = null,
return $process;
}
+ /**
+ * @return array
+ */
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
@@ -619,6 +622,7 @@ public function getIncrementalOutput()
*
* @return \Generator
*/
+ #[\ReturnTypeWillChange]
public function getIterator($flags = 0)
{
$this->readPipesForOutput(__FUNCTION__, false);
@@ -1395,7 +1399,7 @@ protected function isSigchildEnabled()
ob_start();
phpinfo(\INFO_GENERAL);
- return self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild');
+ return self::$sigchild = str_contains(ob_get_clean(), '--enable-sigchild');
}
/**
@@ -1582,7 +1586,7 @@ function ($m) use (&$env, &$varCache, &$varCount, $uid) {
if (isset($varCache[$m[0]])) {
return $varCache[$m[0]];
}
- if (false !== strpos($value = $m[1], "\0")) {
+ if (str_contains($value = $m[1], "\0")) {
$value = str_replace("\0", '?', $value);
}
if (false === strpbrk($value, "\"%!\n")) {
@@ -1643,7 +1647,7 @@ private function escapeArgument(?string $argument): string
if ('\\' !== \DIRECTORY_SEPARATOR) {
return "'".str_replace("'", "'\\''", $argument)."'";
}
- if (false !== strpos($argument, "\0")) {
+ if (str_contains($argument, "\0")) {
$argument = str_replace("\0", '?', $argument);
}
if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
diff --git a/symfony/process/composer.json b/symfony/process/composer.json
index 53e01c6e1..c0f7599f2 100644
--- a/symfony/process/composer.json
+++ b/symfony/process/composer.json
@@ -16,7 +16,8 @@
}
],
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Process\\": "" },
diff --git a/symfony/routing/Generator/UrlGenerator.php b/symfony/routing/Generator/UrlGenerator.php
index 58d438488..4ed870479 100644
--- a/symfony/routing/Generator/UrlGenerator.php
+++ b/symfony/routing/Generator/UrlGenerator.php
@@ -221,9 +221,9 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
// so we need to encode them as they are not used for this purpose here
// otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route
$url = strtr($url, ['/../' => '/%2E%2E/', '/./' => '/%2E/']);
- if ('/..' === substr($url, -3)) {
+ if (str_ends_with($url, '/..')) {
$url = substr($url, 0, -2).'%2E%2E';
- } elseif ('/.' === substr($url, -2)) {
+ } elseif (str_ends_with($url, '/.')) {
$url = substr($url, 0, -1).'%2E';
}
diff --git a/symfony/routing/Loader/AnnotationDirectoryLoader.php b/symfony/routing/Loader/AnnotationDirectoryLoader.php
index 3fb70ea20..df43321e4 100644
--- a/symfony/routing/Loader/AnnotationDirectoryLoader.php
+++ b/symfony/routing/Loader/AnnotationDirectoryLoader.php
@@ -54,7 +54,7 @@ function (\SplFileInfo $current) {
});
foreach ($files as $file) {
- if (!$file->isFile() || '.php' !== substr($file->getFilename(), -4)) {
+ if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) {
continue;
}
diff --git a/symfony/routing/Loader/AnnotationFileLoader.php b/symfony/routing/Loader/AnnotationFileLoader.php
index cd262f1ad..6db5a22f0 100644
--- a/symfony/routing/Loader/AnnotationFileLoader.php
+++ b/symfony/routing/Loader/AnnotationFileLoader.php
@@ -26,9 +26,6 @@ class AnnotationFileLoader extends FileLoader
{
protected $loader;
- /**
- * @throws \RuntimeException
- */
public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader)
{
if (!\function_exists('token_get_all')) {
diff --git a/symfony/routing/Loader/Configurator/CollectionConfigurator.php b/symfony/routing/Loader/Configurator/CollectionConfigurator.php
index c0a074c0b..270e853e8 100644
--- a/symfony/routing/Loader/Configurator/CollectionConfigurator.php
+++ b/symfony/routing/Loader/Configurator/CollectionConfigurator.php
@@ -36,6 +36,9 @@ public function __construct(RouteCollection $parent, string $name, self $parentC
$this->parentPrefixes = $parentPrefixes;
}
+ /**
+ * @return array
+ */
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
diff --git a/symfony/routing/Loader/Configurator/ImportConfigurator.php b/symfony/routing/Loader/Configurator/ImportConfigurator.php
index b950d4f47..b4dfb88b3 100644
--- a/symfony/routing/Loader/Configurator/ImportConfigurator.php
+++ b/symfony/routing/Loader/Configurator/ImportConfigurator.php
@@ -30,6 +30,9 @@ public function __construct(RouteCollection $parent, RouteCollection $route)
$this->route = $route;
}
+ /**
+ * @return array
+ */
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
diff --git a/symfony/routing/Loader/Configurator/Traits/RouteTrait.php b/symfony/routing/Loader/Configurator/Traits/RouteTrait.php
index 04009cd16..22df1af05 100644
--- a/symfony/routing/Loader/Configurator/Traits/RouteTrait.php
+++ b/symfony/routing/Loader/Configurator/Traits/RouteTrait.php
@@ -126,7 +126,7 @@ final public function methods(array $methods): self
/**
* Adds the "_controller" entry to defaults.
*
- * @param callable|string $controller a callable or parseable pseudo-callable
+ * @param callable|string|array $controller a callable or parseable pseudo-callable
*
* @return $this
*/
diff --git a/symfony/routing/Loader/ContainerLoader.php b/symfony/routing/Loader/ContainerLoader.php
index 948da7b10..f248011ba 100644
--- a/symfony/routing/Loader/ContainerLoader.php
+++ b/symfony/routing/Loader/ContainerLoader.php
@@ -32,7 +32,7 @@ public function __construct(ContainerInterface $container)
*/
public function supports($resource, $type = null)
{
- return 'service' === $type;
+ return 'service' === $type && \is_string($resource);
}
/**
diff --git a/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php
index 50b9666ab..123130ed4 100644
--- a/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php
+++ b/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php
@@ -187,7 +187,7 @@ private function groupStaticRoutes(RouteCollection $collection): array
$url = substr($url, 0, -1);
}
foreach ($dynamicRegex as [$hostRx, $rx, $prefix]) {
- if (('' === $prefix || 0 === strpos($url, $prefix)) && (preg_match($rx, $url) || preg_match($rx, $url.'/')) && (!$host || !$hostRx || preg_match($hostRx, $host))) {
+ if (('' === $prefix || str_starts_with($url, $prefix)) && (preg_match($rx, $url) || preg_match($rx, $url.'/')) && (!$host || !$hostRx || preg_match($hostRx, $host))) {
$dynamicRegex[] = [$hostRegex, $regex, $staticPrefix];
$dynamicRoutes->add($name, $route);
continue 2;
@@ -349,7 +349,7 @@ private function compileDynamicRoutes(RouteCollection $collection, bool $matchHo
$state->markTail = 0;
// if the regex is too large, throw a signaling exception to recompute with smaller chunk size
- set_error_handler(function ($type, $message) { throw false !== strpos($message, $this->signalingException->getMessage()) ? $this->signalingException : new \ErrorException($message); });
+ set_error_handler(function ($type, $message) { throw str_contains($message, $this->signalingException->getMessage()) ? $this->signalingException : new \ErrorException($message); });
try {
preg_match($state->regex, '');
} finally {
@@ -427,7 +427,7 @@ private function compileRoute(Route $route, string $name, $vars, bool $hasTraili
if ($condition = $route->getCondition()) {
$condition = $this->getExpressionLanguage()->compile($condition, ['context', 'request']);
- $condition = $conditions[$condition] ?? $conditions[$condition] = (false !== strpos($condition, '$request') ? 1 : -1) * \count($conditions);
+ $condition = $conditions[$condition] ?? $conditions[$condition] = (str_contains($condition, '$request') ? 1 : -1) * \count($conditions);
} else {
$condition = null;
}
diff --git a/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php b/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php
index 1c5c5fdeb..d61282bd3 100644
--- a/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php
+++ b/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php
@@ -195,8 +195,8 @@ private function getCommonPrefix(string $prefix, string $anotherPrefix): array
return [substr($prefix, 0, $i), substr($prefix, 0, $staticLength ?? $i)];
}
- public static function handleError($type, $msg)
+ public static function handleError(int $type, string $msg)
{
- return false !== strpos($msg, 'Compilation failed: lookbehind assertion is not fixed length');
+ return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length');
}
}
diff --git a/symfony/routing/Matcher/TraceableUrlMatcher.php b/symfony/routing/Matcher/TraceableUrlMatcher.php
index b662fc0ec..f113eb03b 100644
--- a/symfony/routing/Matcher/TraceableUrlMatcher.php
+++ b/symfony/routing/Matcher/TraceableUrlMatcher.php
@@ -65,7 +65,7 @@ protected function matchCollection($pathinfo, RouteCollection $routes)
$requiredMethods = $route->getMethods();
// check the static prefix of the URL first. Only use the more expensive preg_match when it matches
- if ('' !== $staticPrefix && 0 !== strpos($trimmedPathinfo, $staticPrefix)) {
+ if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) {
$this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route);
continue;
}
diff --git a/symfony/routing/Matcher/UrlMatcher.php b/symfony/routing/Matcher/UrlMatcher.php
index bab0a5817..a14b04faa 100644
--- a/symfony/routing/Matcher/UrlMatcher.php
+++ b/symfony/routing/Matcher/UrlMatcher.php
@@ -141,7 +141,7 @@ protected function matchCollection($pathinfo, RouteCollection $routes)
$requiredMethods = $route->getMethods();
// check the static prefix of the URL first. Only use the more expensive preg_match when it matches
- if ('' !== $staticPrefix && 0 !== strpos($trimmedPathinfo, $staticPrefix)) {
+ if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) {
continue;
}
$regex = $compiledRoute->getRegex();
diff --git a/symfony/routing/Route.php b/symfony/routing/Route.php
index 63d1f6fe3..baabe0d02 100644
--- a/symfony/routing/Route.php
+++ b/symfony/routing/Route.php
@@ -116,8 +116,6 @@ public function unserialize($serialized)
}
/**
- * Returns the pattern for the path.
- *
* @return string The path pattern
*/
public function getPath()
@@ -128,8 +126,6 @@ public function getPath()
/**
* Sets the pattern for the path.
*
- * This method implements a fluent interface.
- *
* @param string $pattern The path pattern
*
* @return $this
@@ -158,8 +154,6 @@ public function setPath($pattern)
}
/**
- * Returns the pattern for the host.
- *
* @return string The host pattern
*/
public function getHost()
@@ -170,8 +164,6 @@ public function getHost()
/**
* Sets the pattern for the host.
*
- * This method implements a fluent interface.
- *
* @param string $pattern The host pattern
*
* @return $this
@@ -199,8 +191,6 @@ public function getSchemes()
* Sets the schemes (e.g. 'https') this route is restricted to.
* So an empty array means that any scheme is allowed.
*
- * This method implements a fluent interface.
- *
* @param string|string[] $schemes The scheme or an array of schemes
*
* @return $this
@@ -240,8 +230,6 @@ public function getMethods()
* Sets the HTTP methods (e.g. 'POST') this route is restricted to.
* So an empty array means that any method is allowed.
*
- * This method implements a fluent interface.
- *
* @param string|string[] $methods The method or an array of methods
*
* @return $this
@@ -255,8 +243,6 @@ public function setMethods($methods)
}
/**
- * Returns the options.
- *
* @return array The options
*/
public function getOptions()
@@ -265,10 +251,6 @@ public function getOptions()
}
/**
- * Sets the options.
- *
- * This method implements a fluent interface.
- *
* @return $this
*/
public function setOptions(array $options)
@@ -281,10 +263,6 @@ public function setOptions(array $options)
}
/**
- * Adds options.
- *
- * This method implements a fluent interface.
- *
* @return $this
*/
public function addOptions(array $options)
@@ -300,8 +278,6 @@ public function addOptions(array $options)
/**
* Sets an option value.
*
- * This method implements a fluent interface.
- *
* @param string $name An option name
* @param mixed $value The option value
*
@@ -340,8 +316,6 @@ public function hasOption($name)
}
/**
- * Returns the defaults.
- *
* @return array The defaults
*/
public function getDefaults()
@@ -350,12 +324,6 @@ public function getDefaults()
}
/**
- * Sets the defaults.
- *
- * This method implements a fluent interface.
- *
- * @param array $defaults The defaults
- *
* @return $this
*/
public function setDefaults(array $defaults)
@@ -366,12 +334,6 @@ public function setDefaults(array $defaults)
}
/**
- * Adds defaults.
- *
- * This method implements a fluent interface.
- *
- * @param array $defaults The defaults
- *
* @return $this
*/
public function addDefaults(array $defaults)
@@ -433,8 +395,6 @@ public function setDefault($name, $default)
}
/**
- * Returns the requirements.
- *
* @return array The requirements
*/
public function getRequirements()
@@ -443,12 +403,6 @@ public function getRequirements()
}
/**
- * Sets the requirements.
- *
- * This method implements a fluent interface.
- *
- * @param array $requirements The requirements
- *
* @return $this
*/
public function setRequirements(array $requirements)
@@ -459,12 +413,6 @@ public function setRequirements(array $requirements)
}
/**
- * Adds requirements.
- *
- * This method implements a fluent interface.
- *
- * @param array $requirements The requirements
- *
* @return $this
*/
public function addRequirements(array $requirements)
@@ -526,8 +474,6 @@ public function setRequirement($key, $regex)
}
/**
- * Returns the condition.
- *
* @return string The condition
*/
public function getCondition()
@@ -538,8 +484,6 @@ public function getCondition()
/**
* Sets the condition.
*
- * This method implements a fluent interface.
- *
* @param string $condition The condition
*
* @return $this
@@ -583,7 +527,7 @@ private function sanitizeRequirement(string $key, $regex)
$regex = (string) substr($regex, 1); // returns false for a single character
}
- if ('$' === substr($regex, -1)) {
+ if (str_ends_with($regex, '$')) {
$regex = substr($regex, 0, -1);
}
diff --git a/symfony/routing/RouteCollection.php b/symfony/routing/RouteCollection.php
index 3baf0986c..56e925cac 100644
--- a/symfony/routing/RouteCollection.php
+++ b/symfony/routing/RouteCollection.php
@@ -51,6 +51,7 @@ public function __clone()
*
* @return \ArrayIterator|Route[] An \ArrayIterator object for iterating over routes
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->routes);
@@ -61,6 +62,7 @@ public function getIterator()
*
* @return int The number of routes
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return \count($this->routes);
diff --git a/symfony/routing/RouteCompiler.php b/symfony/routing/RouteCompiler.php
index db2bbec7c..6299fa66b 100644
--- a/symfony/routing/RouteCompiler.php
+++ b/symfony/routing/RouteCompiler.php
@@ -135,7 +135,7 @@ private static function compilePattern(Route $route, string $pattern, bool $isHo
} else {
$precedingChar = substr($precedingText, -1);
}
- $isSeparator = '' !== $precedingChar && false !== strpos(static::SEPARATORS, $precedingChar);
+ $isSeparator = '' !== $precedingChar && str_contains(static::SEPARATORS, $precedingChar);
// A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the
// variable would not be usable as a Controller action argument.
@@ -280,7 +280,7 @@ private static function findNextSeparator(string $pattern, bool $useUtf8): strin
preg_match('/^./u', $pattern, $pattern);
}
- return false !== strpos(static::SEPARATORS, $pattern[0]) ? $pattern[0] : '';
+ return str_contains(static::SEPARATORS, $pattern[0]) ? $pattern[0] : '';
}
/**
diff --git a/symfony/routing/composer.json b/symfony/routing/composer.json
index cae9284a4..c6ef01bcb 100644
--- a/symfony/routing/composer.json
+++ b/symfony/routing/composer.json
@@ -16,7 +16,8 @@
}
],
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"symfony/config": "^4.2|^5.0",
@@ -25,7 +26,7 @@
"symfony/expression-language": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"doctrine/annotations": "^1.10.4",
- "psr/log": "~1.0"
+ "psr/log": "^1|^2|^3"
},
"conflict": {
"symfony/config": "<4.2",
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/Loader/MoFileLoader.php b/symfony/translation/Loader/MoFileLoader.php
index accd023ab..8c5216f6b 100644
--- a/symfony/translation/Loader/MoFileLoader.php
+++ b/symfony/translation/Loader/MoFileLoader.php
@@ -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/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",