diff --git a/app/composer.lock b/app/composer.lock index 3c220ef1e..6d1436e62 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -507,20 +507,20 @@ }, { "name": "nette/command-line", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/nette/command-line.git", - "reference": "3e61bcb78faa334b775176b0b977d7d56e75ba91" + "reference": "85a59fc757b4f47b8ee1967f4303722fb7374620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/command-line/zipball/3e61bcb78faa334b775176b0b977d7d56e75ba91", - "reference": "3e61bcb78faa334b775176b0b977d7d56e75ba91", + "url": "https://api.github.com/repos/nette/command-line/zipball/85a59fc757b4f47b8ee1967f4303722fb7374620", + "reference": "85a59fc757b4f47b8ee1967f4303722fb7374620", "shasum": "" }, "require": { - "php": "8.0 - 8.3" + "php": "8.0 - 8.4" }, "require-dev": { "nette/tester": "^2.5", @@ -563,9 +563,9 @@ ], "support": { "issues": "https://github.com/nette/command-line/issues", - "source": "https://github.com/nette/command-line/tree/v1.8.1" + "source": "https://github.com/nette/command-line/tree/v1.8.2" }, - "time": "2024-03-07T22:32:55+00:00" + "time": "2024-12-15T19:40:45+00:00" }, { "name": "nette/component-model", @@ -631,16 +631,16 @@ }, { "name": "nette/database", - "version": "v3.2.4", + "version": "v3.2.5", "source": { "type": "git", "url": "https://github.com/nette/database.git", - "reference": "8e9a427d98ec0929102ee037016bb47eb7e8b75c" + "reference": "3f9e12a5488615194d1e1d093c982cc07a85be68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/database/zipball/8e9a427d98ec0929102ee037016bb47eb7e8b75c", - "reference": "8e9a427d98ec0929102ee037016bb47eb7e8b75c", + "url": "https://api.github.com/repos/nette/database/zipball/3f9e12a5488615194d1e1d093c982cc07a85be68", + "reference": "3f9e12a5488615194d1e1d093c982cc07a85be68", "shasum": "" }, "require": { @@ -700,9 +700,9 @@ ], "support": { "issues": "https://github.com/nette/database/issues", - "source": "https://github.com/nette/database/tree/v3.2.4" + "source": "https://github.com/nette/database/tree/v3.2.5" }, - "time": "2024-08-28T01:03:21+00:00" + "time": "2024-12-18T19:13:21+00:00" }, { "name": "nette/di", @@ -1076,16 +1076,16 @@ }, { "name": "nette/php-generator", - "version": "v4.1.6", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "c90961e782ae86e517fe5ed732eb2b512945565b" + "reference": "d201c9bc217e0969d1b678d286be49302972fb56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/c90961e782ae86e517fe5ed732eb2b512945565b", - "reference": "c90961e782ae86e517fe5ed732eb2b512945565b", + "url": "https://api.github.com/repos/nette/php-generator/zipball/d201c9bc217e0969d1b678d286be49302972fb56", + "reference": "d201c9bc217e0969d1b678d286be49302972fb56", "shasum": "" }, "require": { @@ -1129,7 +1129,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.3 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.4 features.", "homepage": "https://nette.org", "keywords": [ "code", @@ -1139,9 +1139,9 @@ ], "support": { "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v4.1.6" + "source": "https://github.com/nette/php-generator/tree/v4.1.7" }, - "time": "2024-09-10T09:31:55+00:00" + "time": "2024-11-29T01:41:18+00:00" }, { "name": "nette/robot-loader", @@ -2311,16 +2311,16 @@ }, { "name": "symfony/cache", - "version": "v7.1.7", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "23b61c9592ee72233c31625f0ae805dd1571e928" + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/23b61c9592ee72233c31625f0ae805dd1571e928", - "reference": "23b61c9592ee72233c31625f0ae805dd1571e928", + "url": "https://api.github.com/repos/symfony/cache/zipball/e7e983596b744c4539f31e79b0350a6cf5878a20", + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20", "shasum": "" }, "require": { @@ -2348,6 +2348,7 @@ "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/filesystem": "^6.4|^7.0", @@ -2388,7 +2389,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.1.7" + "source": "https://github.com/symfony/cache/tree/v7.2.1" }, "funding": [ { @@ -2404,20 +2405,20 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:55+00:00" + "time": "2024-12-07T08:08:50+00:00" }, { "name": "symfony/cache-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197" + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/df6a1a44c890faded49a5fca33c2d5c5fd3c2197", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", "shasum": "" }, "require": { @@ -2464,7 +2465,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" }, "funding": [ { @@ -2480,20 +2481,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/config", - "version": "v7.1.7", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8" + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", - "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", + "url": "https://api.github.com/repos/symfony/config/zipball/bcd3c4adf0144dee5011bb35454728c38adec055", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055", "shasum": "" }, "require": { @@ -2539,7 +2540,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.1.7" + "source": "https://github.com/symfony/config/tree/v7.2.0" }, "funding": [ { @@ -2555,20 +2556,20 @@ "type": "tidelift" } ], - "time": "2024-11-04T11:34:07+00:00" + "time": "2024-11-04T11:36:24+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -2606,7 +2607,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -2622,20 +2623,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c835867b3c62bb05c7fe3d637c871c7ae52024d4", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { @@ -2672,7 +2673,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.6" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -2688,20 +2689,20 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { @@ -2755,7 +2756,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -2771,24 +2772,25 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/translation", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f" + "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b9f72ab14efdb6b772f85041fa12f820dee8d55f", - "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f", + "url": "https://api.github.com/repos/symfony/translation/zipball/dc89e16b44048ceecc879054e5b7f38326ab6cc5", + "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, @@ -2849,7 +2851,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.1.6" + "source": "https://github.com/symfony/translation/tree/v7.2.0" }, "funding": [ { @@ -2865,20 +2867,20 @@ "type": "tidelift" } ], - "time": "2024-09-28T12:35:13+00:00" + "time": "2024-11-12T20:47:56+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", "shasum": "" }, "require": { @@ -2927,7 +2929,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" }, "funding": [ { @@ -2943,20 +2945,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "90173ef89c40e7c8c616653241048705f84130ef" + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/90173ef89c40e7c8c616653241048705f84130ef", - "reference": "90173ef89c40e7c8c616653241048705f84130ef", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d", "shasum": "" }, "require": { @@ -3003,7 +3005,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.1.6" + "source": "https://github.com/symfony/var-exporter/tree/v7.2.0" }, "funding": [ { @@ -3019,7 +3021,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-10-18T07:58:17+00:00" }, { "name": "texy/texy", @@ -3446,16 +3448,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82" + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6c98c7600fc717b2c78c11ef60040d5b1e359c82", - "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d276fc3bf1430ec315f2f109bbde2769821524", + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524", "shasum": "" }, "require": { @@ -3500,20 +3502,20 @@ "type": "github" } ], - "time": "2024-11-17T14:17:00+00:00" + "time": "2024-12-17T17:14:01+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2" + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/81833b5787e2e8f451b31218875e29e4ed600ab2", - "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", "shasum": "" }, "require": { @@ -3545,9 +3547,9 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.0" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" }, - "time": "2024-10-26T16:04:11+00:00" + "time": "2024-11-28T21:56:36+00:00" }, { "name": "phpstan/phpstan-nette", @@ -3651,12 +3653,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "b33a18b5d222c63472a4b41f6fa3e15e591c9595" + "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b33a18b5d222c63472a4b41f6fa3e15e591c9595", - "reference": "b33a18b5d222c63472a4b41f6fa3e15e591c9595", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4aa68d3ea343b9576b5fdebef1332f701a7bc994", + "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994", "shasum": "" }, "conflict": { @@ -3766,7 +3768,7 @@ "contao/managed-edition": "<=1.5", "corveda/phpsandbox": "<1.3.5", "cosenary/instagram": "<=2.3", - "craftcms/cms": "<=4.12.6.1|>=5,<=5.4.7.1", + "craftcms/cms": "<4.13.2|>=5,<5.5.2", "croogo/croogo": "<4", "cuyz/valinor": "<0.12", "czim/file-handling": "<1.5|>=2,<2.3", @@ -3797,9 +3799,9 @@ "dolibarr/dolibarr": "<19.0.2", "dompdf/dompdf": "<2.0.4", "doublethreedigital/guest-entries": "<3.1.2", - "drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", - "drupal/core-recommended": ">=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", - "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/core": ">=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", + "drupal/core-recommended": ">=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", + "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", "duncanmcclean/guest-entries": "<3.1.2", "dweeves/magmi": "<=0.7.24", "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", @@ -3826,6 +3828,7 @@ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26|>=3.3,<3.3.39", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12", + "ezsystems/ezplatform-http-cache": "<2.3.16", "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.35", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1-dev|>=3.3,<3.3.40", @@ -3910,11 +3913,12 @@ "hov/jobfair": "<1.0.13|>=2,<2.0.2", "httpsoft/http-message": "<1.0.12", "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6.0.0-beta1,<4.6.9", + "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6,<4.6.14", "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3|>=4.5,<4.5.6|>=4.6,<4.6.2", "ibexa/fieldtype-richtext": ">=4.6,<4.6.10", "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", - "ibexa/post-install": "<=1.0.4", + "ibexa/http-cache": ">=4.6,<4.6.14", + "ibexa/post-install": "<1.0.16|>=4.6,<4.6.14", "ibexa/solr": ">=4.5,<4.5.4", "ibexa/user": ">=4,<4.4.3", "icecoder/icecoder": "<=8.1", @@ -3978,12 +3982,13 @@ "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31", "laravel/laravel": ">=5.4,<5.4.22", + "laravel/pulse": "<1.3.1", "laravel/reverb": "<1.4", "laravel/socialite": ">=1,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=9|==10.1", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", - "league/commonmark": "<0.18.3", + "league/commonmark": "<2.6", "league/flysystem": "<1.1.4|>=2,<2.1.1", "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", @@ -4013,6 +4018,7 @@ "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", "maximebf/debugbar": "<1.19", "mdanter/ecc": "<2", + "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", "mediawiki/cargo": "<3.6.1", "mediawiki/core": "<1.39.5|==1.40", "mediawiki/matomo": "<2.4.3", @@ -4188,11 +4194,12 @@ "s-cart/s-cart": "<6.9", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.7.11|>=1.8,<1.8.9", + "samwilson/unlinked-wikibase": "<1.39.6|>=1.40,<1.40.2|>=1.41,<1.41.1", "scheb/two-factor-bundle": "<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", "sfroemken/url_redirect": "<=1.2.1", - "sheng/yiicms": "<=1.2", + "sheng/yiicms": "<1.2.1", "shopware/core": "<=6.5.8.12|>=6.6,<=6.6.5", "shopware/platform": "<=6.5.8.12|>=6.6,<=6.6.5", "shopware/production": "<=6.3.5.2", @@ -4200,6 +4207,7 @@ "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", "shopxo/shopxo": "<=6.1", "showdoc/showdoc": "<2.10.4", + "shuchkin/simplexlsx": ">=1.0.12,<1.1.12", "silverstripe-australia/advancedreports": ">=1,<=2", "silverstripe/admin": "<1.13.19|>=2,<2.1.8", "silverstripe/assets": ">=1,<1.11.1", @@ -4219,11 +4227,13 @@ "silverstripe/userforms": "<3|>=5,<5.4.2", "silverstripe/versioned-admin": ">=1,<1.11.1", "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4|==5.0.0.0-alpha12", + "simplesamlphp/saml2": "<4.6.14|==5.0.0.0-alpha12", + "simplesamlphp/saml2-legacy": "<4.6.14", "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplesamlphp/simplesamlphp-module-openid": "<1", "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", + "simplesamlphp/xml-common": "<1.20", "simplesamlphp/xml-security": "==1.6.11", "simplito/elliptic-php": "<1.0.6", "sitegeist/fluid-components": "<3.5", @@ -4235,8 +4245,9 @@ "snipe/snipe-it": "<=7.0.13", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", - "spatie/browsershot": "<3.57.4", + "spatie/browsershot": "<5.0.2", "spatie/image-optimizer": "<1.7.3", + "spencer14420/sp-php-email-handler": "<1", "spipu/html2pdf": "<5.2.8", "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", @@ -4307,13 +4318,13 @@ "t3s/content-consent": "<1.0.3|>=2,<2.0.2", "tastyigniter/tastyigniter": "<3.3", "tcg/voyager": "<=1.4", - "tecnickcom/tcpdf": "<=6.7.4", + "tecnickcom/tcpdf": "<=6.7.5", "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<6.0.8", - "thorsten/phpmyfaq": "<3.2.2", + "thorsten/phpmyfaq": "<4", "tikiwiki/tiki-manager": "<=17.1", "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", "tinymce/tinymce": "<7.2", @@ -4347,7 +4358,7 @@ "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", "uasoft-indonesia/badaso": "<=2.9.7", - "unisharp/laravel-filemanager": "<2.6.4", + "unisharp/laravel-filemanager": "<2.9.1", "unopim/unopim": "<0.1.5", "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", @@ -4379,6 +4390,7 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "winter/wn-backend-module": "<1.2.4", + "winter/wn-cms-module": "<1.0.476|>=1.1,<1.1.11|>=1.2,<1.2.7", "winter/wn-dusk-plugin": "<2.1", "winter/wn-system-module": "<1.2.4", "wintercms/winter": "<=1.2.3", @@ -4485,7 +4497,7 @@ "type": "tidelift" } ], - "time": "2024-11-19T21:04:39+00:00" + "time": "2024-12-18T20:05:40+00:00" }, { "name": "shipmonk/composer-dependency-analyser", @@ -4668,16 +4680,16 @@ }, { "name": "spaze/phpcs-phar", - "version": "3.11.1", + "version": "3.11.2", "source": { "type": "git", "url": "https://github.com/spaze/phpcs-phar.git", - "reference": "b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e" + "reference": "b1deb9736970e23f0477ef128b6f96560f247467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spaze/phpcs-phar/zipball/b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e", - "reference": "b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e", + "url": "https://api.github.com/repos/spaze/phpcs-phar/zipball/b1deb9736970e23f0477ef128b6f96560f247467", + "reference": "b1deb9736970e23f0477ef128b6f96560f247467", "shasum": "" }, "require": { @@ -4685,8 +4697,8 @@ }, "replace": { "dealerdirect/phpcodesniffer-composer-installer": "*", - "phpcsstandards/php_codesniffer": "3.11.1", - "squizlabs/php_codesniffer": "3.11.1" + "phpcsstandards/php_codesniffer": "3.11.2", + "squizlabs/php_codesniffer": "3.11.2" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0", @@ -4719,9 +4731,9 @@ ], "support": { "issues": "https://github.com/spaze/phpcs-phar/issues", - "source": "https://github.com/spaze/phpcs-phar/tree/3.11.1" + "source": "https://github.com/spaze/phpcs-phar/tree/3.11.2" }, - "time": "2024-11-16T14:22:08+00:00" + "time": "2024-12-11T18:24:38+00:00" }, { "name": "spaze/phpstan-disallowed-calls", diff --git a/app/vendor/composer/autoload_classmap.php b/app/vendor/composer/autoload_classmap.php index af483c74f..f1408907a 100644 --- a/app/vendor/composer/autoload_classmap.php +++ b/app/vendor/composer/autoload_classmap.php @@ -566,6 +566,9 @@ 'Nette\\PhpGenerator\\Printer' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Printer.php', 'Nette\\PhpGenerator\\PromotedParameter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PromotedParameter.php', 'Nette\\PhpGenerator\\Property' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Property.php', + 'Nette\\PhpGenerator\\PropertyAccessMode' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PropertyAccessMode.php', + 'Nette\\PhpGenerator\\PropertyHook' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PropertyHook.php', + 'Nette\\PhpGenerator\\PropertyHookType' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PropertyHookType.php', 'Nette\\PhpGenerator\\PsrPrinter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php', 'Nette\\PhpGenerator\\TraitType' => $vendorDir . '/nette/php-generator/src/PhpGenerator/TraitType.php', 'Nette\\PhpGenerator\\TraitUse' => $vendorDir . '/nette/php-generator/src/PhpGenerator/TraitUse.php', @@ -576,9 +579,11 @@ 'Nette\\PhpGenerator\\Traits\\MethodsAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/MethodsAware.php', 'Nette\\PhpGenerator\\Traits\\NameAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php', 'Nette\\PhpGenerator\\Traits\\PropertiesAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/PropertiesAware.php', + 'Nette\\PhpGenerator\\Traits\\PropertyLike' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/PropertyLike.php', 'Nette\\PhpGenerator\\Traits\\TraitsAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/TraitsAware.php', 'Nette\\PhpGenerator\\Traits\\VisibilityAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php', 'Nette\\PhpGenerator\\Type' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Type.php', + 'Nette\\PhpGenerator\\Visibility' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Visibility.php', 'Nette\\Routing\\Route' => $vendorDir . '/nette/routing/src/Routing/Route.php', 'Nette\\Routing\\RouteList' => $vendorDir . '/nette/routing/src/Routing/RouteList.php', 'Nette\\Routing\\Router' => $vendorDir . '/nette/routing/src/Routing/Router.php', diff --git a/app/vendor/composer/autoload_psr4.php b/app/vendor/composer/autoload_psr4.php index 2fc07b938..e332b3b56 100644 --- a/app/vendor/composer/autoload_psr4.php +++ b/app/vendor/composer/autoload_psr4.php @@ -35,7 +35,7 @@ 'PHP_Parallel_Lint\\PhpConsoleHighlighter\\' => array($vendorDir . '/php-parallel-lint/php-console-highlighter/src'), 'PHP_Parallel_Lint\\PhpConsoleColor\\' => array($vendorDir . '/php-parallel-lint/php-console-color/src'), 'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'), - 'PHPStan\\' => array($vendorDir . '/phpstan/phpstan-deprecation-rules/src', $vendorDir . '/phpstan/phpstan-nette/src'), + 'PHPStan\\' => array($vendorDir . '/phpstan/phpstan-nette/src', $vendorDir . '/phpstan/phpstan-deprecation-rules/src'), 'MichalSpacekCz\\' => array($baseDir . '/src'), 'JetBrains\\PhpStorm\\' => array($vendorDir . '/jetbrains/phpstorm-attributes/src'), 'Contributte\\Translation\\' => array($vendorDir . '/contributte/translation/src'), diff --git a/app/vendor/composer/autoload_static.php b/app/vendor/composer/autoload_static.php index ba5739dfa..e53834461 100644 --- a/app/vendor/composer/autoload_static.php +++ b/app/vendor/composer/autoload_static.php @@ -184,8 +184,8 @@ class ComposerStaticInit247de957f14f643f393d210a332dd05b ), 'PHPStan\\' => array ( - 0 => __DIR__ . '/..' . '/phpstan/phpstan-deprecation-rules/src', - 1 => __DIR__ . '/..' . '/phpstan/phpstan-nette/src', + 0 => __DIR__ . '/..' . '/phpstan/phpstan-nette/src', + 1 => __DIR__ . '/..' . '/phpstan/phpstan-deprecation-rules/src', ), 'MichalSpacekCz\\' => array ( @@ -766,6 +766,9 @@ class ComposerStaticInit247de957f14f643f393d210a332dd05b 'Nette\\PhpGenerator\\Printer' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Printer.php', 'Nette\\PhpGenerator\\PromotedParameter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PromotedParameter.php', 'Nette\\PhpGenerator\\Property' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Property.php', + 'Nette\\PhpGenerator\\PropertyAccessMode' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PropertyAccessMode.php', + 'Nette\\PhpGenerator\\PropertyHook' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PropertyHook.php', + 'Nette\\PhpGenerator\\PropertyHookType' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PropertyHookType.php', 'Nette\\PhpGenerator\\PsrPrinter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php', 'Nette\\PhpGenerator\\TraitType' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/TraitType.php', 'Nette\\PhpGenerator\\TraitUse' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/TraitUse.php', @@ -776,9 +779,11 @@ class ComposerStaticInit247de957f14f643f393d210a332dd05b 'Nette\\PhpGenerator\\Traits\\MethodsAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/MethodsAware.php', 'Nette\\PhpGenerator\\Traits\\NameAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php', 'Nette\\PhpGenerator\\Traits\\PropertiesAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/PropertiesAware.php', + 'Nette\\PhpGenerator\\Traits\\PropertyLike' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/PropertyLike.php', 'Nette\\PhpGenerator\\Traits\\TraitsAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/TraitsAware.php', 'Nette\\PhpGenerator\\Traits\\VisibilityAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php', 'Nette\\PhpGenerator\\Type' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Type.php', + 'Nette\\PhpGenerator\\Visibility' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Visibility.php', 'Nette\\Routing\\Route' => __DIR__ . '/..' . '/nette/routing/src/Routing/Route.php', 'Nette\\Routing\\RouteList' => __DIR__ . '/..' . '/nette/routing/src/Routing/RouteList.php', 'Nette\\Routing\\Router' => __DIR__ . '/..' . '/nette/routing/src/Routing/Router.php', diff --git a/app/vendor/composer/installed.json b/app/vendor/composer/installed.json index 08f49694c..b611a4333 100644 --- a/app/vendor/composer/installed.json +++ b/app/vendor/composer/installed.json @@ -564,28 +564,28 @@ }, { "name": "nette/command-line", - "version": "v1.8.1", - "version_normalized": "1.8.1.0", + "version": "v1.8.2", + "version_normalized": "1.8.2.0", "source": { "type": "git", "url": "https://github.com/nette/command-line.git", - "reference": "3e61bcb78faa334b775176b0b977d7d56e75ba91" + "reference": "85a59fc757b4f47b8ee1967f4303722fb7374620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/command-line/zipball/3e61bcb78faa334b775176b0b977d7d56e75ba91", - "reference": "3e61bcb78faa334b775176b0b977d7d56e75ba91", + "url": "https://api.github.com/repos/nette/command-line/zipball/85a59fc757b4f47b8ee1967f4303722fb7374620", + "reference": "85a59fc757b4f47b8ee1967f4303722fb7374620", "shasum": "" }, "require": { - "php": "8.0 - 8.3" + "php": "8.0 - 8.4" }, "require-dev": { "nette/tester": "^2.5", "phpstan/phpstan": "^1", "tracy/tracy": "^2.9" }, - "time": "2024-03-07T22:32:55+00:00", + "time": "2024-12-15T19:40:45+00:00", "type": "library", "extra": { "branch-alias": { @@ -623,7 +623,7 @@ ], "support": { "issues": "https://github.com/nette/command-line/issues", - "source": "https://github.com/nette/command-line/tree/v1.8.1" + "source": "https://github.com/nette/command-line/tree/v1.8.2" }, "install-path": "../nette/command-line" }, @@ -694,17 +694,17 @@ }, { "name": "nette/database", - "version": "v3.2.4", - "version_normalized": "3.2.4.0", + "version": "v3.2.5", + "version_normalized": "3.2.5.0", "source": { "type": "git", "url": "https://github.com/nette/database.git", - "reference": "8e9a427d98ec0929102ee037016bb47eb7e8b75c" + "reference": "3f9e12a5488615194d1e1d093c982cc07a85be68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/database/zipball/8e9a427d98ec0929102ee037016bb47eb7e8b75c", - "reference": "8e9a427d98ec0929102ee037016bb47eb7e8b75c", + "url": "https://api.github.com/repos/nette/database/zipball/3f9e12a5488615194d1e1d093c982cc07a85be68", + "reference": "3f9e12a5488615194d1e1d093c982cc07a85be68", "shasum": "" }, "require": { @@ -721,7 +721,7 @@ "phpstan/phpstan-nette": "^1.0", "tracy/tracy": "^2.9" }, - "time": "2024-08-28T01:03:21+00:00", + "time": "2024-12-18T19:13:21+00:00", "type": "library", "extra": { "branch-alias": { @@ -766,7 +766,7 @@ ], "support": { "issues": "https://github.com/nette/database/issues", - "source": "https://github.com/nette/database/tree/v3.2.4" + "source": "https://github.com/nette/database/tree/v3.2.5" }, "install-path": "../nette/database" }, @@ -1157,17 +1157,17 @@ }, { "name": "nette/php-generator", - "version": "v4.1.6", - "version_normalized": "4.1.6.0", + "version": "v4.1.7", + "version_normalized": "4.1.7.0", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "c90961e782ae86e517fe5ed732eb2b512945565b" + "reference": "d201c9bc217e0969d1b678d286be49302972fb56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/c90961e782ae86e517fe5ed732eb2b512945565b", - "reference": "c90961e782ae86e517fe5ed732eb2b512945565b", + "url": "https://api.github.com/repos/nette/php-generator/zipball/d201c9bc217e0969d1b678d286be49302972fb56", + "reference": "d201c9bc217e0969d1b678d286be49302972fb56", "shasum": "" }, "require": { @@ -1184,7 +1184,7 @@ "suggest": { "nikic/php-parser": "to use ClassType::from(withBodies: true) & ClassType::fromCode()" }, - "time": "2024-09-10T09:31:55+00:00", + "time": "2024-11-29T01:41:18+00:00", "type": "library", "extra": { "branch-alias": { @@ -1213,7 +1213,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.3 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.4 features.", "homepage": "https://nette.org", "keywords": [ "code", @@ -1223,7 +1223,7 @@ ], "support": { "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v4.1.6" + "source": "https://github.com/nette/php-generator/tree/v4.1.7" }, "install-path": "../nette/php-generator" }, @@ -2089,17 +2089,17 @@ }, { "name": "phpstan/phpstan", - "version": "2.0.2", - "version_normalized": "2.0.2.0", + "version": "2.0.4", + "version_normalized": "2.0.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82" + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6c98c7600fc717b2c78c11ef60040d5b1e359c82", - "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d276fc3bf1430ec315f2f109bbde2769821524", + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524", "shasum": "" }, "require": { @@ -2108,7 +2108,7 @@ "conflict": { "phpstan/phpstan-shim": "*" }, - "time": "2024-11-17T14:17:00+00:00", + "time": "2024-12-17T17:14:01+00:00", "bin": [ "phpstan", "phpstan.phar" @@ -2150,17 +2150,17 @@ }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "2.0.0", - "version_normalized": "2.0.0.0", + "version": "2.0.1", + "version_normalized": "2.0.1.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2" + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/81833b5787e2e8f451b31218875e29e4ed600ab2", - "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", "shasum": "" }, "require": { @@ -2172,7 +2172,7 @@ "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.6" }, - "time": "2024-10-26T16:04:11+00:00", + "time": "2024-11-28T21:56:36+00:00", "type": "phpstan-extension", "extra": { "phpstan": { @@ -2194,7 +2194,7 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.0" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" }, "install-path": "../phpstan/phpstan-deprecation-rules" }, @@ -2468,12 +2468,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "b33a18b5d222c63472a4b41f6fa3e15e591c9595" + "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b33a18b5d222c63472a4b41f6fa3e15e591c9595", - "reference": "b33a18b5d222c63472a4b41f6fa3e15e591c9595", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4aa68d3ea343b9576b5fdebef1332f701a7bc994", + "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994", "shasum": "" }, "conflict": { @@ -2583,7 +2583,7 @@ "contao/managed-edition": "<=1.5", "corveda/phpsandbox": "<1.3.5", "cosenary/instagram": "<=2.3", - "craftcms/cms": "<=4.12.6.1|>=5,<=5.4.7.1", + "craftcms/cms": "<4.13.2|>=5,<5.5.2", "croogo/croogo": "<4", "cuyz/valinor": "<0.12", "czim/file-handling": "<1.5|>=2,<2.3", @@ -2614,9 +2614,9 @@ "dolibarr/dolibarr": "<19.0.2", "dompdf/dompdf": "<2.0.4", "doublethreedigital/guest-entries": "<3.1.2", - "drupal/core": ">=6,<6.38|>=7,<7.96|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", - "drupal/core-recommended": ">=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", - "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.80|>=8,<10.2.9|>=10.3,<10.3.6|>=11,<11.0.5", + "drupal/core": ">=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", + "drupal/core-recommended": ">=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", + "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", "duncanmcclean/guest-entries": "<3.1.2", "dweeves/magmi": "<=0.7.24", "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", @@ -2643,6 +2643,7 @@ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26|>=3.3,<3.3.39", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12", + "ezsystems/ezplatform-http-cache": "<2.3.16", "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.35", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1-dev|>=3.3,<3.3.40", @@ -2727,11 +2728,12 @@ "hov/jobfair": "<1.0.13|>=2,<2.0.2", "httpsoft/http-message": "<1.0.12", "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6.0.0-beta1,<4.6.9", + "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6,<4.6.14", "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3|>=4.5,<4.5.6|>=4.6,<4.6.2", "ibexa/fieldtype-richtext": ">=4.6,<4.6.10", "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", - "ibexa/post-install": "<=1.0.4", + "ibexa/http-cache": ">=4.6,<4.6.14", + "ibexa/post-install": "<1.0.16|>=4.6,<4.6.14", "ibexa/solr": ">=4.5,<4.5.4", "ibexa/user": ">=4,<4.4.3", "icecoder/icecoder": "<=8.1", @@ -2795,12 +2797,13 @@ "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31", "laravel/laravel": ">=5.4,<5.4.22", + "laravel/pulse": "<1.3.1", "laravel/reverb": "<1.4", "laravel/socialite": ">=1,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=9|==10.1", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", - "league/commonmark": "<0.18.3", + "league/commonmark": "<2.6", "league/flysystem": "<1.1.4|>=2,<2.1.1", "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", @@ -2830,6 +2833,7 @@ "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", "maximebf/debugbar": "<1.19", "mdanter/ecc": "<2", + "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", "mediawiki/cargo": "<3.6.1", "mediawiki/core": "<1.39.5|==1.40", "mediawiki/matomo": "<2.4.3", @@ -3005,11 +3009,12 @@ "s-cart/s-cart": "<6.9", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.7.11|>=1.8,<1.8.9", + "samwilson/unlinked-wikibase": "<1.39.6|>=1.40,<1.40.2|>=1.41,<1.41.1", "scheb/two-factor-bundle": "<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", "sfroemken/url_redirect": "<=1.2.1", - "sheng/yiicms": "<=1.2", + "sheng/yiicms": "<1.2.1", "shopware/core": "<=6.5.8.12|>=6.6,<=6.6.5", "shopware/platform": "<=6.5.8.12|>=6.6,<=6.6.5", "shopware/production": "<=6.3.5.2", @@ -3017,6 +3022,7 @@ "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", "shopxo/shopxo": "<=6.1", "showdoc/showdoc": "<2.10.4", + "shuchkin/simplexlsx": ">=1.0.12,<1.1.12", "silverstripe-australia/advancedreports": ">=1,<=2", "silverstripe/admin": "<1.13.19|>=2,<2.1.8", "silverstripe/assets": ">=1,<1.11.1", @@ -3036,11 +3042,13 @@ "silverstripe/userforms": "<3|>=5,<5.4.2", "silverstripe/versioned-admin": ">=1,<1.11.1", "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4|==5.0.0.0-alpha12", + "simplesamlphp/saml2": "<4.6.14|==5.0.0.0-alpha12", + "simplesamlphp/saml2-legacy": "<4.6.14", "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplesamlphp/simplesamlphp-module-openid": "<1", "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", + "simplesamlphp/xml-common": "<1.20", "simplesamlphp/xml-security": "==1.6.11", "simplito/elliptic-php": "<1.0.6", "sitegeist/fluid-components": "<3.5", @@ -3052,8 +3060,9 @@ "snipe/snipe-it": "<=7.0.13", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", - "spatie/browsershot": "<3.57.4", + "spatie/browsershot": "<5.0.2", "spatie/image-optimizer": "<1.7.3", + "spencer14420/sp-php-email-handler": "<1", "spipu/html2pdf": "<5.2.8", "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", @@ -3124,13 +3133,13 @@ "t3s/content-consent": "<1.0.3|>=2,<2.0.2", "tastyigniter/tastyigniter": "<3.3", "tcg/voyager": "<=1.4", - "tecnickcom/tcpdf": "<=6.7.4", + "tecnickcom/tcpdf": "<=6.7.5", "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<6.0.8", - "thorsten/phpmyfaq": "<3.2.2", + "thorsten/phpmyfaq": "<4", "tikiwiki/tiki-manager": "<=17.1", "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", "tinymce/tinymce": "<7.2", @@ -3164,7 +3173,7 @@ "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", "uasoft-indonesia/badaso": "<=2.9.7", - "unisharp/laravel-filemanager": "<2.6.4", + "unisharp/laravel-filemanager": "<2.9.1", "unopim/unopim": "<0.1.5", "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", @@ -3196,6 +3205,7 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "winter/wn-backend-module": "<1.2.4", + "winter/wn-cms-module": "<1.0.476|>=1.1,<1.1.11|>=1.2,<1.2.7", "winter/wn-dusk-plugin": "<2.1", "winter/wn-system-module": "<1.2.4", "wintercms/winter": "<=1.2.3", @@ -3266,7 +3276,7 @@ "zfr/zfr-oauth2-server-module": "<0.1.2", "zoujingli/thinkadmin": "<=6.1.53" }, - "time": "2024-11-19T21:04:39+00:00", + "time": "2024-12-18T20:05:40+00:00", "default-branch": true, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -3779,17 +3789,17 @@ }, { "name": "spaze/phpcs-phar", - "version": "3.11.1", - "version_normalized": "3.11.1.0", + "version": "3.11.2", + "version_normalized": "3.11.2.0", "source": { "type": "git", "url": "https://github.com/spaze/phpcs-phar.git", - "reference": "b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e" + "reference": "b1deb9736970e23f0477ef128b6f96560f247467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spaze/phpcs-phar/zipball/b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e", - "reference": "b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e", + "url": "https://api.github.com/repos/spaze/phpcs-phar/zipball/b1deb9736970e23f0477ef128b6f96560f247467", + "reference": "b1deb9736970e23f0477ef128b6f96560f247467", "shasum": "" }, "require": { @@ -3797,14 +3807,14 @@ }, "replace": { "dealerdirect/phpcodesniffer-composer-installer": "*", - "phpcsstandards/php_codesniffer": "3.11.1", - "squizlabs/php_codesniffer": "3.11.1" + "phpcsstandards/php_codesniffer": "3.11.2", + "squizlabs/php_codesniffer": "3.11.2" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.4" }, - "time": "2024-11-16T14:22:08+00:00", + "time": "2024-12-11T18:24:38+00:00", "bin": [ "phpcbf", "phpcs" @@ -3833,7 +3843,7 @@ ], "support": { "issues": "https://github.com/spaze/phpcs-phar/issues", - "source": "https://github.com/spaze/phpcs-phar/tree/3.11.1" + "source": "https://github.com/spaze/phpcs-phar/tree/3.11.2" }, "install-path": "../spaze/phpcs-phar" }, @@ -4120,17 +4130,17 @@ }, { "name": "symfony/cache", - "version": "v7.1.7", - "version_normalized": "7.1.7.0", + "version": "v7.2.1", + "version_normalized": "7.2.1.0", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "23b61c9592ee72233c31625f0ae805dd1571e928" + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/23b61c9592ee72233c31625f0ae805dd1571e928", - "reference": "23b61c9592ee72233c31625f0ae805dd1571e928", + "url": "https://api.github.com/repos/symfony/cache/zipball/e7e983596b744c4539f31e79b0350a6cf5878a20", + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20", "shasum": "" }, "require": { @@ -4158,6 +4168,7 @@ "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/filesystem": "^6.4|^7.0", @@ -4165,7 +4176,7 @@ "symfony/messenger": "^6.4|^7.0", "symfony/var-dumper": "^6.4|^7.0" }, - "time": "2024-11-05T15:34:55+00:00", + "time": "2024-12-07T08:08:50+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4200,7 +4211,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.1.7" + "source": "https://github.com/symfony/cache/tree/v7.2.1" }, "funding": [ { @@ -4220,24 +4231,24 @@ }, { "name": "symfony/cache-contracts", - "version": "v3.5.0", - "version_normalized": "3.5.0.0", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197" + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/df6a1a44c890faded49a5fca33c2d5c5fd3c2197", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", "shasum": "" }, "require": { "php": ">=8.1", "psr/cache": "^3.0" }, - "time": "2024-04-18T09:32:20+00:00", + "time": "2024-09-25T14:20:29+00:00", "type": "library", "extra": { "branch-alias": { @@ -4279,7 +4290,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" }, "funding": [ { @@ -4299,17 +4310,17 @@ }, { "name": "symfony/config", - "version": "v7.1.7", - "version_normalized": "7.1.7.0", + "version": "v7.2.0", + "version_normalized": "7.2.0.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8" + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", - "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", + "url": "https://api.github.com/repos/symfony/config/zipball/bcd3c4adf0144dee5011bb35454728c38adec055", + "reference": "bcd3c4adf0144dee5011bb35454728c38adec055", "shasum": "" }, "require": { @@ -4329,7 +4340,7 @@ "symfony/service-contracts": "^2.5|^3", "symfony/yaml": "^6.4|^7.0" }, - "time": "2024-11-04T11:34:07+00:00", + "time": "2024-11-04T11:36:24+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4357,7 +4368,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.1.7" + "source": "https://github.com/symfony/config/tree/v7.2.0" }, "funding": [ { @@ -4377,23 +4388,23 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "version_normalized": "3.5.0.0", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { "php": ">=8.1" }, - "time": "2024-04-18T09:32:20+00:00", + "time": "2024-09-25T14:20:29+00:00", "type": "library", "extra": { "branch-alias": { @@ -4427,7 +4438,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -4447,17 +4458,17 @@ }, { "name": "symfony/filesystem", - "version": "v7.1.6", - "version_normalized": "7.1.6.0", + "version": "v7.2.0", + "version_normalized": "7.2.0.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c835867b3c62bb05c7fe3d637c871c7ae52024d4", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { @@ -4468,7 +4479,7 @@ "require-dev": { "symfony/process": "^6.4|^7.0" }, - "time": "2024-10-25T15:11:02+00:00", + "time": "2024-10-25T15:15:23+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4496,7 +4507,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.6" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -4516,17 +4527,17 @@ }, { "name": "symfony/service-contracts", - "version": "v3.5.0", - "version_normalized": "3.5.0.0", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { @@ -4537,7 +4548,7 @@ "conflict": { "ext-psr": "<1.1|>=2" }, - "time": "2024-04-18T09:32:20+00:00", + "time": "2024-09-25T14:20:29+00:00", "type": "library", "extra": { "branch-alias": { @@ -4582,7 +4593,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -4602,21 +4613,22 @@ }, { "name": "symfony/translation", - "version": "v7.1.6", - "version_normalized": "7.1.6.0", + "version": "v7.2.0", + "version_normalized": "7.2.0.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f" + "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b9f72ab14efdb6b772f85041fa12f820dee8d55f", - "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f", + "url": "https://api.github.com/repos/symfony/translation/zipball/dc89e16b44048ceecc879054e5b7f38326ab6cc5", + "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, @@ -4648,7 +4660,7 @@ "symfony/service-contracts": "^2.5|^3", "symfony/yaml": "^6.4|^7.0" }, - "time": "2024-09-28T12:35:13+00:00", + "time": "2024-11-12T20:47:56+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4679,7 +4691,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.1.6" + "source": "https://github.com/symfony/translation/tree/v7.2.0" }, "funding": [ { @@ -4699,23 +4711,23 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.5.0", - "version_normalized": "3.5.0.0", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", - "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", "shasum": "" }, "require": { "php": ">=8.1" }, - "time": "2024-04-18T09:32:20+00:00", + "time": "2024-09-25T14:20:29+00:00", "type": "library", "extra": { "branch-alias": { @@ -4760,7 +4772,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" }, "funding": [ { @@ -4780,17 +4792,17 @@ }, { "name": "symfony/var-exporter", - "version": "v7.1.6", - "version_normalized": "7.1.6.0", + "version": "v7.2.0", + "version_normalized": "7.2.0.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "90173ef89c40e7c8c616653241048705f84130ef" + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/90173ef89c40e7c8c616653241048705f84130ef", - "reference": "90173ef89c40e7c8c616653241048705f84130ef", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d", "shasum": "" }, "require": { @@ -4801,7 +4813,7 @@ "symfony/serializer": "^6.4|^7.0", "symfony/var-dumper": "^6.4|^7.0" }, - "time": "2024-09-25T14:20:29+00:00", + "time": "2024-10-18T07:58:17+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4839,7 +4851,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.1.6" + "source": "https://github.com/symfony/var-exporter/tree/v7.2.0" }, "funding": [ { diff --git a/app/vendor/composer/installed.php b/app/vendor/composer/installed.php index a00a6511a..b58e33a28 100644 --- a/app/vendor/composer/installed.php +++ b/app/vendor/composer/installed.php @@ -110,9 +110,9 @@ 'dev_requirement' => false, ), 'nette/command-line' => array( - 'pretty_version' => 'v1.8.1', - 'version' => '1.8.1.0', - 'reference' => '3e61bcb78faa334b775176b0b977d7d56e75ba91', + 'pretty_version' => 'v1.8.2', + 'version' => '1.8.2.0', + 'reference' => '85a59fc757b4f47b8ee1967f4303722fb7374620', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/command-line', 'aliases' => array(), @@ -128,9 +128,9 @@ 'dev_requirement' => false, ), 'nette/database' => array( - 'pretty_version' => 'v3.2.4', - 'version' => '3.2.4.0', - 'reference' => '8e9a427d98ec0929102ee037016bb47eb7e8b75c', + 'pretty_version' => 'v3.2.5', + 'version' => '3.2.5.0', + 'reference' => '3f9e12a5488615194d1e1d093c982cc07a85be68', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/database', 'aliases' => array(), @@ -188,9 +188,9 @@ 'dev_requirement' => false, ), 'nette/php-generator' => array( - 'pretty_version' => 'v4.1.6', - 'version' => '4.1.6.0', - 'reference' => 'c90961e782ae86e517fe5ed732eb2b512945565b', + 'pretty_version' => 'v4.1.7', + 'version' => '4.1.7.0', + 'reference' => 'd201c9bc217e0969d1b678d286be49302972fb56', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/php-generator', 'aliases' => array(), @@ -313,7 +313,7 @@ 'phpcsstandards/php_codesniffer' => array( 'dev_requirement' => true, 'replaced' => array( - 0 => '3.11.1', + 0 => '3.11.2', ), ), 'phpstan/phpdoc-parser' => array( @@ -326,18 +326,18 @@ 'dev_requirement' => true, ), 'phpstan/phpstan' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', - 'reference' => '6c98c7600fc717b2c78c11ef60040d5b1e359c82', + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => '50d276fc3bf1430ec315f2f109bbde2769821524', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => true, ), 'phpstan/phpstan-deprecation-rules' => array( - 'pretty_version' => '2.0.0', - 'version' => '2.0.0.0', - 'reference' => '81833b5787e2e8f451b31218875e29e4ed600ab2', + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'reference' => '1cc1259cb91ee4cfbb5c39bca9f635f067c910b4', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-deprecation-rules', 'aliases' => array(), @@ -403,7 +403,7 @@ 'roave/security-advisories' => array( 'pretty_version' => 'dev-latest', 'version' => 'dev-latest', - 'reference' => 'b33a18b5d222c63472a4b41f6fa3e15e591c9595', + 'reference' => '4aa68d3ea343b9576b5fdebef1332f701a7bc994', 'type' => 'metapackage', 'install_path' => null, 'aliases' => array( @@ -493,9 +493,9 @@ 'dev_requirement' => false, ), 'spaze/phpcs-phar' => array( - 'pretty_version' => '3.11.1', - 'version' => '3.11.1.0', - 'reference' => 'b3ced1b725e7463914dcc9e0a641d4bb2dc94f4e', + 'pretty_version' => '3.11.2', + 'version' => '3.11.2.0', + 'reference' => 'b1deb9736970e23f0477ef128b6f96560f247467', 'type' => 'library', 'install_path' => __DIR__ . '/../spaze/phpcs-phar', 'aliases' => array(), @@ -549,22 +549,22 @@ 'squizlabs/php_codesniffer' => array( 'dev_requirement' => true, 'replaced' => array( - 0 => '3.11.1', + 0 => '3.11.2', ), ), 'symfony/cache' => array( - 'pretty_version' => 'v7.1.7', - 'version' => '7.1.7.0', - 'reference' => '23b61c9592ee72233c31625f0ae805dd1571e928', + 'pretty_version' => 'v7.2.1', + 'version' => '7.2.1.0', + 'reference' => 'e7e983596b744c4539f31e79b0350a6cf5878a20', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/cache-contracts' => array( - 'pretty_version' => 'v3.5.0', - 'version' => '3.5.0.0', - 'reference' => 'df6a1a44c890faded49a5fca33c2d5c5fd3c2197', + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => '15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache-contracts', 'aliases' => array(), @@ -577,27 +577,27 @@ ), ), 'symfony/config' => array( - 'pretty_version' => 'v7.1.7', - 'version' => '7.1.7.0', - 'reference' => 'dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8', + 'pretty_version' => 'v7.2.0', + 'version' => '7.2.0.0', + 'reference' => 'bcd3c4adf0144dee5011bb35454728c38adec055', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.5.0', - 'version' => '3.5.0.0', - 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/filesystem' => array( - 'pretty_version' => 'v7.1.6', - 'version' => '7.1.6.0', - 'reference' => 'c835867b3c62bb05c7fe3d637c871c7ae52024d4', + 'pretty_version' => 'v7.2.0', + 'version' => '7.2.0.0', + 'reference' => 'b8dce482de9d7c9fe2891155035a7248ab5c7fdb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), @@ -616,27 +616,27 @@ ), ), 'symfony/service-contracts' => array( - 'pretty_version' => 'v3.5.0', - 'version' => '3.5.0.0', - 'reference' => 'bd1d9e59a81d8fa4acdcea3f617c581f7475a80f', + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => 'e53260aabf78fb3d63f8d79d69ece59f80d5eda0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v7.1.6', - 'version' => '7.1.6.0', - 'reference' => 'b9f72ab14efdb6b772f85041fa12f820dee8d55f', + 'pretty_version' => 'v7.2.0', + 'version' => '7.2.0.0', + 'reference' => 'dc89e16b44048ceecc879054e5b7f38326ab6cc5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( - 'pretty_version' => 'v3.5.0', - 'version' => '3.5.0.0', - 'reference' => 'b9d2189887bb6b2e0367a9fc7136c5239ab9b05a', + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => '4667ff3bd513750603a09c8dedbea942487fb07c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), @@ -649,9 +649,9 @@ ), ), 'symfony/var-exporter' => array( - 'pretty_version' => 'v7.1.6', - 'version' => '7.1.6.0', - 'reference' => '90173ef89c40e7c8c616653241048705f84130ef', + 'pretty_version' => 'v7.2.0', + 'version' => '7.2.0.0', + 'reference' => '1a6a89f95a46af0f142874c9d650a6358d13070d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), diff --git a/app/vendor/nette/command-line/composer.json b/app/vendor/nette/command-line/composer.json index 0bfab9b8d..31a02b902 100644 --- a/app/vendor/nette/command-line/composer.json +++ b/app/vendor/nette/command-line/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "8.0 - 8.3" + "php": "8.0 - 8.4" }, "require-dev": { "nette/tester": "^2.5", diff --git a/app/vendor/nette/command-line/readme.md b/app/vendor/nette/command-line/readme.md index 67e052f26..58a81dbe8 100644 --- a/app/vendor/nette/command-line/readme.md +++ b/app/vendor/nette/command-line/readme.md @@ -13,6 +13,6 @@ Install it using Composer: composer require nette/command-line ``` -It requires PHP version 8.0 and supports PHP up to 8.3. +It requires PHP version 8.0 and supports PHP up to 8.4. If you like Nette, **[please make a donation now](https://nette.org/donate)**. Thank you! diff --git a/app/vendor/nette/database/src/Database/Connection.php b/app/vendor/nette/database/src/Database/Connection.php index 1d86803f1..5898d0cf7 100644 --- a/app/vendor/nette/database/src/Database/Connection.php +++ b/app/vendor/nette/database/src/Database/Connection.php @@ -16,7 +16,7 @@ /** - * Represents a connection between PHP and a database server. + * Manages database connection and executes SQL queries. */ class Connection { @@ -52,6 +52,9 @@ public function __construct( } + /** + * @throws ConnectionException + */ public function connect(): void { if ($this->pdo) { @@ -74,6 +77,9 @@ public function connect(): void } + /** + * Disconnects and connects to database again. + */ public function reconnect(): void { $this->disconnect(); @@ -81,6 +87,9 @@ public function reconnect(): void } + /** + * Disconnects from database. + */ public function disconnect(): void { $this->pdo = null; @@ -121,6 +130,9 @@ public function getReflection(): Reflection } + /** + * Sets callback for row preprocessing. + */ public function setRowNormalizer(?callable $normalizer): static { $this->rowNormalizer = $normalizer; @@ -128,6 +140,9 @@ public function setRowNormalizer(?callable $normalizer): static } + /** + * Returns last inserted ID. + */ public function getInsertId(?string $sequence = null): string { try { @@ -139,6 +154,9 @@ public function getInsertId(?string $sequence = null): string } + /** + * Quotes string for use in SQL. + */ public function quote(string $string, int $type = PDO::PARAM_STR): string { try { @@ -149,6 +167,10 @@ public function quote(string $string, int $type = PDO::PARAM_STR): string } + /** + * Starts a transaction. + * @throws \LogicException when called inside a transaction + */ public function beginTransaction(): void { if ($this->transactionDepth !== 0) { @@ -159,6 +181,10 @@ public function beginTransaction(): void } + /** + * Commits current transaction. + * @throws \LogicException when called inside a transaction + */ public function commit(): void { if ($this->transactionDepth !== 0) { @@ -169,6 +195,10 @@ public function commit(): void } + /** + * Rolls back current transaction. + * @throws \LogicException when called inside a transaction + */ public function rollBack(): void { if ($this->transactionDepth !== 0) { @@ -179,6 +209,9 @@ public function rollBack(): void } + /** + * Executes callback inside a transaction. + */ public function transaction(callable $callback): mixed { if ($this->transactionDepth === 0) { @@ -264,6 +297,16 @@ public function fetch(#[Language('SQL')] string $sql, #[Language('GenericSQL')] } + /** + * Shortcut for query()->fetchAssoc() + * @param literal-string $sql + */ + public function fetchAssoc(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array + { + return $this->query($sql, ...$params)->fetchAssoc(); + } + + /** * Shortcut for query()->fetchField() * @param literal-string $sql @@ -275,12 +318,22 @@ public function fetchField(#[Language('SQL')] string $sql, #[Language('GenericSQ /** - * Shortcut for query()->fetchFields() + * Shortcut for query()->fetchList() + * @param literal-string $sql + */ + public function fetchList(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array + { + return $this->query($sql, ...$params)->fetchList(); + } + + + /** + * Shortcut for query()->fetchList() * @param literal-string $sql */ public function fetchFields(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array { - return $this->query($sql, ...$params)->fetchFields(); + return $this->query($sql, ...$params)->fetchList(); } @@ -304,6 +357,9 @@ public function fetchAll(#[Language('SQL')] string $sql, #[Language('GenericSQL' } + /** + * Creates SQL literal value. + */ public static function literal(string $value, ...$params): SqlLiteral { return new SqlLiteral($value, $params); diff --git a/app/vendor/nette/database/src/Database/Conventions.php b/app/vendor/nette/database/src/Database/Conventions.php index 3e7a68710..69dcb1b72 100644 --- a/app/vendor/nette/database/src/Database/Conventions.php +++ b/app/vendor/nette/database/src/Database/Conventions.php @@ -12,6 +12,9 @@ use Nette\Database\Conventions\AmbiguousReferenceKeyException; +/** + * Provides naming conventions for database tables and columns. + */ interface Conventions { /** diff --git a/app/vendor/nette/database/src/Database/Conventions/DiscoveredConventions.php b/app/vendor/nette/database/src/Database/Conventions/DiscoveredConventions.php index 272b942ac..774b4b83c 100644 --- a/app/vendor/nette/database/src/Database/Conventions/DiscoveredConventions.php +++ b/app/vendor/nette/database/src/Database/Conventions/DiscoveredConventions.php @@ -14,7 +14,7 @@ /** - * Conventions based on database structure. + * Discovers database conventions based on table structure metadata. */ class DiscoveredConventions implements Conventions { diff --git a/app/vendor/nette/database/src/Database/Conventions/StaticConventions.php b/app/vendor/nette/database/src/Database/Conventions/StaticConventions.php index 0f6cc4450..6344453c6 100644 --- a/app/vendor/nette/database/src/Database/Conventions/StaticConventions.php +++ b/app/vendor/nette/database/src/Database/Conventions/StaticConventions.php @@ -13,7 +13,7 @@ /** - * Conventions based on static definition. + * Defines naming conventions for database structure using static patterns. */ class StaticConventions implements Conventions { diff --git a/app/vendor/nette/database/src/Database/Driver.php b/app/vendor/nette/database/src/Database/Driver.php index 030674007..8ade59077 100644 --- a/app/vendor/nette/database/src/Database/Driver.php +++ b/app/vendor/nette/database/src/Database/Driver.php @@ -11,7 +11,7 @@ /** - * Supplemental PDO database driver. + * Provides database-specific functionality. */ interface Driver { @@ -19,7 +19,7 @@ interface Driver SupportSequence = 'sequence', SupportSelectUngroupedColumns = 'ungrouped_cols', SupportMultiInsertAsSelect = 'insert_as_select', - SupportMultiColumnAsOrCond = 'multi_column_as_or', + SupportMultiColumnAsOrCondition = 'multi_column_as_or', SupportSubselect = 'subselect', SupportSchema = 'schema'; @@ -32,6 +32,12 @@ interface Driver SUPPORT_SUBSELECT = 'subselect', SUPPORT_SCHEMA = 'schema'; + /** + * Checks if the engine supports a specific feature. + * @param self::Support* $feature + */ + function isSupported(string $feature): bool; + /** * Initializes connection. */ @@ -42,43 +48,47 @@ function initialize(Connection $connection, array $options): void; */ function convertException(\PDOException $e): DriverException; - /** - * Delimites identifier for use in a SQL statement. - */ + /********************* SQL utilities ****************d*g**/ + + /** Adds delimiters around database identifier. */ function delimite(string $name): string; - /** - * Formats date-time for use in a SQL statement. - */ + /** Formats a date-time value for use in an SQL statement. */ function formatDateTime(\DateTimeInterface $value): string; - /** - * Formats date-time interval for use in a SQL statement. - */ + /** Formats a date-time interval for use in an SQL statement. */ function formatDateInterval(\DateInterval $value): string; - /** - * Encodes string for use in a LIKE statement. - */ + /** Encodes string for use in a LIKE statement. */ function formatLike(string $value, int $pos): string; - /** - * Injects LIMIT/OFFSET to the SQL query. - */ + /** Applies LIMIT and OFFSET clauses to an SQL query. */ function applyLimit(string &$sql, ?int $limit, ?int $offset): void; /********************* reflection ****************d*g**/ - /** @return list */ + /** + * Returns a list of all tables in the database. + * @return list + */ function getTables(): array; - /** @return list */ + /** + * Returns metadata for all columns in a table. + * @return list + */ function getColumns(string $table): array; - /** @return list, unique: bool, primary: bool}> */ + /** + * Returns metadata for all indexes in a table. + * @return list, unique: bool, primary: bool}> + */ function getIndexes(string $table): array; - /** @return list */ + /** + * Returns metadata for all foreign keys in a table. + * @return list + */ function getForeignKeys(string $table): array; /** @@ -86,12 +96,6 @@ function getForeignKeys(string $table): array; * @return array */ function getColumnTypes(\PDOStatement $statement): array; - - /** - * Cheks if driver supports specific property - * @param self::Support* $item - */ - function isSupported(string $item): bool; } diff --git a/app/vendor/nette/database/src/Database/Drivers/MsSqlDriver.php b/app/vendor/nette/database/src/Database/Drivers/MsSqlDriver.php index 4ef886921..3509cb434 100644 --- a/app/vendor/nette/database/src/Database/Drivers/MsSqlDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/MsSqlDriver.php @@ -26,6 +26,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportSubselect; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { return Nette\Database\DriverException::from($e); @@ -216,10 +222,4 @@ public function getColumnTypes(\PDOStatement $statement): array { return Nette\Database\Helpers::detectTypes($statement); } - - - public function isSupported(string $item): bool - { - return $item === self::SupportSubselect; - } } diff --git a/app/vendor/nette/database/src/Database/Drivers/MySqlDriver.php b/app/vendor/nette/database/src/Database/Drivers/MySqlDriver.php index cca8735b4..9fab9c3ea 100644 --- a/app/vendor/nette/database/src/Database/Drivers/MySqlDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/MySqlDriver.php @@ -48,6 +48,16 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + // MULTI_COLUMN_AS_OR_COND due to mysql bugs: + // - http://bugs.mysql.com/bug.php?id=31188 + // - http://bugs.mysql.com/bug.php?id=35819 + // and more. + return $feature === self::SupportSelectUngroupedColumns || $feature === self::SupportMultiColumnAsOrCondition; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { $code = $e->errorInfo[1] ?? null; @@ -211,14 +221,4 @@ public function getColumnTypes(\PDOStatement $statement): array return $types; } - - - public function isSupported(string $item): bool - { - // MULTI_COLUMN_AS_OR_COND due to mysql bugs: - // - http://bugs.mysql.com/bug.php?id=31188 - // - http://bugs.mysql.com/bug.php?id=35819 - // and more. - return $item === self::SupportSelectUngroupedColumns || $item === self::SupportMultiColumnAsOrCond; - } } diff --git a/app/vendor/nette/database/src/Database/Drivers/OciDriver.php b/app/vendor/nette/database/src/Database/Drivers/OciDriver.php index 6f5fc7e57..ba48033ca 100644 --- a/app/vendor/nette/database/src/Database/Drivers/OciDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/OciDriver.php @@ -28,6 +28,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportSequence || $feature === self::SupportSubselect; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { $code = $e->errorInfo[1] ?? null; @@ -133,10 +139,4 @@ public function getColumnTypes(\PDOStatement $statement): array { return []; } - - - public function isSupported(string $item): bool - { - return $item === self::SupportSequence || $item === self::SupportSubselect; - } } diff --git a/app/vendor/nette/database/src/Database/Drivers/OdbcDriver.php b/app/vendor/nette/database/src/Database/Drivers/OdbcDriver.php index 078a202cc..d687fc915 100644 --- a/app/vendor/nette/database/src/Database/Drivers/OdbcDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/OdbcDriver.php @@ -22,6 +22,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportSubselect; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { return Nette\Database\DriverException::from($e); @@ -104,10 +110,4 @@ public function getColumnTypes(\PDOStatement $statement): array { return []; } - - - public function isSupported(string $item): bool - { - return $item === self::SupportSubselect; - } } diff --git a/app/vendor/nette/database/src/Database/Drivers/PgSqlDriver.php b/app/vendor/nette/database/src/Database/Drivers/PgSqlDriver.php index bda0fce9a..f2f8ebe1b 100644 --- a/app/vendor/nette/database/src/Database/Drivers/PgSqlDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/PgSqlDriver.php @@ -26,6 +26,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportSequence || $feature === self::SupportSubselect || $feature === self::SupportSchema; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { $code = $e->errorInfo[0] ?? null; @@ -244,12 +250,6 @@ public function getColumnTypes(\PDOStatement $statement): array } - public function isSupported(string $item): bool - { - return $item === self::SupportSequence || $item === self::SupportSubselect || $item === self::SupportSchema; - } - - /** * Converts: schema.name => "schema"."name" */ diff --git a/app/vendor/nette/database/src/Database/Drivers/SqliteDriver.php b/app/vendor/nette/database/src/Database/Drivers/SqliteDriver.php index 801329fb7..db886de85 100644 --- a/app/vendor/nette/database/src/Database/Drivers/SqliteDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/SqliteDriver.php @@ -28,6 +28,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportMultiInsertAsSelect || $feature === self::SupportSubselect || $feature === self::SupportMultiColumnAsOrCondition; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { $code = $e->errorInfo[1] ?? null; @@ -243,10 +249,4 @@ public function getColumnTypes(\PDOStatement $statement): array return $types; } - - - public function isSupported(string $item): bool - { - return $item === self::SupportMultiInsertAsSelect || $item === self::SupportSubselect || $item === self::SupportMultiColumnAsOrCond; - } } diff --git a/app/vendor/nette/database/src/Database/Drivers/SqlsrvDriver.php b/app/vendor/nette/database/src/Database/Drivers/SqlsrvDriver.php index f5e45b360..e34a50bb3 100644 --- a/app/vendor/nette/database/src/Database/Drivers/SqlsrvDriver.php +++ b/app/vendor/nette/database/src/Database/Drivers/SqlsrvDriver.php @@ -26,6 +26,12 @@ public function initialize(Nette\Database\Connection $connection, array $options } + public function isSupported(string $feature): bool + { + return $feature === self::SupportSubselect; + } + + public function convertException(\PDOException $e): Nette\Database\DriverException { return Nette\Database\DriverException::from($e); @@ -234,10 +240,4 @@ public function getColumnTypes(\PDOStatement $statement): array return $types; } - - - public function isSupported(string $item): bool - { - return $item === self::SupportSubselect; - } } diff --git a/app/vendor/nette/database/src/Database/Explorer.php b/app/vendor/nette/database/src/Database/Explorer.php index 06481f8c3..7a8ec3ef9 100644 --- a/app/vendor/nette/database/src/Database/Explorer.php +++ b/app/vendor/nette/database/src/Database/Explorer.php @@ -15,7 +15,7 @@ /** - * Database explorer. + * Provides high-level database layer with ActiveRow pattern. */ class Explorer { @@ -79,6 +79,9 @@ public function queryArgs(string $sql, array $params): ResultSet } + /** + * Returns table selection. + */ public function table(string $table): Table\Selection { return new Table\Selection($this, $this->conventions, $table, $this->cacheStorage); @@ -116,6 +119,16 @@ public function fetch(#[Language('SQL')] string $sql, #[Language('GenericSQL')] } + /** + * Shortcut for query()->fetchAssoc() + * @param literal-string $sql + */ + public function fetchAssoc(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array + { + return $this->connection->query($sql, ...$params)->fetchAssoc(); + } + + /** * Shortcut for query()->fetchField() * @param literal-string $sql @@ -127,12 +140,22 @@ public function fetchField(#[Language('SQL')] string $sql, #[Language('GenericSQ /** - * Shortcut for query()->fetchFields() + * Shortcut for query()->fetchList() + * @param literal-string $sql + */ + public function fetchList(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array + { + return $this->connection->query($sql, ...$params)->fetchList(); + } + + + /** + * Shortcut for query()->fetchList() * @param literal-string $sql */ public function fetchFields(#[Language('SQL')] string $sql, #[Language('GenericSQL')] ...$params): ?array { - return $this->connection->query($sql, ...$params)->fetchFields(); + return $this->connection->query($sql, ...$params)->fetchList(); } @@ -156,6 +179,9 @@ public function fetchAll(#[Language('SQL')] string $sql, #[Language('GenericSQL' } + /** + * Creates SQL literal value. + */ public static function literal(string $value, ...$params): SqlLiteral { return new SqlLiteral($value, $params); diff --git a/app/vendor/nette/database/src/Database/Helpers.php b/app/vendor/nette/database/src/Database/Helpers.php index 01d5c09bd..7e6e69ebe 100644 --- a/app/vendor/nette/database/src/Database/Helpers.php +++ b/app/vendor/nette/database/src/Database/Helpers.php @@ -15,7 +15,7 @@ /** - * Database helpers. + * Database utility functions. */ class Helpers { @@ -38,7 +38,7 @@ class Helpers /** - * Displays complete result set as HTML table for debug purposes. + * Displays result set as HTML table. */ public static function dumpResult(ResultSet $result): void { @@ -164,7 +164,7 @@ public static function dumpSql(string $sql, ?array $params = null, ?Connection $ /** - * Common column type detection. + * Returns column types from result set. */ public static function detectTypes(\PDOStatement $statement): array { @@ -182,7 +182,7 @@ public static function detectTypes(\PDOStatement $statement): array /** - * Heuristic column type detection. + * Detects column type from native type. * @internal */ public static function detectType(string $type): string @@ -216,9 +216,6 @@ public static function normalizeRow( $row[$key] = is_float($tmp = $value * 1) ? $value : $tmp; } elseif ($type === IStructure::FIELD_FLOAT || $type === IStructure::FIELD_DECIMAL) { - if (is_string($value) && str_starts_with($value, '.')) { - $value = '0' . $value; - } $row[$key] = (float) $value; } elseif ($type === IStructure::FIELD_BOOL) { @@ -248,9 +245,10 @@ public static function normalizeRow( /** - * Import SQL dump from file - extremely fast. - * @param ?array $onProgress - * @return int count of commands + * Imports SQL dump from file. + * @param ?array $onProgress Called after each query + * @return int Number of executed commands + * @throws Nette\FileNotFoundException */ public static function loadFromFile(Connection $connection, string $file, ?callable $onProgress = null): int { @@ -325,7 +323,7 @@ public static function initializeTracy( /** - * Reformat source to key -> value pairs. + * Converts rows to key-value pairs. */ public static function toPairs(array $rows, string|int|\Closure|null $key, string|int|null $value): array { @@ -369,7 +367,7 @@ public static function toPairs(array $rows, string|int|\Closure|null $key, strin /** - * Finds duplicate columns in select statement + * Returns duplicate columns from result set. */ public static function findDuplicates(\PDOStatement $statement): string { diff --git a/app/vendor/nette/database/src/Database/Reflection.php b/app/vendor/nette/database/src/Database/Reflection.php index bc288b091..7b6cdc2d1 100644 --- a/app/vendor/nette/database/src/Database/Reflection.php +++ b/app/vendor/nette/database/src/Database/Reflection.php @@ -12,6 +12,9 @@ use Nette\Database\Reflection\Table; +/** + * Provides database schema reflection. + */ final class Reflection { /** @var array */ @@ -32,6 +35,10 @@ public function getTables(): array } + /** + * Returns table metadata. + * @throws \InvalidArgumentException if table does not exist + */ public function getTable(string $name): Table { $name = $this->getFullName($name); diff --git a/app/vendor/nette/database/src/Database/Reflection/Column.php b/app/vendor/nette/database/src/Database/Reflection/Column.php index 48eaa87c7..871f8267d 100644 --- a/app/vendor/nette/database/src/Database/Reflection/Column.php +++ b/app/vendor/nette/database/src/Database/Reflection/Column.php @@ -11,7 +11,7 @@ /** - * Column reflection. + * Database table column metadata. */ final class Column { diff --git a/app/vendor/nette/database/src/Database/Reflection/ForeignKey.php b/app/vendor/nette/database/src/Database/Reflection/ForeignKey.php index a4808ae40..3f59afbb3 100644 --- a/app/vendor/nette/database/src/Database/Reflection/ForeignKey.php +++ b/app/vendor/nette/database/src/Database/Reflection/ForeignKey.php @@ -11,7 +11,7 @@ /** - * Foreign key reflection. + * Database foreign key relationship. */ final class ForeignKey { diff --git a/app/vendor/nette/database/src/Database/Reflection/Index.php b/app/vendor/nette/database/src/Database/Reflection/Index.php index f54898d5d..3ddbe7ea3 100644 --- a/app/vendor/nette/database/src/Database/Reflection/Index.php +++ b/app/vendor/nette/database/src/Database/Reflection/Index.php @@ -11,7 +11,7 @@ /** - * Index reflection. + * Database table index. */ final class Index { diff --git a/app/vendor/nette/database/src/Database/Reflection/Table.php b/app/vendor/nette/database/src/Database/Reflection/Table.php index d4beb4cc3..2c20b4801 100644 --- a/app/vendor/nette/database/src/Database/Reflection/Table.php +++ b/app/vendor/nette/database/src/Database/Reflection/Table.php @@ -13,7 +13,7 @@ /** - * Table reflection. + * Database table structure. */ final class Table { @@ -39,6 +39,10 @@ public function __construct( } + /** + * Returns column object or throws exception if column doesn't exist. + * @throws \InvalidArgumentException + */ public function getColumn(string $name): Column { return $this->columns[$name] ?? throw new \InvalidArgumentException("Column '$name' not found in table '$this->name'."); diff --git a/app/vendor/nette/database/src/Database/ResultSet.php b/app/vendor/nette/database/src/Database/ResultSet.php index e79484118..14d3dca13 100644 --- a/app/vendor/nette/database/src/Database/ResultSet.php +++ b/app/vendor/nette/database/src/Database/ResultSet.php @@ -10,11 +10,12 @@ namespace Nette\Database; use Nette; +use Nette\Utils\Arrays; use PDO; /** - * Represents a result set. + * Represents a database result set. */ class ResultSet implements \Iterator, IRowContainer { @@ -72,9 +73,7 @@ public function getConnection(): Connection } - /** - * @internal - */ + /** @internal */ public function getPdoStatement(): ?\PDOStatement { return $this->pdoStatement; @@ -131,7 +130,7 @@ public function normalizeRow(array $row): array /** - * Displays complete result set as HTML table for debug purposes. + * Displays result set as HTML table. */ public function dump(): void { @@ -178,11 +177,18 @@ public function valid(): bool } + /********************* fetch ****************d*g**/ + + /** - * Fetches single row object. + * Returns the next row as an associative array or null if there are no more rows. */ - public function fetch(): ?Row + public function fetchAssoc(?string $path = null): ?array { + if ($path !== null) { + return Arrays::associate($this->fetchAll(), $path); + } + $data = $this->pdoStatement ? $this->pdoStatement->fetch() : null; if (!$data) { $this->pdoStatement->closeCursor(); @@ -193,40 +199,56 @@ public function fetch(): ?Row trigger_error("Found duplicate columns in database result set: $duplicates."); } - $row = new Row; - foreach ($this->normalizeRow($data) as $key => $value) { - if ($key !== '') { - $row->$key = $value; - } + return $this->normalizeRow($data); + } + + + /** + * Returns the next row as an object Row or null if there are no more rows. + */ + public function fetch(): ?Row + { + $data = $this->fetchAssoc(); + if ($data === null) { + return null; } $this->lastRowKey++; - return $this->lastRow = $row; + return $this->lastRow = Arrays::toObject($data, new Row); } /** - * Fetches single field. + * Returns the first field of the next row or null if there are no more rows. */ public function fetchField(): mixed { - $row = $this->fetch(); - return $row ? $row[0] : null; + $row = $this->fetchAssoc(); + return $row ? reset($row) : null; + } + + + /** + * Returns the next row as indexed array or null if there are no more rows. + */ + public function fetchList(): ?array + { + $row = $this->fetchAssoc(); + return $row ? array_values($row) : null; } /** - * Fetches array of fields. + * Alias for fetchList(). */ public function fetchFields(): ?array { - $row = $this->fetch(); - return $row ? array_values((array) $row) : null; + return $this->fetchList(); } /** - * Fetches all rows as associative array. + * Returns all rows as associative array. */ public function fetchPairs(string|int|\Closure|null $keyOrCallback = null, string|int|null $value = null): array { @@ -235,7 +257,7 @@ public function fetchPairs(string|int|\Closure|null $keyOrCallback = null, strin /** - * Fetches all rows. + * Returns all rows. * @return Row[] */ public function fetchAll(): array @@ -243,13 +265,4 @@ public function fetchAll(): array $this->rows ??= iterator_to_array($this); return $this->rows; } - - - /** - * Fetches all rows and returns associative tree. - */ - public function fetchAssoc(string $path): array - { - return Nette\Utils\Arrays::associate($this->fetchAll(), $path); - } } diff --git a/app/vendor/nette/database/src/Database/Row.php b/app/vendor/nette/database/src/Database/Row.php index 38bad424c..ce21ae677 100644 --- a/app/vendor/nette/database/src/Database/Row.php +++ b/app/vendor/nette/database/src/Database/Row.php @@ -13,7 +13,7 @@ /** - * Represents a single table row. + * Represents a single database table row. */ class Row extends Nette\Utils\ArrayHash implements IRow { diff --git a/app/vendor/nette/database/src/Database/SqlLiteral.php b/app/vendor/nette/database/src/Database/SqlLiteral.php index 7c8227c60..b95b0ed3d 100644 --- a/app/vendor/nette/database/src/Database/SqlLiteral.php +++ b/app/vendor/nette/database/src/Database/SqlLiteral.php @@ -11,7 +11,7 @@ /** - * SQL literal value. + * SQL literal that will not be escaped. */ class SqlLiteral { diff --git a/app/vendor/nette/database/src/Database/SqlPreprocessor.php b/app/vendor/nette/database/src/Database/SqlPreprocessor.php index 876ef3ca3..53e733eb2 100644 --- a/app/vendor/nette/database/src/Database/SqlPreprocessor.php +++ b/app/vendor/nette/database/src/Database/SqlPreprocessor.php @@ -13,7 +13,7 @@ /** - * SQL preprocessor. + * Processes SQL queries with parameter substitution. */ class SqlPreprocessor { @@ -67,7 +67,7 @@ public function __construct(Connection $connection) /** - * @return array of [sql, params] + * @return array{string, array} */ public function process(array $params, bool $useParams = false): array { @@ -318,6 +318,9 @@ private function formatValue(mixed $value, ?string $mode = null): string } + /** + * Adds delimiters around database identifier. + */ private function delimite(string $name): string { return implode('.', array_map($this->driver->delimite(...), explode('.', $name))); diff --git a/app/vendor/nette/database/src/Database/Structure.php b/app/vendor/nette/database/src/Database/Structure.php index bd5b7a3ce..72a663007 100644 --- a/app/vendor/nette/database/src/Database/Structure.php +++ b/app/vendor/nette/database/src/Database/Structure.php @@ -13,7 +13,7 @@ /** - * Cached reflection of database structure. + * Provides database structure metadata with caching. */ class Structure implements IStructure { @@ -152,6 +152,9 @@ public function getBelongsToReference(string $table, ?string $column = null): ?a } + /** + * Rebuilds structure cache. + */ public function rebuild(): void { $this->structure = $this->loadStructure(); @@ -175,6 +178,9 @@ protected function needStructure(): void } + /** + * Loads complete structure from database. + */ protected function loadStructure(): array { $driver = $this->connection->getDriver(); @@ -254,6 +260,9 @@ protected function analyzeForeignKeys(array &$structure, string $table): void } + /** + * Returns normalized table name. + */ protected function resolveFQTableName(string $table): string { $name = strtolower($table); diff --git a/app/vendor/nette/database/src/Database/Table/ActiveRow.php b/app/vendor/nette/database/src/Database/Table/ActiveRow.php index 91778c96a..35e0b235e 100644 --- a/app/vendor/nette/database/src/Database/Table/ActiveRow.php +++ b/app/vendor/nette/database/src/Database/Table/ActiveRow.php @@ -13,7 +13,7 @@ /** - * Single row representation. + * Represents database row with support for relations. * ActiveRow is based on the great library NotORM http://www.notorm.com written by Jakub Vrana. */ class ActiveRow implements \IteratorAggregate, IRow @@ -28,18 +28,14 @@ public function __construct( } - /** - * @internal - */ + /** @internal */ public function setTable(Selection $table): void { $this->table = $table; } - /** - * @internal - */ + /** @internal */ public function getTable(): Selection { return $this->table; @@ -97,7 +93,7 @@ public function getPrimary(bool $throw = true): mixed /** - * Returns row signature (composition of primary keys) + * Returns row signature (composition of primary keys). */ public function getSignature(bool $throw = true): string { @@ -121,7 +117,7 @@ public function ref(string $key, ?string $throughColumn = null): ?self /** - * Returns referencing rows. + * Returns referencing rows collection. */ public function related(string $key, ?string $throughColumn = null): GroupedSelection { @@ -135,7 +131,7 @@ public function related(string $key, ?string $throughColumn = null): GroupedSele /** - * Updates row. + * Updates row data. */ public function update(iterable $data): bool { @@ -171,7 +167,7 @@ public function update(iterable $data): bool /** - * Deletes row. + * Deletes row from database. * @return int number of affected rows */ public function delete(): int @@ -201,41 +197,24 @@ public function getIterator(): \Iterator /********************* interface ArrayAccess & magic accessors ****************d*g**/ - /** - * Stores value in column. - * @param string $column - * @param mixed $value - */ public function offsetSet($column, $value): void { $this->__set($column, $value); } - /** - * Returns value of column. - * @param string $column - */ public function offsetGet($column): mixed { return $this->__get($column); } - /** - * Tests if column exists. - * @param string $column - */ public function offsetExists($column): bool { return $this->__isset($column); } - /** - * Removes column from data. - * @param string $column - */ public function offsetUnset($column): void { $this->__unset($column); @@ -293,9 +272,7 @@ public function __unset(string $key): void } - /** - * @internal - */ + /** @internal */ public function accessColumn(?string $key, bool $selectColumn = true): bool { if ($this->table->accessColumn($key, $selectColumn) && !$this->dataRefreshed) { diff --git a/app/vendor/nette/database/src/Database/Table/GroupedSelection.php b/app/vendor/nette/database/src/Database/Table/GroupedSelection.php index 507ac298a..6e9f4c160 100644 --- a/app/vendor/nette/database/src/Database/Table/GroupedSelection.php +++ b/app/vendor/nette/database/src/Database/Table/GroupedSelection.php @@ -15,7 +15,7 @@ /** - * Representation of filtered table grouped by some column. + * Represents filtered table grouped by referencing table. * GroupedSelection is based on the great library NotORM http://www.notorm.com written by Jakub Vrana. */ class GroupedSelection extends Selection @@ -86,6 +86,9 @@ public function order(string $columns, ...$params): static /********************* aggregations ****************d*g**/ + /** + * Calculates aggregation for this group. + */ public function aggregation(string $function, ?string $groupFunction = null): mixed { $aggregation = &$this->getRefTable($refPath)->aggregation[$refPath . $function . $this->sqlBuilder->getSelectQueryHash($this->getPreviousAccessedColumns())]; diff --git a/app/vendor/nette/database/src/Database/Table/Selection.php b/app/vendor/nette/database/src/Database/Table/Selection.php index da410b9c9..081d839ff 100644 --- a/app/vendor/nette/database/src/Database/Table/Selection.php +++ b/app/vendor/nette/database/src/Database/Table/Selection.php @@ -15,7 +15,7 @@ /** - * Filtered table representation. + * Represents filtered table result. * Selection is based on the great library NotORM http://www.notorm.com written by Jakub Vrana. * @template T of ActiveRow * @implements \Iterator @@ -40,10 +40,10 @@ class Selection implements \Iterator, IRowContainer, \ArrayAccess, \Countable /** primary column sequence name, false for autodetection */ protected string|bool|null $primarySequence = false; - /** @var ActiveRow[]|null data read from database in [primary key => ActiveRow] format */ + /** @var array|null data read from database in [primary key => ActiveRow] format */ protected ?array $rows = null; - /** @var ActiveRow[]|null modifiable data in [primary key => ActiveRow] format */ + /** @var array|null modifiable data in [primary key => ActiveRow] format */ protected ?array $data = null; protected bool $dataRefreshed = false; @@ -108,6 +108,7 @@ public function getName(): string /** + * Returns table primary key. * @return string|string[]|null */ public function getPrimary(bool $throw = true): string|array|null @@ -172,7 +173,7 @@ public function getSqlBuilder(): SqlBuilder /** * Returns row specified by primary key. - * @return T + * @return T|null */ public function get(mixed $key): ?ActiveRow { @@ -182,8 +183,8 @@ public function get(mixed $key): ?ActiveRow /** - * Fetches single row object. - * @return T + * Fetches next row of result. + * @return T|null */ public function fetch(): ?ActiveRow { @@ -233,7 +234,7 @@ public function fetchAll(): array /** - * Fetches all rows and returns associative tree. + * Returns all rows as associative tree. */ public function fetchAssoc(string $path): array { @@ -246,7 +247,7 @@ public function fetchAssoc(string $path): array /** - * Adds select clause, more calls appends to the end. + * Adds select clause, more calls append to the end. * @param string $columns for example "column, MD5(column) AS column_md5" */ public function select(string $columns, ...$params): static @@ -281,7 +282,7 @@ public function wherePrimary(mixed $key): static /** - * Adds where condition, more calls appends with AND. + * Adds where condition, more calls append with AND. * @param string|array $condition possibly containing ? */ public function where(string|array $condition, ...$params): static @@ -363,7 +364,7 @@ public function whereOr(array $parameters): static /** - * Adds order clause, more calls appends to the end. + * Adds ORDER BY clause, more calls appends to the end. * @param string $columns for example 'column1, column2 DESC' */ public function order(string $columns, ...$params): static @@ -375,7 +376,7 @@ public function order(string $columns, ...$params): static /** - * Sets limit clause, more calls rewrite old values. + * Sets LIMIT clause, more calls rewrite old values. */ public function limit(?int $limit, ?int $offset = null): static { @@ -386,7 +387,7 @@ public function limit(?int $limit, ?int $offset = null): static /** - * Sets offset using page number, more calls rewrite old values. + * Sets OFFSET using page number, more calls rewrite old values. */ public function page(int $page, int $itemsPerPage, &$numOfPages = null): static { @@ -403,7 +404,7 @@ public function page(int $page, int $itemsPerPage, &$numOfPages = null): static /** - * Sets group clause, more calls rewrite old value. + * Sets GROUP BY clause, more calls rewrite old value. */ public function group(string $columns, ...$params): static { @@ -414,7 +415,7 @@ public function group(string $columns, ...$params): static /** - * Sets having clause, more calls rewrite old value. + * Sets HAVING clause, more calls rewrite old value. */ public function having(string $having, ...$params): static { @@ -765,7 +766,7 @@ public function getDataRefreshed(): bool /** * Inserts row in a table. Returns ActiveRow or number of affected rows for Selection or table without primary key. - * @param iterable|Selection $data [$column => $value]|\Traversable|Selection for INSERT ... SELECT + * @param iterable|Selection $data * @return T|array|int|bool */ public function insert(iterable $data): ActiveRow|array|int|bool diff --git a/app/vendor/nette/database/src/Database/Table/SqlBuilder.php b/app/vendor/nette/database/src/Database/Table/SqlBuilder.php index 4db2d3f09..6b0c198b8 100644 --- a/app/vendor/nette/database/src/Database/Table/SqlBuilder.php +++ b/app/vendor/nette/database/src/Database/Table/SqlBuilder.php @@ -235,6 +235,9 @@ public function importGroupConditions(self $builder): bool /********************* SQL selectors ****************d*g**/ + /** + * Adds SELECT clause, more calls append to the end. + */ public function addSelect(string $columns, ...$params): void { $this->select[] = $columns; @@ -255,12 +258,18 @@ public function resetSelect(): void } + /** + * Adds WHERE condition, more calls append with AND. + */ public function addWhere(string|array $condition, ...$params): bool { return $this->addCondition($condition, $params, $this->where, $this->parameters['where']); } + /** + * Adds JOIN condition. + */ public function addJoinCondition(string $tableChain, string|array $condition, ...$params): bool { $this->parameters['joinConditionSorted'] = null; @@ -409,7 +418,7 @@ public function getConditions(): array /** - * Adds alias. + * Adds alias AS. */ public function addAlias(string $chain, string $alias): void { @@ -440,6 +449,9 @@ protected function checkUniqueTableName(string $tableName, string $chain): void } + /** + * Adds ORDER BY clause, more calls append to the end. + */ public function addOrder(string|array $columns, ...$params): void { $this->order[] = $columns; @@ -460,6 +472,9 @@ public function getOrder(): array } + /** + * Sets LIMIT/OFFSET clause. + */ public function setLimit(?int $limit, ?int $offset): void { $this->limit = $limit; @@ -479,6 +494,9 @@ public function getOffset(): ?int } + /** + * Sets GROUP BY and HAVING clause. + */ public function setGroup(string|array $columns, ...$params): void { $this->group = $columns; @@ -808,7 +826,7 @@ protected function addConditionComposition( array &$conditionsParameters, ): bool { - if ($this->driver->isSupported(Driver::SupportMultiColumnAsOrCond)) { + if ($this->driver->isSupported(Driver::SupportMultiColumnAsOrCondition)) { $conditionFragment = '(' . implode(' = ? AND ', $columns) . ' = ?) OR '; $condition = substr(str_repeat($conditionFragment, count($parameters)), 0, -4); return $this->addCondition($condition, [Nette\Utils\Arrays::flatten($parameters)], $conditions, $conditionsParameters); diff --git a/app/vendor/nette/database/src/Database/exceptions.php b/app/vendor/nette/database/src/Database/exceptions.php index c968ef2b7..491b244a7 100644 --- a/app/vendor/nette/database/src/Database/exceptions.php +++ b/app/vendor/nette/database/src/Database/exceptions.php @@ -11,7 +11,7 @@ /** - * Server connection related errors. + * Failed to connect to the database server. */ class ConnectionException extends DriverException { @@ -19,7 +19,7 @@ class ConnectionException extends DriverException /** - * Base class for all constraint violation related exceptions. + * A database constraint was violated. */ class ConstraintViolationException extends DriverException { @@ -27,7 +27,7 @@ class ConstraintViolationException extends DriverException /** - * Exception for a foreign key constraint violation. + * The foreign key constraint check failed. */ class ForeignKeyConstraintViolationException extends ConstraintViolationException { @@ -35,7 +35,7 @@ class ForeignKeyConstraintViolationException extends ConstraintViolationExceptio /** - * Exception for a NOT NULL constraint violation. + * The NOT NULL constraint check failed. */ class NotNullConstraintViolationException extends ConstraintViolationException { @@ -43,7 +43,7 @@ class NotNullConstraintViolationException extends ConstraintViolationException /** - * Exception for a unique constraint violation. + * The unique constraint check failed. */ class UniqueConstraintViolationException extends ConstraintViolationException { diff --git a/app/vendor/nette/php-generator/composer.json b/app/vendor/nette/php-generator/composer.json index c7026efc1..cdd26cf65 100644 --- a/app/vendor/nette/php-generator/composer.json +++ b/app/vendor/nette/php-generator/composer.json @@ -1,6 +1,6 @@ { "name": "nette/php-generator", - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.3 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.4 features.", "keywords": ["nette", "php", "code", "scaffolding"], "homepage": "https://nette.org", "license": ["BSD-3-Clause", "GPL-2.0-only", "GPL-3.0-only"], diff --git a/app/vendor/nette/php-generator/readme.md b/app/vendor/nette/php-generator/readme.md index ba102dea4..ae6ef3270 100644 --- a/app/vendor/nette/php-generator/readme.md +++ b/app/vendor/nette/php-generator/readme.md @@ -8,7 +8,7 @@ Are you looking for a tool to generate PHP code for [classes](#classes), [functi

-✅ Supports all the latest PHP features like [enums](#enums), [attributes](#attributes), etc.
+✅ Supports all the latest PHP features like [property hooks](#property-hooks), [enums](#enums), [attributes](#attributes), etc.
✅ Allows you to easily modify [existing classes](#generating-from-existing-ones)
✅ Output compliant with [PSR-12 / PER coding style](#printer-and-psr-compliance)
✅ Highly mature, stable, and widely used library @@ -387,11 +387,11 @@ $method->addParameter('items', []) // $items = [] // function count(&$items = []) ``` -To define the so-called variadics parameters (or also the splat, spread, ellipsis, unpacking or three dots operator), use `setVariadics()`: +To define the so-called variadics parameters (or also the splat, spread, ellipsis, unpacking or three dots operator), use `setVariadic()`: ```php $method = $class->addMethod('count'); -$method->setVariadics(true); +$method->setVariadic(true); $method->addParameter('items'); ``` @@ -665,6 +665,89 @@ class Demo   +Property Hooks +-------------- + +You can also define property hooks (represented by the class [PropertyHook](https://api.nette.org/php-generator/master/Nette/PhpGenerator/PropertyHook.html)) for get and set operations, a feature introduced in PHP 8.4: + +```php +$class = new Nette\PhpGenerator\ClassType('Demo'); +$prop = $class->addProperty('firstName') + ->setType('string'); + +$prop->addHook('set', 'strtolower($value)') + ->addParameter('value') + ->setType('string'); + +$prop->addHook('get') + ->setBody('return ucfirst($this->firstName);'); + +echo $class; +``` + +This generates: + +```php +class Demo +{ + public string $firstName { + set(string $value) => strtolower($value); + get { + return ucfirst($this->firstName); + } + } +} +``` + +Properties and property hooks can be abstract or final: + +```php +$class->addProperty('id') + ->setType('int') + ->addHook('get') + ->setAbstract(); + +$class->addProperty('role') + ->setType('string') + ->addHook('set', 'strtolower($value)') + ->setFinal(); +``` + +  + +Asymmetric Visibility +--------------------- + +PHP 8.4 introduces asymmetric visibility for properties. You can set different access levels for reading and writing. +The visibility can be set using either the `setVisibility()` method with two parameters, or by using `setPublic()`, `setProtected()`, or `setPrivate()` with the `mode` parameter that specifies whether the visibility applies to getting or setting the property. The default mode is 'get'. + +```php +$class = new Nette\PhpGenerator\ClassType('Demo'); + +$class->addProperty('name') + ->setType('string') + ->setVisibility('public', 'private'); // public for read, private for write + +$class->addProperty('id') + ->setType('int') + ->setProtected('set'); // protected for write + +echo $class; +``` + +This generates: + +```php +class Demo +{ + public private(set) string $name; + + protected(set) int $id; +} +``` + +  + Namespace --------- @@ -902,10 +985,10 @@ $property = $manipulator->inheritProperty('foo'); $property->setValue('new value'); ``` -The `implementInterface()` method automatically implements all methods from the given interface in your class: +The `implement()` method automatically implements all methods and properties from the given interface or abstract class: ```php -$manipulator->implementInterface(SomeInterface::class); +$manipulator->implement(SomeInterface::class); // Now your class implements SomeInterface and includes all its methods ``` diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Attribute.php b/app/vendor/nette/php-generator/src/PhpGenerator/Attribute.php index 4da227b47..896f9473d 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Attribute.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Attribute.php @@ -13,7 +13,7 @@ /** - * PHP Attribute. + * Definition of a PHP attribute. */ final class Attribute { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/ClassLike.php b/app/vendor/nette/php-generator/src/PhpGenerator/ClassLike.php index 7be48d8a6..a5ad5e8f6 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/ClassLike.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/ClassLike.php @@ -13,26 +13,24 @@ /** - * Class/Interface/Trait/Enum description. + * Base definition of class, interface, trait or enum type. */ abstract class ClassLike { use Traits\CommentAware; use Traits\AttributeAware; - public const - VisibilityPublic = 'public', - VisibilityProtected = 'protected', - VisibilityPrivate = 'private'; + /** @deprecated use Visibility::Public */ + public const VisibilityPublic = Visibility::Public, + VISIBILITY_PUBLIC = Visibility::Public; - /** @deprecated use ClassLike::VisibilityPublic */ - public const VISIBILITY_PUBLIC = self::VisibilityPublic; + /** @deprecated use Visibility::Protected */ + public const VisibilityProtected = Visibility::Protected, + VISIBILITY_PROTECTED = Visibility::Protected; - /** @deprecated use ClassLike::VisibilityProtected */ - public const VISIBILITY_PROTECTED = self::VisibilityProtected; - - /** @deprecated use ClassLike::VisibilityPrivate */ - public const VISIBILITY_PRIVATE = self::VisibilityPrivate; + /** @deprecated use Visibility::Private */ + public const VisibilityPrivate = Visibility::Private, + VISIBILITY_PRIVATE = Visibility::Private; private ?PhpNamespace $namespace; private ?string $name; diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/ClassManipulator.php b/app/vendor/nette/php-generator/src/PhpGenerator/ClassManipulator.php index d97ee3195..867829585 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/ClassManipulator.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/ClassManipulator.php @@ -25,25 +25,25 @@ public function __construct( */ public function inheritProperty(string $name, bool $returnIfExists = false): Property { - $extends = $this->class->getExtends(); if ($this->class->hasProperty($name)) { return $returnIfExists ? $this->class->getProperty($name) : throw new Nette\InvalidStateException("Cannot inherit property '$name', because it already exists."); - - } elseif (!$extends) { - throw new Nette\InvalidStateException("Class '{$this->class->getName()}' has not setExtends() set."); } - try { - $rp = new \ReflectionProperty($extends, $name); - } catch (\ReflectionException) { - throw new Nette\InvalidStateException("Property '$name' has not been found in ancestor {$extends}"); + $parents = [...(array) $this->class->getExtends(), ...$this->class->getImplements()] + ?: throw new Nette\InvalidStateException("Class '{$this->class->getName()}' has neither setExtends() nor setImplements() set."); + + foreach ($parents as $parent) { + try { + $rp = new \ReflectionProperty($parent, $name); + } catch (\ReflectionException) { + continue; + } + return $this->implementProperty($rp); } - $property = (new Factory)->fromPropertyReflection($rp); - $this->class->addMember($property); - return $property; + throw new Nette\InvalidStateException("Property '$name' has not been found in any ancestor: " . implode(', ', $parents)); } @@ -52,25 +52,22 @@ public function inheritProperty(string $name, bool $returnIfExists = false): Pro */ public function inheritMethod(string $name, bool $returnIfExists = false): Method { - $parents = [...(array) $this->class->getExtends(), ...$this->class->getImplements()]; if ($this->class->hasMethod($name)) { return $returnIfExists ? $this->class->getMethod($name) : throw new Nette\InvalidStateException("Cannot inherit method '$name', because it already exists."); - - } elseif (!$parents) { - throw new Nette\InvalidStateException("Class '{$this->class->getName()}' has neither setExtends() nor setImplements() set."); } + $parents = [...(array) $this->class->getExtends(), ...$this->class->getImplements()] + ?: throw new Nette\InvalidStateException("Class '{$this->class->getName()}' has neither setExtends() nor setImplements() set."); + foreach ($parents as $parent) { try { $rm = new \ReflectionMethod($parent, $name); } catch (\ReflectionException) { continue; } - $method = (new Factory)->fromMethodReflection($rm); - $this->class->addMember($method); - return $method; + return $this->implementMethod($rm); } throw new Nette\InvalidStateException("Method '$name' has not been found in any ancestor: " . implode(', ', $parents)); @@ -78,18 +75,57 @@ public function inheritMethod(string $name, bool $returnIfExists = false): Metho /** - * Implements all methods from the given interface. + * Implements all methods from the given interface or abstract class. */ - public function implementInterface(string $interfaceName): void + public function implement(string $name): void { - $interface = new \ReflectionClass($interfaceName); - if (!$interface->isInterface()) { - throw new Nette\InvalidArgumentException("Class '$interfaceName' is not an interface."); + $definition = new \ReflectionClass($name); + if ($definition->isInterface()) { + $this->class->addImplement($name); + } elseif ($definition->isAbstract()) { + $this->class->setExtends($name); + } else { + throw new Nette\InvalidArgumentException("'$name' is not an interface or abstract class."); } - $this->class->addImplement($interfaceName); - foreach ($interface->getMethods() as $method) { - $this->inheritMethod($method->getName(), returnIfExists: true); + foreach ($definition->getMethods() as $method) { + if (!$this->class->hasMethod($method->getName()) && $method->isAbstract()) { + $this->implementMethod($method); + } + } + + if (PHP_VERSION_ID >= 80400) { + foreach ($definition->getProperties() as $property) { + if (!$this->class->hasProperty($property->getName()) && $property->isAbstract()) { + $this->implementProperty($property); + } + } } } + + + private function implementMethod(\ReflectionMethod $rm): Method + { + $method = (new Factory)->fromMethodReflection($rm); + $method->setAbstract(false); + $this->class->addMember($method); + return $method; + } + + + private function implementProperty(\ReflectionProperty $rp): Property + { + $property = (new Factory)->fromPropertyReflection($rp); + $property->setHooks([])->setAbstract(false); + $this->class->addMember($property); + return $property; + } + + + /** @deprecated use implement() */ + public function implementInterface(string $interfaceName): void + { + trigger_error(__METHOD__ . '() is deprecated, use implement()', E_USER_DEPRECATED); + $this->implement($interfaceName); + } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/ClassType.php b/app/vendor/nette/php-generator/src/PhpGenerator/ClassType.php index 4e082685e..8e04e24fb 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/ClassType.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/ClassType.php @@ -13,7 +13,7 @@ /** - * Class description. + * Definition of a class with properties, methods, constants, traits and PHP attributes. */ final class ClassType extends ClassLike { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Closure.php b/app/vendor/nette/php-generator/src/PhpGenerator/Closure.php index 843feedbe..49401e62a 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Closure.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Closure.php @@ -11,7 +11,7 @@ /** - * Closure. + * Definition of a closure. */ final class Closure { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Constant.php b/app/vendor/nette/php-generator/src/PhpGenerator/Constant.php index 44c1938c4..1e89d6e6c 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Constant.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Constant.php @@ -11,7 +11,7 @@ /** - * Class constant. + * Definition of a class constant. */ final class Constant { @@ -53,7 +53,8 @@ public function isFinal(): bool public function setType(?string $type): static { - $this->type = Helpers::validateType($type); + Helpers::validateType($type); + $this->type = $type; return $this; } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/EnumCase.php b/app/vendor/nette/php-generator/src/PhpGenerator/EnumCase.php index 36bfd2fc7..ee099b93b 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/EnumCase.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/EnumCase.php @@ -11,7 +11,7 @@ /** - * Enum case. + * Definition of an enum case. */ final class EnumCase { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/EnumType.php b/app/vendor/nette/php-generator/src/PhpGenerator/EnumType.php index 434561835..a4f472432 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/EnumType.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/EnumType.php @@ -13,7 +13,7 @@ /** - * Enum description. + * Definition of an enum with cases, methods, constants and traits. */ final class EnumType extends ClassLike { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php b/app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php index 5d39905e6..97d2f732a 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php @@ -11,6 +11,7 @@ use Nette; use PhpParser; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\NodeFinder; use PhpParser\ParserFactory; @@ -323,7 +324,7 @@ private function addPropertyToClass(ClassLike $class, Node\Stmt\Property $node): foreach ($node->props as $item) { $prop = $class->addProperty($item->name->toString()); $prop->setStatic($node->isStatic()); - $prop->setVisibility($this->toVisibility($node->flags)); + $prop->setVisibility($this->toVisibility($node->flags), $this->toSetterVisibility($node->flags)); $prop->setType($node->type ? $this->toPhp($node->type) : null); if ($item->default) { $prop->setValue($this->toValue($item->default)); @@ -331,6 +332,29 @@ private function addPropertyToClass(ClassLike $class, Node\Stmt\Property $node): $prop->setReadOnly((method_exists($node, 'isReadonly') && $node->isReadonly()) || ($class instanceof ClassType && $class->isReadOnly())); $this->addCommentAndAttributes($prop, $node); + + $prop->setAbstract((bool) ($node->flags & Node\Stmt\Class_::MODIFIER_ABSTRACT)); + $prop->setFinal((bool) ($node->flags & Node\Stmt\Class_::MODIFIER_FINAL)); + $this->addHooksToProperty($prop, $node); + } + } + + + private function addHooksToProperty(Property|PromotedParameter $prop, Node\Stmt\Property|Node\Param $node): void + { + if (!class_exists(Node\PropertyHook::class)) { + return; + } + + foreach ($node->hooks as $hookNode) { + $hook = $prop->addHook($hookNode->name->toString()); + $hook->setFinal((bool) ($hookNode->flags & Modifiers::FINAL)); + $this->setupFunction($hook, $hookNode); + if ($hookNode->body === null) { + $hook->setAbstract(); + } elseif (!is_array($hookNode->body)) { + $hook->setBody($this->getReformattedContents([$hookNode->body], 1), short: true); + } } } @@ -380,7 +404,7 @@ private function addFunctionToFile(PhpFile $phpFile, Node\Stmt\Function_ $node): private function addCommentAndAttributes( - PhpFile|ClassLike|Constant|Property|GlobalFunction|Method|Parameter|EnumCase|TraitUse $element, + PhpFile|ClassLike|Constant|Property|GlobalFunction|Method|Parameter|EnumCase|TraitUse|PropertyHook $element, Node $node, ): void { @@ -408,19 +432,29 @@ private function addCommentAndAttributes( } - private function setupFunction(GlobalFunction|Method $function, Node\FunctionLike $node): void + private function setupFunction(GlobalFunction|Method|PropertyHook $function, Node\FunctionLike $node): void { $function->setReturnReference($node->returnsByRef()); - $function->setReturnType($node->getReturnType() ? $this->toPhp($node->getReturnType()) : null); + if (!$function instanceof PropertyHook) { + $function->setReturnType($node->getReturnType() ? $this->toPhp($node->getReturnType()) : null); + } + foreach ($node->getParams() as $item) { - $visibility = $this->toVisibility($item->flags); - $isReadonly = (bool) ($item->flags & Node\Stmt\Class_::MODIFIER_READONLY); - $param = $visibility - ? ($function->addPromotedParameter($item->var->name))->setVisibility($visibility)->setReadonly($isReadonly) - : $function->addParameter($item->var->name); + $getVisibility = $this->toVisibility($item->flags); + $setVisibility = $this->toSetterVisibility($item->flags); + if ($getVisibility || $setVisibility) { + $param = $function->addPromotedParameter($item->var->name) + ->setVisibility($getVisibility, $setVisibility) + ->setReadonly((bool) ($item->flags & Node\Stmt\Class_::MODIFIER_READONLY)); + $this->addHooksToProperty($param, $item); + } else { + $param = $function->addParameter($item->var->name); + } $param->setType($item->type ? $this->toPhp($item->type) : null); $param->setReference($item->byRef); - $function->setVariadic($item->variadic); + if (!$function instanceof PropertyHook) { + $function->setVariadic($item->variadic); + } if ($item->default) { $param->setDefaultValue($this->toValue($item->default)); } @@ -483,9 +517,21 @@ private function toValue(Node\Expr $node): mixed private function toVisibility(int $flags): ?string { return match (true) { - (bool) ($flags & Node\Stmt\Class_::MODIFIER_PUBLIC) => ClassType::VisibilityPublic, - (bool) ($flags & Node\Stmt\Class_::MODIFIER_PROTECTED) => ClassType::VisibilityProtected, - (bool) ($flags & Node\Stmt\Class_::MODIFIER_PRIVATE) => ClassType::VisibilityPrivate, + (bool) ($flags & Node\Stmt\Class_::MODIFIER_PUBLIC) => Visibility::Public, + (bool) ($flags & Node\Stmt\Class_::MODIFIER_PROTECTED) => Visibility::Protected, + (bool) ($flags & Node\Stmt\Class_::MODIFIER_PRIVATE) => Visibility::Private, + default => null, + }; + } + + + private function toSetterVisibility(int $flags): ?string + { + return match (true) { + !class_exists(Node\PropertyHook::class) => null, + (bool) ($flags & Modifiers::PUBLIC_SET) => Visibility::Public, + (bool) ($flags & Modifiers::PROTECTED_SET) => Visibility::Protected, + (bool) ($flags & Modifiers::PRIVATE_SET) => Visibility::Private, default => null, }; } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Factory.php b/app/vendor/nette/php-generator/src/PhpGenerator/Factory.php index abc1f7639..12a5687d5 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Factory.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Factory.php @@ -199,9 +199,15 @@ public function fromCallable(callable $from): Method|GlobalFunction|Closure public function fromParameterReflection(\ReflectionParameter $from): Parameter { - $param = $from->isPromoted() - ? (new PromotedParameter($from->name))->setReadOnly(PHP_VERSION_ID >= 80100 && $from->getDeclaringClass()->getProperty($from->name)->isReadonly()) - : new Parameter($from->name); + if ($from->isPromoted()) { + $property = $from->getDeclaringClass()->getProperty($from->name); + $param = (new PromotedParameter($from->name)) + ->setVisibility($this->getVisibility($property)) + ->setReadOnly(PHP_VERSION_ID >= 80100 && $property->isReadonly()); + $this->addHooks($property, $param); + } else { + $param = new Parameter($from->name); + } $param->setReference($from->isPassedByReference()); $param->setType((string) $from->getType()); @@ -255,15 +261,58 @@ public function fromPropertyReflection(\ReflectionProperty $from): Property $prop->setStatic($from->isStatic()); $prop->setVisibility($this->getVisibility($from)); $prop->setType((string) $from->getType()); - $prop->setInitialized($from->hasType() && array_key_exists($prop->getName(), $defaults)); $prop->setReadOnly(PHP_VERSION_ID >= 80100 && $from->isReadOnly()); $prop->setComment(Helpers::unformatDocComment((string) $from->getDocComment())); $prop->setAttributes($this->getAttributes($from)); + + if (PHP_VERSION_ID >= 80400) { + $this->addHooks($from, $prop); + $isInterface = $from->getDeclaringClass()->isInterface(); + $prop->setFinal($from->isFinal() && !$prop->isPrivate(PropertyAccessMode::Set)); + $prop->setAbstract($from->isAbstract() && !$isInterface); + } return $prop; } + private function addHooks(\ReflectionProperty $from, Property|PromotedParameter $prop): void + { + if (PHP_VERSION_ID < 80400) { + return; + } + + $getV = $this->getVisibility($from); + $setV = $from->isPrivateSet() + ? Visibility::Private + : ($from->isProtectedSet() ? Visibility::Protected : $getV); + $defaultSetV = $from->isReadOnly() && $getV !== Visibility::Private + ? Visibility::Protected + : $getV; + if ($setV !== $defaultSetV) { + $prop->setVisibility($getV === Visibility::Public ? null : $getV, $setV); + } + + foreach ($from->getHooks() as $type => $hook) { + $params = $hook->getParameters(); + if ( + count($params) === 1 + && $params[0]->getName() === 'value' + && $params[0]->getType() == $from->getType() // intentionally == + ) { + $params = []; + } + $prop->addHook($type) + ->setParameters(array_map([$this, 'fromParameterReflection'], $params)) + ->setAbstract($hook->isAbstract()) + ->setFinal($hook->isFinal()) + ->setReturnReference($hook->returnsReference()) + ->setComment(Helpers::unformatDocComment((string) $hook->getDocComment())) + ->setAttributes($this->getAttributes($hook)); + } + } + + public function fromObject(object $obj): Literal { return new Literal('new \\' . $obj::class . '(/* unknown */)'); @@ -302,8 +351,8 @@ private function getAttributes($from): array private function getVisibility($from): string { return $from->isPrivate() - ? ClassLike::VisibilityPrivate - : ($from->isProtected() ? ClassLike::VisibilityProtected : ClassLike::VisibilityPublic); + ? Visibility::Private + : ($from->isProtected() ? Visibility::Protected : Visibility::Public); } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/GlobalFunction.php b/app/vendor/nette/php-generator/src/PhpGenerator/GlobalFunction.php index c6b1e973f..c2ed0ac04 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/GlobalFunction.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/GlobalFunction.php @@ -13,7 +13,7 @@ /** - * Global function. + * Definition of a global function. */ final class GlobalFunction { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/InterfaceType.php b/app/vendor/nette/php-generator/src/PhpGenerator/InterfaceType.php index 8743f8d00..3d179d25a 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/InterfaceType.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/InterfaceType.php @@ -13,12 +13,13 @@ /** - * Interface description. + * Definition of an interface with properties, methods and constants. */ final class InterfaceType extends ClassLike { use Traits\ConstantsAware; use Traits\MethodsAware; + use Traits\PropertiesAware; /** @var string[] */ private array $extends = []; @@ -54,12 +55,13 @@ public function addExtend(string $name): static /** * Adds a member. If it already exists, throws an exception or overwrites it if $overwrite is true. */ - public function addMember(Method|Constant $member, bool $overwrite = false): static + public function addMember(Method|Constant|Property $member, bool $overwrite = false): static { $name = $member->getName(); [$type, $n] = match (true) { $member instanceof Constant => ['consts', $name], $member instanceof Method => ['methods', strtolower($name)], + $member instanceof Property => ['properties', $name], }; if (!$overwrite && isset($this->$type[$n])) { throw new Nette\InvalidStateException("Cannot add member '$name', because it already exists."); @@ -69,11 +71,25 @@ public function addMember(Method|Constant $member, bool $overwrite = false): sta } + /** @throws Nette\InvalidStateException */ + public function validate(): void + { + foreach ($this->getProperties() as $property) { + if ($property->isInitialized()) { + throw new Nette\InvalidStateException("Property {$this->getName()}::\${$property->getName()}: Interface cannot have initialized properties."); + } elseif (!$property->getHooks()) { + throw new Nette\InvalidStateException("Property {$this->getName()}::\${$property->getName()}: Interface cannot have properties without hooks."); + } + } + } + + public function __clone(): void { parent::__clone(); $clone = fn($item) => clone $item; $this->consts = array_map($clone, $this->consts); $this->methods = array_map($clone, $this->methods); + $this->properties = array_map($clone, $this->properties); } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Method.php b/app/vendor/nette/php-generator/src/PhpGenerator/Method.php index 0e8e765b8..92b8e00bf 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Method.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Method.php @@ -13,7 +13,7 @@ /** - * Class method. + * Definition of a class method. */ final class Method { @@ -98,7 +98,7 @@ public function addPromotedParameter(string $name, mixed $defaultValue = null): /** @throws Nette\InvalidStateException */ public function validate(): void { - if ($this->abstract && ($this->final || $this->visibility === ClassLike::VisibilityPrivate)) { + if ($this->abstract && ($this->final || $this->visibility === Visibility::Private)) { throw new Nette\InvalidStateException("Method $this->name() cannot be abstract and final or private at the same time."); } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Parameter.php b/app/vendor/nette/php-generator/src/PhpGenerator/Parameter.php index 20651a316..910207eca 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Parameter.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Parameter.php @@ -13,7 +13,7 @@ /** - * Function/Method parameter description. + * Definition of a function/method parameter. */ class Parameter { diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/PhpFile.php b/app/vendor/nette/php-generator/src/PhpGenerator/PhpFile.php index 76b7947da..f38a10b39 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/PhpFile.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/PhpFile.php @@ -11,7 +11,7 @@ /** - * Instance of PHP file. + * Definition of a PHP file. * * Generates: * - opening tag (getName(); $returnType = $this->printReturnType($function); $params = $this->printParameters($function, strlen($line) + strlen($returnType) + 2); // 2 = parentheses - $body = Helpers::simplifyTaggedNames($function->getBody(), $this->namespace); - $body = ltrim(rtrim(Strings::normalize($body)) . "\n"); + $body = $this->printFunctionBody($function); $braceOnNextLine = $this->isBraceOnNextLine(str_contains($params, "\n"), (bool) $returnType); return $this->printDocComment($function) @@ -71,8 +70,7 @@ public function printClosure(Closure $closure, ?PhpNamespace $namespace = null): $useStr = strlen($tmp = implode(', ', $uses)) > $this->wrapLength && count($uses) > 1 ? "\n" . $this->indentation . implode(",\n" . $this->indentation, $uses) . ",\n" : $tmp; - $body = Helpers::simplifyTaggedNames($closure->getBody(), $this->namespace); - $body = ltrim(rtrim(Strings::normalize($body)) . "\n"); + $body = $this->printFunctionBody($closure); return $this->printAttributes($closure->getAttributes(), inline: true) . 'function ' @@ -93,14 +91,14 @@ public function printArrowFunction(Closure $closure, ?PhpNamespace $namespace = } } - $body = Helpers::simplifyTaggedNames($closure->getBody(), $this->namespace); + $body = $this->printFunctionBody($closure); return $this->printAttributes($closure->getAttributes()) . 'fn' . ($closure->getReturnReference() ? '&' : '') . $this->printParameters($closure) . $this->printReturnType($closure) - . ' => ' . trim(Strings::normalize($body)) . ';'; + . ' => ' . rtrim($body, "\n") . ';'; } @@ -117,8 +115,7 @@ public function printMethod(Method $method, ?PhpNamespace $namespace = null, boo . $method->getName(); $returnType = $this->printReturnType($method); $params = $this->printParameters($method, strlen($line) + strlen($returnType) + strlen($this->indentation) + 2); - $body = Helpers::simplifyTaggedNames($method->getBody(), $this->namespace); - $body = ltrim(rtrim(Strings::normalize($body)) . "\n"); + $body = $this->printFunctionBody($method); $braceOnNextLine = $this->isBraceOnNextLine(str_contains($params, "\n"), (bool) $returnType); return $this->printDocComment($method) @@ -132,6 +129,14 @@ public function printMethod(Method $method, ?PhpNamespace $namespace = null, boo } + private function printFunctionBody(Closure|GlobalFunction|Method|PropertyHook $function): string + { + $code = Helpers::simplifyTaggedNames($function->getBody(), $this->namespace); + $code = Strings::normalize($code); + return ltrim(rtrim($code) . "\n"); + } + + public function printClass( ClassType|InterfaceType|TraitType|EnumType $class, ?PhpNamespace $namespace = null, @@ -193,9 +198,9 @@ public function printClass( } $properties = []; - if ($class instanceof ClassType || $class instanceof TraitType) { + if ($class instanceof ClassType || $class instanceof TraitType || $class instanceof InterfaceType) { foreach ($class->getProperties() as $property) { - $properties[] = $this->printProperty($property, $readOnlyClass); + $properties[] = $this->printProperty($property, $readOnlyClass, $class instanceof InterfaceType); } } @@ -308,7 +313,7 @@ protected function printUses(PhpNamespace $namespace, string $of = PhpNamespace: } - protected function printParameters(Closure|GlobalFunction|Method $function, int $column = 0): string + protected function printParameters(Closure|GlobalFunction|Method|PropertyHook $function, int $column = 0): string { $special = false; foreach ($function->getParameters() as $param) { @@ -327,25 +332,26 @@ protected function printParameters(Closure|GlobalFunction|Method $function, int } - private function formatParameters(Closure|GlobalFunction|Method $function, bool $multiline): string + private function formatParameters(Closure|GlobalFunction|Method|PropertyHook $function, bool $multiline): string { $params = $function->getParameters(); $res = ''; foreach ($params as $param) { - $variadic = $function->isVariadic() && $param === end($params); + $variadic = !$function instanceof PropertyHook && $function->isVariadic() && $param === end($params); $attrs = $this->printAttributes($param->getAttributes(), inline: true); $res .= $this->printDocComment($param) . ($attrs ? ($multiline ? substr($attrs, 0, -1) . "\n" : $attrs) : '') . ($param instanceof PromotedParameter - ? ($param->getVisibility() ?: 'public') . ($param->isReadOnly() && $param->getType() ? ' readonly' : '') . ' ' + ? $this->printPropertyVisibility($param) . ($param->isReadOnly() && $param->getType() ? ' readonly' : '') . ' ' : '') . ltrim($this->printType($param->getType(), $param->isNullable()) . ' ') . ($param->isReference() ? '&' : '') . ($variadic ? '...' : '') . '$' . $param->getName() . ($param->hasDefaultValue() && !$variadic ? ' = ' . $this->dump($param->getDefaultValue()) : '') + . ($param instanceof PromotedParameter ? $this->printHooks($param) : '') . ($multiline ? ",\n" : ', '); } @@ -370,24 +376,39 @@ private function printConstant(Constant $const): string } - private function printProperty(Property $property, bool $readOnlyClass = false): string + private function printProperty(Property $property, bool $readOnlyClass = false, bool $isInterface = false): string { $property->validate(); $type = $property->getType(); - $def = (($property->getVisibility() ?: 'public') + $def = ($property->isAbstract() && !$isInterface ? 'abstract ' : '') + . ($property->isFinal() ? 'final ' : '') + . $this->printPropertyVisibility($property) . ($property->isStatic() ? ' static' : '') . (!$readOnlyClass && $property->isReadOnly() && $type ? ' readonly' : '') . ' ' . ltrim($this->printType($type, $property->isNullable()) . ' ') - . '$' . $property->getName()); + . '$' . $property->getName(); + + $defaultValue = $property->getValue() === null && !$property->isInitialized() + ? '' + : ' = ' . $this->dump($property->getValue(), strlen($def) + 3); // 3 = ' = ' return $this->printDocComment($property) . $this->printAttributes($property->getAttributes()) . $def - . ($property->getValue() === null && !$property->isInitialized() - ? '' - : ' = ' . $this->dump($property->getValue(), strlen($def) + 3)) // 3 = ' = ' - . ";\n"; + . $defaultValue + . ($this->printHooks($property, $isInterface) ?: ';') + . "\n"; + } + + + private function printPropertyVisibility(Property|PromotedParameter $param): string + { + $get = $param->getVisibility(PropertyAccessMode::Get); + $set = $param->getVisibility(PropertyAccessMode::Set); + return $set + ? ($get ? "$get $set(set)" : "$set(set)") + : $get ?? 'public'; } @@ -447,6 +468,37 @@ protected function printAttributes(array $attrs, bool $inline = false): string } + private function printHooks(Property|PromotedParameter $property, bool $isInterface = false): string + { + $hooks = $property->getHooks(); + if (!$hooks) { + return ''; + } + + $simple = true; + foreach ($property->getHooks() as $type => $hook) { + $simple = $simple && ($hook->isAbstract() || $isInterface); + $hooks[$type] = $this->printDocComment($hook) + . $this->printAttributes($hook->getAttributes()) + . ($hook->isAbstract() || $isInterface + ? ($hook->getReturnReference() ? '&' : '') + . $type . ';' + : ($hook->isFinal() ? 'final ' : '') + . ($hook->getReturnReference() ? '&' : '') + . $type + . ($hook->getParameters() ? $this->printParameters($hook) : '') + . ' ' + . ($hook->isShort() + ? '=> ' . $hook->getBody() . ';' + : "{\n" . $this->indent($this->printFunctionBody($hook)) . '}')); + } + + return $simple + ? ' { ' . implode(' ', $hooks) . ' }' + : " {\n" . $this->indent(implode("\n", $hooks)) . "\n}"; + } + + public function setTypeResolving(bool $state = true): static { $this->resolveTypes = $state; diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/PromotedParameter.php b/app/vendor/nette/php-generator/src/PhpGenerator/PromotedParameter.php index f9ae4efea..f81764ae1 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/PromotedParameter.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/PromotedParameter.php @@ -13,27 +13,11 @@ /** - * Promoted parameter in constructor. + * Definition of a promoted constructor parameter. */ final class PromotedParameter extends Parameter { - use Traits\VisibilityAware; - - private bool $readOnly = false; - - - public function setReadOnly(bool $state = true): static - { - $this->readOnly = $state; - return $this; - } - - - public function isReadOnly(): bool - { - return $this->readOnly; - } - + use Traits\PropertyLike; /** @throws Nette\InvalidStateException */ public function validate(): void @@ -42,4 +26,10 @@ public function validate(): void throw new Nette\InvalidStateException("Property \${$this->getName()}: Read-only properties are only supported on typed property."); } } + + + public function __clone(): void + { + $this->hooks = array_map(fn($item) => $item ? clone $item : $item, $this->hooks); + } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Property.php b/app/vendor/nette/php-generator/src/PhpGenerator/Property.php index 49db18dd3..f8d6c72e2 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Property.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Property.php @@ -14,12 +14,12 @@ /** - * Class property description. + * Definition of a class property. */ final class Property { use Traits\NameAware; - use Traits\VisibilityAware; + use Traits\PropertyLike; use Traits\CommentAware; use Traits\AttributeAware; @@ -28,7 +28,8 @@ final class Property private ?string $type = null; private bool $nullable = false; private bool $initialized = false; - private bool $readOnly = false; + private bool $final = false; + private bool $abstract = false; public function setValue(mixed $val): static @@ -100,16 +101,29 @@ public function isInitialized(): bool } - public function setReadOnly(bool $state = true): static + public function setFinal(bool $state = true): static { - $this->readOnly = $state; + $this->final = $state; return $this; } - public function isReadOnly(): bool + public function isFinal(): bool { - return $this->readOnly; + return $this->final; + } + + + public function setAbstract(bool $state = true): static + { + $this->abstract = $state; + return $this; + } + + + public function isAbstract(): bool + { + return $this->abstract; } @@ -118,6 +132,21 @@ public function validate(): void { if ($this->readOnly && !$this->type) { throw new Nette\InvalidStateException("Property \$$this->name: Read-only properties are only supported on typed property."); + + } elseif ($this->abstract && $this->final) { + throw new Nette\InvalidStateException("Property \$$this->name cannot be abstract and final at the same time."); + + } elseif ( + $this->abstract + && !Nette\Utils\Arrays::some($this->getHooks(), fn($hook) => $hook->isAbstract()) + ) { + throw new Nette\InvalidStateException("Property \$$this->name: Abstract property must have at least one abstract hook."); } } + + + public function __clone(): void + { + $this->hooks = array_map(fn($item) => $item ? clone $item : $item, $this->hooks); + } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/PropertyAccessMode.php b/app/vendor/nette/php-generator/src/PhpGenerator/PropertyAccessMode.php new file mode 100644 index 000000000..ac53aeb87 --- /dev/null +++ b/app/vendor/nette/php-generator/src/PhpGenerator/PropertyAccessMode.php @@ -0,0 +1,33 @@ +body = $args === null + ? $code + : (new Dumper)->format($code, ...$args); + $this->short = $short; + return $this; + } + + + public function getBody(): string + { + return $this->body; + } + + + public function isShort(): bool + { + return $this->short && trim($this->body) !== ''; + } + + + public function setFinal(bool $state = true): static + { + $this->final = $state; + return $this; + } + + + public function isFinal(): bool + { + return $this->final; + } + + + public function setAbstract(bool $state = true): static + { + $this->abstract = $state; + return $this; + } + + + public function isAbstract(): bool + { + return $this->abstract; + } + + + /** @internal */ + public function setParameters(array $val): static + { + (function (Parameter ...$val) {})(...$val); + $this->parameters = []; + foreach ($val as $v) { + $this->parameters[$v->getName()] = $v; + } + + return $this; + } + + + /** @internal */ + public function getParameters(): array + { + return $this->parameters; + } + + + /** + * Adds a parameter. If it already exists, it overwrites it. + * @param string $name without $ + */ + public function addParameter(string $name): Parameter + { + return $this->parameters[$name] = new Parameter($name); + } + + + public function setReturnReference(bool $state = true): static + { + $this->returnReference = $state; + return $this; + } + + + public function getReturnReference(): bool + { + return $this->returnReference; + } +} diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/PropertyHookType.php b/app/vendor/nette/php-generator/src/PhpGenerator/PropertyHookType.php new file mode 100644 index 000000000..ca23532ff --- /dev/null +++ b/app/vendor/nette/php-generator/src/PhpGenerator/PropertyHookType.php @@ -0,0 +1,33 @@ + ?string, 'get' => ?string} */ + private array $visibility = [PropertyAccessMode::Set => null, PropertyAccessMode::Get => null]; + private bool $readOnly = false; + + /** @var array */ + private array $hooks = [PropertyHookType::Set => null, PropertyHookType::Get => null]; + + + /** + * @param 'public'|'protected'|'private'|null $get + * @param 'public'|'protected'|'private'|null $set + */ + public function setVisibility(?string $get, ?string $set = null): static + { + $this->visibility = [ + PropertyAccessMode::Set => $set === null ? $set : Visibility::from($set), + PropertyAccessMode::Get => $get === null ? $get : Visibility::from($get), + ]; + return $this; + } + + + /** @param 'set'|'get' $mode */ + public function getVisibility(string $mode = PropertyAccessMode::Get): ?string + { + return $this->visibility[PropertyAccessMode::from($mode)]; + } + + + /** @param 'set'|'get' $mode */ + public function setPublic(string $mode = PropertyAccessMode::Get): static + { + $this->visibility[PropertyAccessMode::from($mode)] = Visibility::Public; + return $this; + } + + + /** @param 'set'|'get' $mode */ + public function isPublic(string $mode = PropertyAccessMode::Get): bool + { + return in_array($this->visibility[PropertyAccessMode::from($mode)], [Visibility::Public, null], true); + } + + + /** @param 'set'|'get' $mode */ + public function setProtected(string $mode = PropertyAccessMode::Get): static + { + $this->visibility[PropertyAccessMode::from($mode)] = Visibility::Protected; + return $this; + } + + + /** @param 'set'|'get' $mode */ + public function isProtected(string $mode = PropertyAccessMode::Get): bool + { + return $this->visibility[PropertyAccessMode::from($mode)] === Visibility::Protected; + } + + + /** @param 'set'|'get' $mode */ + public function setPrivate(string $mode = PropertyAccessMode::Get): static + { + $this->visibility[PropertyAccessMode::from($mode)] = Visibility::Private; + return $this; + } + + + /** @param 'set'|'get' $mode */ + public function isPrivate(string $mode = PropertyAccessMode::Get): bool + { + return $this->visibility[PropertyAccessMode::from($mode)] === Visibility::Private; + } + + + public function setReadOnly(bool $state = true): static + { + $this->readOnly = $state; + return $this; + } + + + public function isReadOnly(): bool + { + return $this->readOnly; + } + + + /** + * Replaces all hooks. + * @param PropertyHook[] $hooks + */ + public function setHooks(array $hooks): static + { + (function (PropertyHook ...$hooks) {})(...$hooks); + $this->hooks = $hooks; + return $this; + } + + + /** @return array */ + public function getHooks(): array + { + return array_filter($this->hooks); + } + + + /** @param 'set'|'get' $type */ + public function addHook(string $type, string $shortBody = ''): PropertyHook + { + return $this->hooks[PropertyHookType::from($type)] = (new PropertyHook) + ->setBody($shortBody, short: true); + } + + + /** @param 'set'|'get' $type */ + public function getHook(string $type): ?PropertyHook + { + return $this->hooks[PropertyHookType::from($type)] ?? null; + } + + + /** @param 'set'|'get' $type */ + public function hasHook(string $type): bool + { + return isset($this->hooks[PropertyHookType::from($type)]); + } +} diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php b/app/vendor/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php index 0b3230eda..0a3a383f0 100644 --- a/app/vendor/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php @@ -9,8 +9,7 @@ namespace Nette\PhpGenerator\Traits; -use Nette; -use Nette\PhpGenerator\ClassLike; +use Nette\PhpGenerator\Visibility; /** @@ -22,16 +21,10 @@ trait VisibilityAware private ?string $visibility = null; - /** - * @param string|null $val public|protected|private - */ - public function setVisibility(?string $val): static + /** @param 'public'|'protected'|'private'|null $value */ + public function setVisibility(?string $value): static { - if (!in_array($val, [ClassLike::VisibilityPublic, ClassLike::VisibilityProtected, ClassLike::VisibilityPrivate, null], true)) { - throw new Nette\InvalidArgumentException('Argument must be public|protected|private.'); - } - - $this->visibility = $val; + $this->visibility = $value === null ? $value : Visibility::from($value); return $this; } @@ -44,39 +37,39 @@ public function getVisibility(): ?string public function setPublic(): static { - $this->visibility = ClassLike::VisibilityPublic; + $this->visibility = Visibility::Public; return $this; } public function isPublic(): bool { - return $this->visibility === ClassLike::VisibilityPublic || $this->visibility === null; + return $this->visibility === Visibility::Public || $this->visibility === null; } public function setProtected(): static { - $this->visibility = ClassLike::VisibilityProtected; + $this->visibility = Visibility::Protected; return $this; } public function isProtected(): bool { - return $this->visibility === ClassLike::VisibilityProtected; + return $this->visibility === Visibility::Protected; } public function setPrivate(): static { - $this->visibility = ClassLike::VisibilityPrivate; + $this->visibility = Visibility::Private; return $this; } public function isPrivate(): bool { - return $this->visibility === ClassLike::VisibilityPrivate; + return $this->visibility === Visibility::Private; } } diff --git a/app/vendor/nette/php-generator/src/PhpGenerator/Visibility.php b/app/vendor/nette/php-generator/src/PhpGenerator/Visibility.php new file mode 100644 index 000000000..a31c75c82 --- /dev/null +++ b/app/vendor/nette/php-generator/src/PhpGenerator/Visibility.php @@ -0,0 +1,34 @@ + + */ +class CallWithDeprecatedIniOptionRule implements Rule +{ + + private const INI_FUNCTIONS = [ + 'ini_get', + 'ini_set', + 'ini_alter', + 'ini_restore', + 'get_cfg_var', + ]; + + private const DEPRECATED_OPTIONS = [ + // deprecated since unknown version + 'mbstring.http_input' => 0, + 'mbstring.http_output' => 0, + 'mbstring.internal_encoding' => 0, + 'pdo_odbc.db2_instance_name' => 0, + 'enable_dl' => 0, + + 'iconv.input_encoding' => 50600, + 'iconv.output_encoding' => 50600, + 'iconv.internal_encoding' => 50600, + + 'mbstring.func_overload' => 70200, + 'track_errors' => 70200, + + 'allow_url_include' => 70400, + + 'assert.quiet_eval' => 80000, + + 'filter.default' => 80100, + 'oci8.old_oci_close_semantics' => 80100, + + 'assert.active' => 80300, + 'assert.exception' => 80300, + 'assert.bail' => 80300, + 'assert.warning' => 80300, + + 'session.sid_length' => 80400, + 'session.sid_bits_per_character' => 80400, + ]; + + private ReflectionProvider $reflectionProvider; + + private DeprecatedScopeHelper $deprecatedScopeHelper; + + private PhpVersion $phpVersion; + + public function __construct( + ReflectionProvider $reflectionProvider, + DeprecatedScopeHelper $deprecatedScopeHelper, + PhpVersion $phpVersion + ) + { + $this->reflectionProvider = $reflectionProvider; + $this->deprecatedScopeHelper = $deprecatedScopeHelper; + $this->phpVersion = $phpVersion; + } + + public function getNodeType(): string + { + return FuncCall::class; + } + + public function processNode(Node $node, Scope $scope): array + { + if ($this->deprecatedScopeHelper->isScopeDeprecated($scope)) { + return []; + } + + if (!($node->name instanceof Name)) { + return []; + } + + if (count($node->getArgs()) < 1) { + return []; + } + + try { + $function = $this->reflectionProvider->getFunction($node->name, $scope); + } catch (FunctionNotFoundException $e) { + // Other rules will notify if the function is not found + return []; + } + + if (!in_array(strtolower($function->getName()), self::INI_FUNCTIONS, true)) { + return []; + } + + $phpVersionId = $this->phpVersion->getVersionId(); + $iniType = $scope->getType($node->getArgs()[0]->value); + foreach ($iniType->getConstantStrings() as $string) { + if (!array_key_exists($string->getValue(), self::DEPRECATED_OPTIONS)) { + continue; + } + + if ($phpVersionId < self::DEPRECATED_OPTIONS[$string->getValue()]) { + continue; + } + + return [ + RuleErrorBuilder::message(sprintf( + "Call to function %s() with deprecated option '%s'.", + $function->getName(), + $string->getValue(), + ))->identifier('function.deprecated')->build(), + ]; + } + + return []; + } + +} diff --git a/app/vendor/phpstan/phpstan/phpstan.phar b/app/vendor/phpstan/phpstan/phpstan.phar index 62b2a1ea9..68f55ac58 100755 Binary files a/app/vendor/phpstan/phpstan/phpstan.phar and b/app/vendor/phpstan/phpstan/phpstan.phar differ diff --git a/app/vendor/phpstan/phpstan/phpstan.phar.asc b/app/vendor/phpstan/phpstan/phpstan.phar.asc index 06624a97a..ce9502e2c 100644 --- a/app/vendor/phpstan/phpstan/phpstan.phar.asc +++ b/app/vendor/phpstan/phpstan/phpstan.phar.asc @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmc5+rcACgkQUcZzBf/C -5cCQ5g/+Odj8c1mm0Fj4rJ3Qrj36uMU+YaVCt2+s9W0Fey0Dgt3zoasBqbkWuoje -npZgB1Dhfi+/FvaezxHdl9BCwQRD6D1TFvNSPKjBPihdCG61LXOH4FJZ+tY2Ugw9 -ysEsOO1y0QtCx8A5bslatvDH2hCfFcwxakG4t741md3DbRVK1Evar6xySYfjHqGI -0U7xeAFmoRrXb1B81Nhmknx/MjHB0SDXCZ3G3GSsn9xtXk8JB1Pv9/A5g0jR7SFc -ciqA3FUQVlQeZVQvUPy3yTlhudCrVU2dtCgUyOUrAwyB1guriCqxQgzRRSUyLCMI -fy7MF2HHWU0xtBAJu3VWMhx1Xev0jLEF/kf1oGGsef/DO43WV40cybwLPItOpyjX -aKfFjmNHAlN+NTzneYBLtM7UGGV4Nj5RpgiCDc3jB9EBMY8gvOJ7Dr7KCWV2Fp35 -jjq64yHasnzXS7nsgYNsqzMHs3y9ZXUGnixE+nFszoeCEUEmuNSpusaoSy28YBTP -/EHzOljf4w98IxFo0ednuVLrXNI+mZpj9rfuTj106zFHI9/Vb+rwqJ3VD8v319mI -FNzTO/fACdp1KS35zxHQ4gLQ8q3RYqncgG9LNZ15fkdk9pi5v+c8Dh3UTWd3VM0V -bd/jl4qOTMG5w8y6w1niM3oOC3edV0BtMSbbA1kcfilJ0F83p1M= -=bWVd +iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmdhsTIACgkQUcZzBf/C +5cAxtQ//a0q8ZsH8aOlSksbcQcAfq89wcFUkJmGjW5xsZwwUjKptZa9QlecuMnWg +mysYMVieTbVuxnImTTkeh1kJbTTIrM6zNeU69+AYaLx7mhpAcQ8LyK4KZltBNtqc +g1p5SN8V7mReooTDBtJVmpZ4HFDcwwcMoInKK6SsRYvEsv/FpT+CElLRuUtd8MUr +2f58zUZSYAjTDSlcDCkfKdpdTjWh0veT+qDdWzZV4GWF8tPcPx6Wp03bmM6tR72b +anjedeuLZ6X0JbH8vVGfnLFkApoF9nTV1QWlgWsTolmiqkc85feDmGY22wTIkIBs +Cuy6d+E+JPdCJO9JUVH4rBvvJponOJ6+Guj2n2CB+Nezwb8DqYhaIPBWPA6Vw/jO +TN27vyyKx32JXSiYmj96Pkb4KiC3tTX+4Y6HzxmRLgvws2IM2/yRBTD1wVZCFdvt +/aqwPrX0+1DG7/B6mPV91EI5wT669UT/xhUfFA1SGTYj+lxWZE53RUSSIbWixLAc +Qhdg0lX/zODImSYAJRzA5qLu+k3Kg0A9Lgmqp0zWIqY/AbgV112nZ3wHZc7P+k5+ +y6l7u7qAFK3nTsVFiCQo4Rrr1gXTX45awMegeqt/ynTF6IGg9XV0ORAv86BnKZBe +3Os52r90a75+jS8M7DkBSQNsXzyMyN0sndZKLQu4m33qUhQv30Q= +=+nLt -----END PGP SIGNATURE----- diff --git a/app/vendor/spaze/phpcs-phar/composer.json b/app/vendor/spaze/phpcs-phar/composer.json index 5b71e7ce7..f3a52fe57 100644 --- a/app/vendor/spaze/phpcs-phar/composer.json +++ b/app/vendor/spaze/phpcs-phar/composer.json @@ -14,8 +14,8 @@ ], "replace": { "dealerdirect/phpcodesniffer-composer-installer": "*", - "phpcsstandards/php_codesniffer": "3.11.1", - "squizlabs/php_codesniffer": "3.11.1" + "phpcsstandards/php_codesniffer": "3.11.2", + "squizlabs/php_codesniffer": "3.11.2" }, "require": { "composer-runtime-api": "^2.1" diff --git a/app/vendor/spaze/phpcs-phar/phpcs.phar b/app/vendor/spaze/phpcs-phar/phpcs.phar index 218d8eec3..8c9f5d8a1 100644 Binary files a/app/vendor/spaze/phpcs-phar/phpcs.phar and b/app/vendor/spaze/phpcs-phar/phpcs.phar differ diff --git a/app/vendor/spaze/phpcs-phar/phpcs.phar.asc b/app/vendor/spaze/phpcs-phar/phpcs.phar.asc index 78ddf2a29..1a195b082 100644 Binary files a/app/vendor/spaze/phpcs-phar/phpcs.phar.asc and b/app/vendor/spaze/phpcs-phar/phpcs.phar.asc differ diff --git a/app/vendor/symfony/cache/Adapter/AbstractAdapter.php b/app/vendor/symfony/cache/Adapter/AbstractAdapter.php index 5d6336eed..c03868da1 100644 --- a/app/vendor/symfony/cache/Adapter/AbstractAdapter.php +++ b/app/vendor/symfony/cache/Adapter/AbstractAdapter.php @@ -40,7 +40,7 @@ protected function __construct(string $namespace = '', int $defaultLifetime = 0) $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).static::NS_SEPARATOR; $this->defaultLifetime = $defaultLifetime; if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); + throw new InvalidArgumentException(\sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); } self::$createCacheItem ??= \Closure::bind( static function ($key, $value, $isHit) { @@ -158,7 +158,7 @@ public function commit(): bool $ok = false; $v = $values[$id]; $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); + $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); } } else { @@ -181,7 +181,7 @@ public function commit(): bool } $ok = false; $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); + $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); } } diff --git a/app/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/app/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php index ef62b4fb2..822c30f09 100644 --- a/app/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php +++ b/app/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php @@ -42,7 +42,7 @@ protected function __construct(string $namespace = '', int $defaultLifetime = 0) $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':'; $this->defaultLifetime = $defaultLifetime; if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); + throw new InvalidArgumentException(\sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); } self::$createCacheItem ??= \Closure::bind( static function ($key, $value, $isHit) { @@ -186,7 +186,7 @@ public function commit(): bool $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); } catch (\Exception $e) { } - if (true === $e || [] === $e) { + if ([] === $e) { continue; } if (\is_array($e) || 1 === \count($values)) { @@ -194,7 +194,7 @@ public function commit(): bool $ok = false; $v = $values[$id]; $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); + $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); } } else { @@ -213,12 +213,12 @@ public function commit(): bool $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); } catch (\Exception $e) { } - if (true === $e || [] === $e) { + if ([] === $e) { continue; } $ok = false; $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); + $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); } } diff --git a/app/vendor/symfony/cache/Adapter/ApcuAdapter.php b/app/vendor/symfony/cache/Adapter/ApcuAdapter.php index 03b512f05..ddb721005 100644 --- a/app/vendor/symfony/cache/Adapter/ApcuAdapter.php +++ b/app/vendor/symfony/cache/Adapter/ApcuAdapter.php @@ -79,7 +79,7 @@ protected function doHave(string $id): bool protected function doClear(string $namespace): bool { return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) - ? apcu_delete(new \APCUIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) + ? apcu_delete(new \APCUIterator(\sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) : apcu_clear_cache(); } diff --git a/app/vendor/symfony/cache/Adapter/ArrayAdapter.php b/app/vendor/symfony/cache/Adapter/ArrayAdapter.php index 0f1c49db9..7b9238774 100644 --- a/app/vendor/symfony/cache/Adapter/ArrayAdapter.php +++ b/app/vendor/symfony/cache/Adapter/ArrayAdapter.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Cache\Adapter; use Psr\Cache\CacheItemInterface; +use Psr\Clock\ClockInterface; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\Cache\CacheItem; @@ -44,13 +45,14 @@ public function __construct( private bool $storeSerialized = true, private float $maxLifetime = 0, private int $maxItems = 0, + private ?ClockInterface $clock = null, ) { if (0 > $maxLifetime) { - throw new InvalidArgumentException(sprintf('Argument $maxLifetime must be positive, %F passed.', $maxLifetime)); + throw new InvalidArgumentException(\sprintf('Argument $maxLifetime must be positive, %F passed.', $maxLifetime)); } if (0 > $maxItems) { - throw new InvalidArgumentException(sprintf('Argument $maxItems must be a positive integer, %d passed.', $maxItems)); + throw new InvalidArgumentException(\sprintf('Argument $maxItems must be a positive integer, %d passed.', $maxItems)); } self::$createCacheItem ??= \Closure::bind( @@ -94,7 +96,7 @@ public function delete(string $key): bool public function hasItem(mixed $key): bool { - if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) { + if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > $this->getCurrentTime()) { if ($this->maxItems) { // Move the item last in the storage $value = $this->values[$key]; @@ -129,7 +131,7 @@ public function getItems(array $keys = []): iterable { \assert(self::validateKeys($keys)); - return $this->generateItems($keys, microtime(true), self::$createCacheItem); + return $this->generateItems($keys, $this->getCurrentTime(), self::$createCacheItem); } public function deleteItem(mixed $key): bool @@ -159,7 +161,7 @@ public function save(CacheItemInterface $item): bool $value = $item["\0*\0value"]; $expiry = $item["\0*\0expiry"]; - $now = microtime(true); + $now = $this->getCurrentTime(); if (null !== $expiry) { if (!$expiry) { @@ -216,7 +218,7 @@ public function commit(): bool public function clear(string $prefix = ''): bool { if ('' !== $prefix) { - $now = microtime(true); + $now = $this->getCurrentTime(); foreach ($this->values as $key => $value) { if (!isset($this->expiries[$key]) || $this->expiries[$key] <= $now || str_starts_with($key, $prefix)) { @@ -307,7 +309,7 @@ private function freeze($value, string $key): string|int|float|bool|array|\UnitE } catch (\Exception $e) { unset($this->values[$key], $this->tags[$key]); $type = get_debug_type($value); - $message = sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage()); + $message = \sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage()); CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); return null; @@ -356,4 +358,9 @@ private function validateKeys(array $keys): bool return true; } + + private function getCurrentTime(): float + { + return $this->clock?->now()->format('U.u') ?? microtime(true); + } } diff --git a/app/vendor/symfony/cache/Adapter/ChainAdapter.php b/app/vendor/symfony/cache/Adapter/ChainAdapter.php index 1418cff04..09fcfdcc0 100644 --- a/app/vendor/symfony/cache/Adapter/ChainAdapter.php +++ b/app/vendor/symfony/cache/Adapter/ChainAdapter.php @@ -52,7 +52,7 @@ public function __construct( foreach ($adapters as $adapter) { if (!$adapter instanceof CacheItemPoolInterface) { - throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); + throw new InvalidArgumentException(\sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); } if ('cli' === \PHP_SAPI && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { continue; // skip putting APCu in the chain when the backend is disabled @@ -76,7 +76,7 @@ static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) { $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata; if (isset($item->metadata[CacheItem::METADATA_EXPIRY])) { - $item->expiresAt(\DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $item->metadata[CacheItem::METADATA_EXPIRY]))); + $item->expiresAt(\DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item->metadata[CacheItem::METADATA_EXPIRY]))); } elseif (0 < $defaultLifetime) { $item->expiresAfter($defaultLifetime); } diff --git a/app/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php b/app/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php index ae2bea7ed..c69c777c9 100644 --- a/app/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php +++ b/app/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php @@ -63,7 +63,7 @@ public function __construct( ?MarshallerInterface $marshaller = null, ) { if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); + throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); } if ($connOrDsn instanceof Connection) { @@ -140,7 +140,7 @@ public function prune(): bool if ('' !== $this->namespace) { $deleteSql .= " AND $this->idCol LIKE ?"; - $params[] = sprintf('%s%%', $this->namespace); + $params[] = \sprintf('%s%%', $this->namespace); $paramTypes[] = ParameterType::STRING; } diff --git a/app/vendor/symfony/cache/Adapter/MemcachedAdapter.php b/app/vendor/symfony/cache/Adapter/MemcachedAdapter.php index 033d9871e..d882ef1b1 100644 --- a/app/vendor/symfony/cache/Adapter/MemcachedAdapter.php +++ b/app/vendor/symfony/cache/Adapter/MemcachedAdapter.php @@ -311,7 +311,7 @@ private function getClient(): \Memcached throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); } if ('' !== $prefix = (string) $this->lazyClient->getOption(\Memcached::OPT_PREFIX_KEY)) { - throw new CacheException(sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix)); + throw new CacheException(\sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix)); } return $this->client = $this->lazyClient; diff --git a/app/vendor/symfony/cache/Adapter/ParameterNormalizer.php b/app/vendor/symfony/cache/Adapter/ParameterNormalizer.php index a6896402f..483df1c0b 100644 --- a/app/vendor/symfony/cache/Adapter/ParameterNormalizer.php +++ b/app/vendor/symfony/cache/Adapter/ParameterNormalizer.php @@ -29,7 +29,7 @@ public static function normalizeDuration(string $duration): int try { return \DateTimeImmutable::createFromFormat('U', 0)->add(new \DateInterval($duration))->getTimestamp(); } catch (\Exception $e) { - throw new \InvalidArgumentException(sprintf('Cannot parse date interval "%s".', $duration), 0, $e); + throw new \InvalidArgumentException(\sprintf('Cannot parse date interval "%s".', $duration), 0, $e); } } } diff --git a/app/vendor/symfony/cache/Adapter/PdoAdapter.php b/app/vendor/symfony/cache/Adapter/PdoAdapter.php index b18428d67..525e2c6db 100644 --- a/app/vendor/symfony/cache/Adapter/PdoAdapter.php +++ b/app/vendor/symfony/cache/Adapter/PdoAdapter.php @@ -57,16 +57,16 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface public function __construct(#[\SensitiveParameter] \PDO|string $connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], ?MarshallerInterface $marshaller = null) { if (\is_string($connOrDsn) && str_contains($connOrDsn, '://')) { - throw new InvalidArgumentException(sprintf('Usage of Doctrine DBAL URL with "%s" is not supported. Use a PDO DSN or "%s" instead.', __CLASS__, DoctrineDbalAdapter::class)); + throw new InvalidArgumentException(\sprintf('Usage of Doctrine DBAL URL with "%s" is not supported. Use a PDO DSN or "%s" instead.', __CLASS__, DoctrineDbalAdapter::class)); } if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); + throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); } if ($connOrDsn instanceof \PDO) { if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); + throw new InvalidArgumentException(\sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); } $this->conn = $connOrDsn; @@ -123,7 +123,7 @@ public function createTable(): void 'pgsql' => "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", 'oci' => "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", 'sqlsrv' => "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", - default => throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $driver)), + default => throw new \DomainException(\sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $driver)), }; $this->getConnection()->exec($sql); @@ -147,7 +147,7 @@ public function prune(): bool $delete->bindValue(':time', time(), \PDO::PARAM_INT); if ('' !== $this->namespace) { - $delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); + $delete->bindValue(':namespace', \sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); } try { return $delete->execute(); diff --git a/app/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/app/vendor/symfony/cache/Adapter/PhpArrayAdapter.php index f92a2380f..8047a8a28 100644 --- a/app/vendor/symfony/cache/Adapter/PhpArrayAdapter.php +++ b/app/vendor/symfony/cache/Adapter/PhpArrayAdapter.php @@ -41,7 +41,7 @@ class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInte private static array $valuesCache = []; /** - * @param string $file The PHP file were values are cached + * @param string $file The PHP file where values are cached * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit */ public function __construct( @@ -111,7 +111,7 @@ public function get(string $key, callable $callback, ?float $beta = null, ?array public function getItem(mixed $key): CacheItem { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } if (!isset($this->values)) { $this->initialize(); @@ -141,7 +141,7 @@ public function getItems(array $keys = []): iterable { foreach ($keys as $key) { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } } if (!isset($this->values)) { @@ -154,7 +154,7 @@ public function getItems(array $keys = []): iterable public function hasItem(mixed $key): bool { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } if (!isset($this->values)) { $this->initialize(); @@ -166,7 +166,7 @@ public function hasItem(mixed $key): bool public function deleteItem(mixed $key): bool { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } if (!isset($this->values)) { $this->initialize(); @@ -182,7 +182,7 @@ public function deleteItems(array $keys): bool foreach ($keys as $key) { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } if (isset($this->keys[$key])) { @@ -250,21 +250,21 @@ public function warmUp(array $values): array { if (file_exists($this->file)) { if (!is_file($this->file)) { - throw new InvalidArgumentException(sprintf('Cache path exists and is not a file: "%s".', $this->file)); + throw new InvalidArgumentException(\sprintf('Cache path exists and is not a file: "%s".', $this->file)); } if (!is_writable($this->file)) { - throw new InvalidArgumentException(sprintf('Cache file is not writable: "%s".', $this->file)); + throw new InvalidArgumentException(\sprintf('Cache file is not writable: "%s".', $this->file)); } } else { $directory = \dirname($this->file); if (!is_dir($directory) && !@mkdir($directory, 0777, true)) { - throw new InvalidArgumentException(sprintf('Cache directory does not exist and cannot be created: "%s".', $directory)); + throw new InvalidArgumentException(\sprintf('Cache directory does not exist and cannot be created: "%s".', $directory)); } if (!is_writable($directory)) { - throw new InvalidArgumentException(sprintf('Cache directory is not writable: "%s".', $directory)); + throw new InvalidArgumentException(\sprintf('Cache directory is not writable: "%s".', $directory)); } } @@ -291,7 +291,7 @@ public function warmUp(array $values): array try { $value = VarExporter::export($value, $isStaticValue, $preload); } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); + throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); } } elseif (\is_string($value)) { // Wrap "N;" in a closure to not confuse it with an encoded `null` @@ -300,7 +300,7 @@ public function warmUp(array $values): array } $value = var_export($value, true); } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); + throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); } else { $value = var_export($value, true); } @@ -321,7 +321,7 @@ public function warmUp(array $values): array $dump .= "\n], [\n\n{$dumpedValues}\n]];\n"; - $tmpFile = uniqid($this->file, true); + $tmpFile = tempnam(\dirname($this->file), basename($this->file)); file_put_contents($tmpFile, $dump); @chmod($tmpFile, 0666 & ~umask()); diff --git a/app/vendor/symfony/cache/Adapter/PhpFilesAdapter.php b/app/vendor/symfony/cache/Adapter/PhpFilesAdapter.php index 917ff161f..df0d0e713 100644 --- a/app/vendor/symfony/cache/Adapter/PhpFilesAdapter.php +++ b/app/vendor/symfony/cache/Adapter/PhpFilesAdapter.php @@ -216,7 +216,7 @@ protected function doSave(array $values, int $lifetime): array|bool try { $value = VarExporter::export($value, $isStaticValue); } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); + throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); } } elseif (\is_string($value)) { // Wrap "N;" in a closure to not confuse it with an encoded `null` @@ -225,7 +225,7 @@ protected function doSave(array $values, int $lifetime): array|bool } $value = var_export($value, true); } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); + throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); } else { $value = var_export($value, true); } @@ -254,7 +254,7 @@ protected function doSave(array $values, int $lifetime): array|bool } if (!$ok && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); + throw new CacheException(\sprintf('Cache directory is not writable (%s).', $this->directory)); } return $ok; @@ -305,10 +305,8 @@ private function getFileKey(string $file): string */ class LazyValue { - public string $file; - - public function __construct(string $file) - { - $this->file = $file; + public function __construct( + public string $file, + ) { } } diff --git a/app/vendor/symfony/cache/Adapter/ProxyAdapter.php b/app/vendor/symfony/cache/Adapter/ProxyAdapter.php index c022dd5fa..562122606 100644 --- a/app/vendor/symfony/cache/Adapter/ProxyAdapter.php +++ b/app/vendor/symfony/cache/Adapter/ProxyAdapter.php @@ -73,7 +73,7 @@ static function ($key, $innerItem, $poolHash) { self::$setInnerItem ??= \Closure::bind( static function (CacheItemInterface $innerItem, CacheItem $item, $expiry = null) { $innerItem->set($item->pack()); - $innerItem->expiresAt(($expiry ?? $item->expiry) ? \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $expiry ?? $item->expiry)) : null); + $innerItem->expiresAt(($expiry ?? $item->expiry) ? \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $expiry ?? $item->expiry)) : null); }, null, CacheItem::class diff --git a/app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php index f71622b6b..7b282375c 100644 --- a/app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php +++ b/app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php @@ -66,7 +66,7 @@ public function __construct( ?MarshallerInterface $marshaller = null, ) { if ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof ClusterInterface && !$redis->getConnection() instanceof PredisCluster) { - throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); + throw new InvalidArgumentException(\sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); } $isRelay = $redis instanceof Relay; @@ -75,7 +75,7 @@ public function __construct( foreach (\is_array($compression) ? $compression : [$compression] as $c) { if ($isRelay ? Relay::COMPRESSION_NONE : \Redis::COMPRESSION_NONE !== $c) { - throw new InvalidArgumentException(sprintf('redis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class)); + throw new InvalidArgumentException(\sprintf('redis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class)); } } } @@ -87,7 +87,7 @@ protected function doSave(array $values, int $lifetime, array $addTagData = [], { $eviction = $this->getRedisEvictionPolicy(); if ('noeviction' !== $eviction && !str_starts_with($eviction, 'volatile-')) { - throw new LogicException(sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction)); + throw new LogicException(\sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction)); } // serialize values diff --git a/app/vendor/symfony/cache/Adapter/TagAwareAdapter.php b/app/vendor/symfony/cache/Adapter/TagAwareAdapter.php index 34082db1f..53c989047 100644 --- a/app/vendor/symfony/cache/Adapter/TagAwareAdapter.php +++ b/app/vendor/symfony/cache/Adapter/TagAwareAdapter.php @@ -207,12 +207,10 @@ public function clear(string $prefix = ''): bool unset($this->deferred[$key]); } } - } else { - $this->deferred = []; - } - if ($this->pool instanceof AdapterInterface) { return $this->pool->clear($prefix); + } else { + $this->deferred = []; } return $this->pool->clear(); diff --git a/app/vendor/symfony/cache/Adapter/TraceableAdapter.php b/app/vendor/symfony/cache/Adapter/TraceableAdapter.php index b5bce143f..8fe6cf376 100644 --- a/app/vendor/symfony/cache/Adapter/TraceableAdapter.php +++ b/app/vendor/symfony/cache/Adapter/TraceableAdapter.php @@ -27,18 +27,17 @@ */ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface { - protected AdapterInterface $pool; private array $calls = []; - public function __construct(AdapterInterface $pool) - { - $this->pool = $pool; + public function __construct( + protected AdapterInterface $pool, + ) { } public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed { if (!$this->pool instanceof CacheInterface) { - throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); + throw new \BadMethodCallException(\sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); } $isHit = true; diff --git a/app/vendor/symfony/cache/CHANGELOG.md b/app/vendor/symfony/cache/CHANGELOG.md index cab9bf61c..038915c46 100644 --- a/app/vendor/symfony/cache/CHANGELOG.md +++ b/app/vendor/symfony/cache/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +7.2 +--- + + * `igbinary_serialize()` is no longer used instead of `serialize()` by default when the igbinary extension is installed, + due to behavior compatibilities between the two + * Add optional `Psr\Clock\ClockInterface` parameter to `ArrayAdapter` + 7.1 --- diff --git a/app/vendor/symfony/cache/CacheItem.php b/app/vendor/symfony/cache/CacheItem.php index 1a81706da..ec2c0c5c4 100644 --- a/app/vendor/symfony/cache/CacheItem.php +++ b/app/vendor/symfony/cache/CacheItem.php @@ -81,7 +81,7 @@ public function expiresAfter(mixed $time): static } elseif (\is_int($time)) { $this->expiry = $time + microtime(true); } else { - throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time))); + throw new InvalidArgumentException(\sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time))); } return $this; @@ -90,14 +90,14 @@ public function expiresAfter(mixed $time): static public function tag(mixed $tags): static { if (!$this->isTaggable) { - throw new LogicException(sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); + throw new LogicException(\sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); } if (!\is_array($tags) && !$tags instanceof \Traversable) { // don't use is_iterable(), it's slow $tags = [$tags]; } foreach ($tags as $tag) { if (!\is_string($tag) && !$tag instanceof \Stringable) { - throw new InvalidArgumentException(sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', get_debug_type($tag))); + throw new InvalidArgumentException(\sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', get_debug_type($tag))); } $tag = (string) $tag; if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) { @@ -107,7 +107,7 @@ public function tag(mixed $tags): static throw new InvalidArgumentException('Cache tag length must be greater than zero.'); } if (false !== strpbrk($tag, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters "%s".', $tag, self::RESERVED_CHARACTERS)); + throw new InvalidArgumentException(\sprintf('Cache tag "%s" contains reserved characters "%s".', $tag, self::RESERVED_CHARACTERS)); } $this->newMetadata[self::METADATA_TAGS][$tag] = $tag; } @@ -130,13 +130,13 @@ public function getMetadata(): array public static function validateKey($key): string { if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); + throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); } if ('' === $key) { throw new InvalidArgumentException('Cache key length must be greater than zero.'); } if (false !== strpbrk($key, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); + throw new InvalidArgumentException(\sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); } return $key; diff --git a/app/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/app/vendor/symfony/cache/DependencyInjection/CachePoolPass.php index 081d82cd7..e62febbcb 100644 --- a/app/vendor/symfony/cache/DependencyInjection/CachePoolPass.php +++ b/app/vendor/symfony/cache/DependencyInjection/CachePoolPass.php @@ -106,7 +106,7 @@ public function process(ContainerBuilder $container): void } if (ChainAdapter::class === $chainedClass) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent())); + throw new InvalidArgumentException(\sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent())); } $i = 0; @@ -164,7 +164,7 @@ public function process(ContainerBuilder $container): void unset($tags[0][$attr]); } if (!empty($tags[0])) { - throw new InvalidArgumentException(sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $id, implode('", "', array_keys($tags[0])))); + throw new InvalidArgumentException(\sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $id, implode('", "', array_keys($tags[0])))); } if (null !== $clearer) { diff --git a/app/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php b/app/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php index 69b69fb4b..68386f57c 100644 --- a/app/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php +++ b/app/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php @@ -35,7 +35,7 @@ public function process(ContainerBuilder $container): void $class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass()); if (!$reflection = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); } if ($reflection->implementsInterface(PruneableInterface::class)) { diff --git a/app/vendor/symfony/cache/LockRegistry.php b/app/vendor/symfony/cache/LockRegistry.php index c5c5fde89..6923b40b3 100644 --- a/app/vendor/symfony/cache/LockRegistry.php +++ b/app/vendor/symfony/cache/LockRegistry.php @@ -105,7 +105,7 @@ public static function compute(callable $callback, ItemInterface $item, bool &$s $locked = flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); if ($locked || !$wouldBlock) { - $logger?->info(sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]); + $logger?->info(\sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]); self::$lockedFiles[$key] = true; $value = $callback($item, $save); diff --git a/app/vendor/symfony/cache/Marshaller/DefaultMarshaller.php b/app/vendor/symfony/cache/Marshaller/DefaultMarshaller.php index 34bbeb893..02ebcfadf 100644 --- a/app/vendor/symfony/cache/Marshaller/DefaultMarshaller.php +++ b/app/vendor/symfony/cache/Marshaller/DefaultMarshaller.php @@ -20,17 +20,15 @@ */ class DefaultMarshaller implements MarshallerInterface { - private bool $useIgbinarySerialize = true; + private bool $useIgbinarySerialize = false; private bool $throwOnSerializationFailure = false; public function __construct(?bool $useIgbinarySerialize = null, bool $throwOnSerializationFailure = false) { - if (null === $useIgbinarySerialize) { - $useIgbinarySerialize = \extension_loaded('igbinary') && version_compare('3.1.6', phpversion('igbinary'), '<='); - } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || version_compare('3.1.6', phpversion('igbinary'), '>'))) { + if ($useIgbinarySerialize && (!\extension_loaded('igbinary') || version_compare('3.1.6', phpversion('igbinary'), '>'))) { throw new CacheException(\extension_loaded('igbinary') ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.'); } - $this->useIgbinarySerialize = $useIgbinarySerialize; + $this->useIgbinarySerialize = true === $useIgbinarySerialize; $this->throwOnSerializationFailure = $throwOnSerializationFailure; } diff --git a/app/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php b/app/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php index 6056ebab4..de8256b9c 100644 --- a/app/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php +++ b/app/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php @@ -20,10 +20,6 @@ */ final class EarlyExpirationMessage { - private CacheItem $item; - private string $pool; - private string|array $callback; - public static function create(ReverseContainer $reverseContainer, callable $callback, CacheItem $item, AdapterInterface $pool): ?self { try { @@ -91,10 +87,10 @@ public function findCallback(ReverseContainer $reverseContainer): callable return $callback; } - private function __construct(CacheItem $item, string $pool, string|array $callback) - { - $this->item = $item; - $this->pool = $pool; - $this->callback = $callback; + private function __construct( + private CacheItem $item, + private string $pool, + private string|array $callback, + ) { } } diff --git a/app/vendor/symfony/cache/Psr16Cache.php b/app/vendor/symfony/cache/Psr16Cache.php index f21384fee..01494d714 100644 --- a/app/vendor/symfony/cache/Psr16Cache.php +++ b/app/vendor/symfony/cache/Psr16Cache.php @@ -135,7 +135,7 @@ public function getMultiple($keys, $default = null): iterable if ($keys instanceof \Traversable) { $keys = iterator_to_array($keys, false); } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); + throw new InvalidArgumentException(\sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); } try { @@ -166,7 +166,7 @@ public function setMultiple($values, $ttl = null): bool { $valuesIsArray = \is_array($values); if (!$valuesIsArray && !$values instanceof \Traversable) { - throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', get_debug_type($values))); + throw new InvalidArgumentException(\sprintf('Cache values must be array or Traversable, "%s" given.', get_debug_type($values))); } $items = []; @@ -215,7 +215,7 @@ public function deleteMultiple($keys): bool if ($keys instanceof \Traversable) { $keys = iterator_to_array($keys, false); } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); + throw new InvalidArgumentException(\sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); } try { diff --git a/app/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/app/vendor/symfony/cache/Traits/AbstractAdapterTrait.php index 222bc545f..6a716743f 100644 --- a/app/vendor/symfony/cache/Traits/AbstractAdapterTrait.php +++ b/app/vendor/symfony/cache/Traits/AbstractAdapterTrait.php @@ -300,7 +300,7 @@ private function generateItems(iterable $items, array &$keys): \Generator try { foreach ($items as $id => $value) { if (!isset($keys[$id])) { - throw new InvalidArgumentException(sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); + throw new InvalidArgumentException(\sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); } $key = $keys[$id]; unset($keys[$id]); diff --git a/app/vendor/symfony/cache/Traits/ContractsTrait.php b/app/vendor/symfony/cache/Traits/ContractsTrait.php index 8d830f0ab..d461582d3 100644 --- a/app/vendor/symfony/cache/Traits/ContractsTrait.php +++ b/app/vendor/symfony/cache/Traits/ContractsTrait.php @@ -62,7 +62,7 @@ public function setCallbackWrapper(?callable $callbackWrapper): callable private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null): mixed { if (0 > $beta ??= 1.0) { - throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); + throw new InvalidArgumentException(\sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); } static $setMetadata; diff --git a/app/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/app/vendor/symfony/cache/Traits/FilesystemCommonTrait.php index 3e8c3b1e3..98e0d3ec5 100644 --- a/app/vendor/symfony/cache/Traits/FilesystemCommonTrait.php +++ b/app/vendor/symfony/cache/Traits/FilesystemCommonTrait.php @@ -32,7 +32,7 @@ private function init(string $namespace, ?string $directory): void } if (isset($namespace[0])) { if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); + throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); } $directory .= \DIRECTORY_SEPARATOR.$namespace; } else { @@ -44,7 +44,7 @@ private function init(string $namespace, ?string $directory): void $directory .= \DIRECTORY_SEPARATOR; // On Windows the whole path is limited to 258 chars if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) { - throw new InvalidArgumentException(sprintf('Cache directory too long (%s).', $directory)); + throw new InvalidArgumentException(\sprintf('Cache directory too long (%s).', $directory)); } $this->directory = $directory; @@ -108,7 +108,6 @@ private function write(string $file, string $data, ?int $expiresAt = null): bool if ('\\' === \DIRECTORY_SEPARATOR) { $success = copy($tmp, $file); - $unlink = true; } else { $success = rename($tmp, $file); $unlink = !$success; diff --git a/app/vendor/symfony/cache/Traits/FilesystemTrait.php b/app/vendor/symfony/cache/Traits/FilesystemTrait.php index 47e9b838f..05fa10e96 100644 --- a/app/vendor/symfony/cache/Traits/FilesystemTrait.php +++ b/app/vendor/symfony/cache/Traits/FilesystemTrait.php @@ -92,7 +92,7 @@ protected function doSave(array $values, int $lifetime): array|bool } if ($failed && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); + throw new CacheException(\sprintf('Cache directory is not writable (%s).', $this->directory)); } return $failed; diff --git a/app/vendor/symfony/cache/Traits/Redis5Proxy.php b/app/vendor/symfony/cache/Traits/Redis5Proxy.php index 0b2794ee1..b2402f257 100644 --- a/app/vendor/symfony/cache/Traits/Redis5Proxy.php +++ b/app/vendor/symfony/cache/Traits/Redis5Proxy.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Cache\Traits; use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Component\VarExporter\LazyProxyTrait; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-needed symbols @@ -25,1204 +24,1202 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); */ class Redis5Proxy extends \Redis implements ResetInterface, LazyObjectInterface { - use LazyProxyTrait { + use RedisProxyTrait { resetLazyObject as reset; } - private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); + $this->initializeLazyObject()->__construct(...\func_get_args()); } public function _prefix($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); + return $this->initializeLazyObject()->_prefix(...\func_get_args()); } public function _serialize($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); + return $this->initializeLazyObject()->_serialize(...\func_get_args()); } public function _unserialize($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); + return $this->initializeLazyObject()->_unserialize(...\func_get_args()); } public function _pack($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); + return $this->initializeLazyObject()->_pack(...\func_get_args()); } public function _unpack($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); + return $this->initializeLazyObject()->_unpack(...\func_get_args()); } public function _compress($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); + return $this->initializeLazyObject()->_compress(...\func_get_args()); } public function _uncompress($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); + return $this->initializeLazyObject()->_uncompress(...\func_get_args()); } public function acl($subcmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); + return $this->initializeLazyObject()->acl(...\func_get_args()); } public function append($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); + return $this->initializeLazyObject()->append(...\func_get_args()); } public function auth(#[\SensitiveParameter] $auth) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); + return $this->initializeLazyObject()->auth(...\func_get_args()); } public function bgSave() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgSave(...\func_get_args()); + return $this->initializeLazyObject()->bgSave(...\func_get_args()); } public function bgrewriteaof() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); + return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); } public function bitcount($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); + return $this->initializeLazyObject()->bitcount(...\func_get_args()); } public function bitop($operation, $ret_key, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); + return $this->initializeLazyObject()->bitop(...\func_get_args()); } public function bitpos($key, $bit, $start = null, $end = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); + return $this->initializeLazyObject()->bitpos(...\func_get_args()); } public function blPop($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blPop(...\func_get_args()); + return $this->initializeLazyObject()->blPop(...\func_get_args()); } public function brPop($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brPop(...\func_get_args()); + return $this->initializeLazyObject()->brPop(...\func_get_args()); } public function brpoplpush($src, $dst, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); } public function bzPopMax($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMax(...\func_get_args()); + return $this->initializeLazyObject()->bzPopMax(...\func_get_args()); } public function bzPopMin($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMin(...\func_get_args()); + return $this->initializeLazyObject()->bzPopMin(...\func_get_args()); } public function clearLastError() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); + return $this->initializeLazyObject()->clearLastError(...\func_get_args()); } public function client($cmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); + return $this->initializeLazyObject()->client(...\func_get_args()); } public function close() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); + return $this->initializeLazyObject()->close(...\func_get_args()); } public function command(...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); + return $this->initializeLazyObject()->command(...\func_get_args()); } public function config($cmd, $key, $value = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); + return $this->initializeLazyObject()->config(...\func_get_args()); } public function connect($host, $port = null, $timeout = null, $retry_interval = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); + return $this->initializeLazyObject()->connect(...\func_get_args()); } public function dbSize() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbSize(...\func_get_args()); + return $this->initializeLazyObject()->dbSize(...\func_get_args()); } public function debug($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->debug(...\func_get_args()); + return $this->initializeLazyObject()->debug(...\func_get_args()); } public function decr($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); + return $this->initializeLazyObject()->decr(...\func_get_args()); } public function decrBy($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrBy(...\func_get_args()); + return $this->initializeLazyObject()->decrBy(...\func_get_args()); } public function del($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); + return $this->initializeLazyObject()->del(...\func_get_args()); } public function discard() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); + return $this->initializeLazyObject()->discard(...\func_get_args()); } public function dump($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dump(...\func_get_args()); } public function echo($msg) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); + return $this->initializeLazyObject()->echo(...\func_get_args()); } public function eval($script, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); + return $this->initializeLazyObject()->eval(...\func_get_args()); } public function evalsha($script_sha, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); + return $this->initializeLazyObject()->evalsha(...\func_get_args()); } public function exec() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); + return $this->initializeLazyObject()->exec(...\func_get_args()); } public function exists($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); + return $this->initializeLazyObject()->exists(...\func_get_args()); } public function expire($key, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); + return $this->initializeLazyObject()->expire(...\func_get_args()); } public function expireAt($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireAt(...\func_get_args()); + return $this->initializeLazyObject()->expireAt(...\func_get_args()); } public function flushAll($async = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushAll(...\func_get_args()); + return $this->initializeLazyObject()->flushAll(...\func_get_args()); } public function flushDB($async = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushDB(...\func_get_args()); + return $this->initializeLazyObject()->flushDB(...\func_get_args()); } public function geoadd($key, $lng, $lat, $member, ...$other_triples) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); + return $this->initializeLazyObject()->geoadd(...\func_get_args()); } public function geodist($key, $src, $dst, $unit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); + return $this->initializeLazyObject()->geodist(...\func_get_args()); } public function geohash($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); + return $this->initializeLazyObject()->geohash(...\func_get_args()); } public function geopos($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); + return $this->initializeLazyObject()->geopos(...\func_get_args()); } public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); + return $this->initializeLazyObject()->georadius(...\func_get_args()); } public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); } public function georadiusbymember($key, $member, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); } public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); } public function get($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); + return $this->initializeLazyObject()->get(...\func_get_args()); } public function getAuth() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); + return $this->initializeLazyObject()->getAuth(...\func_get_args()); } public function getBit($key, $offset) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBit(...\func_get_args()); + return $this->initializeLazyObject()->getBit(...\func_get_args()); } public function getDBNum() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDBNum(...\func_get_args()); + return $this->initializeLazyObject()->getDBNum(...\func_get_args()); } public function getHost() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); + return $this->initializeLazyObject()->getHost(...\func_get_args()); } public function getLastError() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); + return $this->initializeLazyObject()->getLastError(...\func_get_args()); } public function getMode() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); + return $this->initializeLazyObject()->getMode(...\func_get_args()); } public function getOption($option) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); + return $this->initializeLazyObject()->getOption(...\func_get_args()); } public function getPersistentID() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); + return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); } public function getPort() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); + return $this->initializeLazyObject()->getPort(...\func_get_args()); } public function getRange($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getRange(...\func_get_args()); + return $this->initializeLazyObject()->getRange(...\func_get_args()); } public function getReadTimeout() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); } public function getSet($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getSet(...\func_get_args()); + return $this->initializeLazyObject()->getSet(...\func_get_args()); } public function getTimeout() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getTimeout(...\func_get_args()); } public function hDel($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hDel(...\func_get_args()); + return $this->initializeLazyObject()->hDel(...\func_get_args()); } public function hExists($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hExists(...\func_get_args()); + return $this->initializeLazyObject()->hExists(...\func_get_args()); } public function hGet($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGet(...\func_get_args()); + return $this->initializeLazyObject()->hGet(...\func_get_args()); } public function hGetAll($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGetAll(...\func_get_args()); + return $this->initializeLazyObject()->hGetAll(...\func_get_args()); } public function hIncrBy($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrBy(...\func_get_args()); + return $this->initializeLazyObject()->hIncrBy(...\func_get_args()); } public function hIncrByFloat($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrByFloat(...\func_get_args()); + return $this->initializeLazyObject()->hIncrByFloat(...\func_get_args()); } public function hKeys($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hKeys(...\func_get_args()); + return $this->initializeLazyObject()->hKeys(...\func_get_args()); } public function hLen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hLen(...\func_get_args()); + return $this->initializeLazyObject()->hLen(...\func_get_args()); } public function hMget($key, $keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMget(...\func_get_args()); + return $this->initializeLazyObject()->hMget(...\func_get_args()); } public function hMset($key, $pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMset(...\func_get_args()); + return $this->initializeLazyObject()->hMset(...\func_get_args()); } public function hSet($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); + return $this->initializeLazyObject()->hSet(...\func_get_args()); } public function hSetNx($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSetNx(...\func_get_args()); + return $this->initializeLazyObject()->hSetNx(...\func_get_args()); } public function hStrLen($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hStrLen(...\func_get_args()); + return $this->initializeLazyObject()->hStrLen(...\func_get_args()); } public function hVals($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hVals(...\func_get_args()); + return $this->initializeLazyObject()->hVals(...\func_get_args()); } public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function incr($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); + return $this->initializeLazyObject()->incr(...\func_get_args()); } public function incrBy($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrBy(...\func_get_args()); + return $this->initializeLazyObject()->incrBy(...\func_get_args()); } public function incrByFloat($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrByFloat(...\func_get_args()); + return $this->initializeLazyObject()->incrByFloat(...\func_get_args()); } public function info($option = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); + return $this->initializeLazyObject()->info(...\func_get_args()); } public function isConnected() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); + return $this->initializeLazyObject()->isConnected(...\func_get_args()); } public function keys($pattern) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); + return $this->initializeLazyObject()->keys(...\func_get_args()); } public function lInsert($key, $position, $pivot, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lInsert(...\func_get_args()); + return $this->initializeLazyObject()->lInsert(...\func_get_args()); } public function lLen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lLen(...\func_get_args()); + return $this->initializeLazyObject()->lLen(...\func_get_args()); } public function lPop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPop(...\func_get_args()); + return $this->initializeLazyObject()->lPop(...\func_get_args()); } public function lPush($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPush(...\func_get_args()); + return $this->initializeLazyObject()->lPush(...\func_get_args()); } public function lPushx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPushx(...\func_get_args()); + return $this->initializeLazyObject()->lPushx(...\func_get_args()); } public function lSet($key, $index, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSet(...\func_get_args()); + return $this->initializeLazyObject()->lSet(...\func_get_args()); } public function lastSave() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastSave(...\func_get_args()); + return $this->initializeLazyObject()->lastSave(...\func_get_args()); } public function lindex($key, $index) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); + return $this->initializeLazyObject()->lindex(...\func_get_args()); } public function lrange($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); + return $this->initializeLazyObject()->lrange(...\func_get_args()); } public function lrem($key, $value, $count) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); + return $this->initializeLazyObject()->lrem(...\func_get_args()); } public function ltrim($key, $start, $stop) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); + return $this->initializeLazyObject()->ltrim(...\func_get_args()); } public function mget($keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function migrate($host, $port, $key, $db, $timeout, $copy = null, $replace = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); + return $this->initializeLazyObject()->migrate(...\func_get_args()); } public function move($key, $dbindex) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); + return $this->initializeLazyObject()->move(...\func_get_args()); } public function mset($pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); + return $this->initializeLazyObject()->mset(...\func_get_args()); } public function msetnx($pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); + return $this->initializeLazyObject()->msetnx(...\func_get_args()); } public function multi($mode = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); + return $this->initializeLazyObject()->multi(...\func_get_args()); } public function object($field, $key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); + return $this->initializeLazyObject()->object(...\func_get_args()); } public function pconnect($host, $port = null, $timeout = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); + return $this->initializeLazyObject()->pconnect(...\func_get_args()); } public function persist($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); + return $this->initializeLazyObject()->persist(...\func_get_args()); } public function pexpire($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); + return $this->initializeLazyObject()->pexpire(...\func_get_args()); } public function pexpireAt($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireAt(...\func_get_args()); + return $this->initializeLazyObject()->pexpireAt(...\func_get_args()); } public function pfadd($key, $elements) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); + return $this->initializeLazyObject()->pfadd(...\func_get_args()); } public function pfcount($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); + return $this->initializeLazyObject()->pfcount(...\func_get_args()); } public function pfmerge($dstkey, $keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); + return $this->initializeLazyObject()->pfmerge(...\func_get_args()); } public function ping() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); + return $this->initializeLazyObject()->ping(...\func_get_args()); } public function pipeline() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); + return $this->initializeLazyObject()->pipeline(...\func_get_args()); } public function psetex($key, $expire, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); + return $this->initializeLazyObject()->psetex(...\func_get_args()); } public function psubscribe($patterns, $callback) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); + return $this->initializeLazyObject()->psubscribe(...\func_get_args()); } public function pttl($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); + return $this->initializeLazyObject()->pttl(...\func_get_args()); } public function publish($channel, $message) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } public function pubsub($cmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); + return $this->initializeLazyObject()->pubsub(...\func_get_args()); } public function punsubscribe($pattern, ...$other_patterns) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); } public function rPop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPop(...\func_get_args()); + return $this->initializeLazyObject()->rPop(...\func_get_args()); } public function rPush($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPush(...\func_get_args()); + return $this->initializeLazyObject()->rPush(...\func_get_args()); } public function rPushx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPushx(...\func_get_args()); + return $this->initializeLazyObject()->rPushx(...\func_get_args()); } public function randomKey() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomKey(...\func_get_args()); + return $this->initializeLazyObject()->randomKey(...\func_get_args()); } public function rawcommand($cmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); + return $this->initializeLazyObject()->rawcommand(...\func_get_args()); } public function rename($key, $newkey) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); + return $this->initializeLazyObject()->rename(...\func_get_args()); } public function renameNx($key, $newkey) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameNx(...\func_get_args()); + return $this->initializeLazyObject()->renameNx(...\func_get_args()); } public function restore($ttl, $key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); + return $this->initializeLazyObject()->restore(...\func_get_args()); } public function role() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); + return $this->initializeLazyObject()->role(...\func_get_args()); } public function rpoplpush($src, $dst) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); } public function sAdd($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAdd(...\func_get_args()); + return $this->initializeLazyObject()->sAdd(...\func_get_args()); } public function sAddArray($key, $options) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAddArray(...\func_get_args()); + return $this->initializeLazyObject()->sAddArray(...\func_get_args()); } public function sDiff($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiff(...\func_get_args()); + return $this->initializeLazyObject()->sDiff(...\func_get_args()); } public function sDiffStore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiffStore(...\func_get_args()); + return $this->initializeLazyObject()->sDiffStore(...\func_get_args()); } public function sInter($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInter(...\func_get_args()); + return $this->initializeLazyObject()->sInter(...\func_get_args()); } public function sInterStore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInterStore(...\func_get_args()); + return $this->initializeLazyObject()->sInterStore(...\func_get_args()); } public function sMembers($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMembers(...\func_get_args()); + return $this->initializeLazyObject()->sMembers(...\func_get_args()); } public function sMisMember($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMisMember(...\func_get_args()); + return $this->initializeLazyObject()->sMisMember(...\func_get_args()); } public function sMove($src, $dst, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMove(...\func_get_args()); + return $this->initializeLazyObject()->sMove(...\func_get_args()); } public function sPop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sPop(...\func_get_args()); + return $this->initializeLazyObject()->sPop(...\func_get_args()); } public function sRandMember($key, $count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRandMember(...\func_get_args()); + return $this->initializeLazyObject()->sRandMember(...\func_get_args()); } public function sUnion($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnion(...\func_get_args()); + return $this->initializeLazyObject()->sUnion(...\func_get_args()); } public function sUnionStore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnionStore(...\func_get_args()); + return $this->initializeLazyObject()->sUnionStore(...\func_get_args()); } public function save() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); + return $this->initializeLazyObject()->save(...\func_get_args()); } public function scan(&$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); + return $this->initializeLazyObject()->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); } public function scard($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); + return $this->initializeLazyObject()->scard(...\func_get_args()); } public function script($cmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); + return $this->initializeLazyObject()->script(...\func_get_args()); } public function select($dbindex) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); + return $this->initializeLazyObject()->select(...\func_get_args()); } public function set($key, $value, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); + return $this->initializeLazyObject()->set(...\func_get_args()); } public function setBit($key, $offset, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setBit(...\func_get_args()); + return $this->initializeLazyObject()->setBit(...\func_get_args()); } public function setOption($option, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); + return $this->initializeLazyObject()->setOption(...\func_get_args()); } public function setRange($key, $offset, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setRange(...\func_get_args()); + return $this->initializeLazyObject()->setRange(...\func_get_args()); } public function setex($key, $expire, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); + return $this->initializeLazyObject()->setex(...\func_get_args()); } public function setnx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); + return $this->initializeLazyObject()->setnx(...\func_get_args()); } public function sismember($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); + return $this->initializeLazyObject()->sismember(...\func_get_args()); } public function slaveof($host = null, $port = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slaveof(...\func_get_args()); + return $this->initializeLazyObject()->slaveof(...\func_get_args()); } public function slowlog($arg, $option = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); + return $this->initializeLazyObject()->slowlog(...\func_get_args()); } public function sort($key, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); + return $this->initializeLazyObject()->sort(...\func_get_args()); } public function sortAsc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAsc(...\func_get_args()); + return $this->initializeLazyObject()->sortAsc(...\func_get_args()); } public function sortAscAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAscAlpha(...\func_get_args()); + return $this->initializeLazyObject()->sortAscAlpha(...\func_get_args()); } public function sortDesc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDesc(...\func_get_args()); + return $this->initializeLazyObject()->sortDesc(...\func_get_args()); } public function sortDescAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDescAlpha(...\func_get_args()); + return $this->initializeLazyObject()->sortDescAlpha(...\func_get_args()); } public function srem($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); + return $this->initializeLazyObject()->srem(...\func_get_args()); } public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function strlen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); + return $this->initializeLazyObject()->strlen(...\func_get_args()); } public function subscribe($channels, $callback) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); + return $this->initializeLazyObject()->subscribe(...\func_get_args()); } public function swapdb($srcdb, $dstdb) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->swapdb(...\func_get_args()); + return $this->initializeLazyObject()->swapdb(...\func_get_args()); } public function time() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); + return $this->initializeLazyObject()->time(...\func_get_args()); } public function ttl($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); + return $this->initializeLazyObject()->ttl(...\func_get_args()); } public function type($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); + return $this->initializeLazyObject()->type(...\func_get_args()); } public function unlink($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); + return $this->initializeLazyObject()->unlink(...\func_get_args()); } public function unsubscribe($channel, ...$other_channels) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); } public function unwatch() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); + return $this->initializeLazyObject()->unwatch(...\func_get_args()); } public function wait($numslaves, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); + return $this->initializeLazyObject()->wait(...\func_get_args()); } public function watch($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); + return $this->initializeLazyObject()->watch(...\func_get_args()); } public function xack($str_key, $str_group, $arr_ids) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); + return $this->initializeLazyObject()->xack(...\func_get_args()); } public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); + return $this->initializeLazyObject()->xadd(...\func_get_args()); } public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); + return $this->initializeLazyObject()->xclaim(...\func_get_args()); } public function xdel($str_key, $arr_ids) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); + return $this->initializeLazyObject()->xdel(...\func_get_args()); } public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); + return $this->initializeLazyObject()->xgroup(...\func_get_args()); } public function xinfo($str_cmd, $str_key = null, $str_group = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); + return $this->initializeLazyObject()->xinfo(...\func_get_args()); } public function xlen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); + return $this->initializeLazyObject()->xlen(...\func_get_args()); } public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); + return $this->initializeLazyObject()->xpending(...\func_get_args()); } public function xrange($str_key, $str_start, $str_end, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); + return $this->initializeLazyObject()->xrange(...\func_get_args()); } public function xread($arr_streams, $i_count = null, $i_block = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); + return $this->initializeLazyObject()->xread(...\func_get_args()); } public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); + return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); } public function xrevrange($str_key, $str_start, $str_end, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); + return $this->initializeLazyObject()->xrevrange(...\func_get_args()); } public function xtrim($str_key, $i_maxlen, $boo_approximate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); + return $this->initializeLazyObject()->xtrim(...\func_get_args()); } public function zAdd($key, $score, $value, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zAdd(...\func_get_args()); + return $this->initializeLazyObject()->zAdd(...\func_get_args()); } public function zCard($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCard(...\func_get_args()); + return $this->initializeLazyObject()->zCard(...\func_get_args()); } public function zCount($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCount(...\func_get_args()); + return $this->initializeLazyObject()->zCount(...\func_get_args()); } public function zIncrBy($key, $value, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zIncrBy(...\func_get_args()); + return $this->initializeLazyObject()->zIncrBy(...\func_get_args()); } public function zLexCount($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zLexCount(...\func_get_args()); + return $this->initializeLazyObject()->zLexCount(...\func_get_args()); } public function zPopMax($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMax(...\func_get_args()); + return $this->initializeLazyObject()->zPopMax(...\func_get_args()); } public function zPopMin($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMin(...\func_get_args()); + return $this->initializeLazyObject()->zPopMin(...\func_get_args()); } public function zRange($key, $start, $end, $scores = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRange(...\func_get_args()); + return $this->initializeLazyObject()->zRange(...\func_get_args()); } public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRangeByLex(...\func_get_args()); } public function zRangeByScore($key, $start, $end, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRangeByScore(...\func_get_args()); } public function zRank($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRank(...\func_get_args()); + return $this->initializeLazyObject()->zRank(...\func_get_args()); } public function zRem($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRem(...\func_get_args()); + return $this->initializeLazyObject()->zRem(...\func_get_args()); } public function zRemRangeByLex($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByLex(...\func_get_args()); } public function zRemRangeByRank($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByRank(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByRank(...\func_get_args()); } public function zRemRangeByScore($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByScore(...\func_get_args()); } public function zRevRange($key, $start, $end, $scores = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRange(...\func_get_args()); + return $this->initializeLazyObject()->zRevRange(...\func_get_args()); } public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRevRangeByLex(...\func_get_args()); } public function zRevRangeByScore($key, $start, $end, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRevRangeByScore(...\func_get_args()); } public function zRevRank($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRank(...\func_get_args()); + return $this->initializeLazyObject()->zRevRank(...\func_get_args()); } public function zScore($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zScore(...\func_get_args()); + return $this->initializeLazyObject()->zScore(...\func_get_args()); } public function zinterstore($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); + return $this->initializeLazyObject()->zinterstore(...\func_get_args()); } public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function zunionstore($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); + return $this->initializeLazyObject()->zunionstore(...\func_get_args()); } public function delete($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->delete(...\func_get_args()); + return $this->initializeLazyObject()->delete(...\func_get_args()); } public function evaluate($script, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evaluate(...\func_get_args()); + return $this->initializeLazyObject()->evaluate(...\func_get_args()); } public function evaluateSha($script_sha, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evaluateSha(...\func_get_args()); + return $this->initializeLazyObject()->evaluateSha(...\func_get_args()); } public function getKeys($pattern) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getKeys(...\func_get_args()); + return $this->initializeLazyObject()->getKeys(...\func_get_args()); } public function getMultiple($keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMultiple(...\func_get_args()); + return $this->initializeLazyObject()->getMultiple(...\func_get_args()); } public function lGet($key, $index) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lGet(...\func_get_args()); + return $this->initializeLazyObject()->lGet(...\func_get_args()); } public function lGetRange($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lGetRange(...\func_get_args()); + return $this->initializeLazyObject()->lGetRange(...\func_get_args()); } public function lRemove($key, $value, $count) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lRemove(...\func_get_args()); + return $this->initializeLazyObject()->lRemove(...\func_get_args()); } public function lSize($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSize(...\func_get_args()); + return $this->initializeLazyObject()->lSize(...\func_get_args()); } public function listTrim($key, $start, $stop) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->listTrim(...\func_get_args()); + return $this->initializeLazyObject()->listTrim(...\func_get_args()); } public function open($host, $port = null, $timeout = null, $retry_interval = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->open(...\func_get_args()); + return $this->initializeLazyObject()->open(...\func_get_args()); } public function popen($host, $port = null, $timeout = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->popen(...\func_get_args()); + return $this->initializeLazyObject()->popen(...\func_get_args()); } public function renameKey($key, $newkey) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameKey(...\func_get_args()); + return $this->initializeLazyObject()->renameKey(...\func_get_args()); } public function sContains($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sContains(...\func_get_args()); + return $this->initializeLazyObject()->sContains(...\func_get_args()); } public function sGetMembers($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sGetMembers(...\func_get_args()); + return $this->initializeLazyObject()->sGetMembers(...\func_get_args()); } public function sRemove($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRemove(...\func_get_args()); + return $this->initializeLazyObject()->sRemove(...\func_get_args()); } public function sSize($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sSize(...\func_get_args()); + return $this->initializeLazyObject()->sSize(...\func_get_args()); } public function sendEcho($msg) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sendEcho(...\func_get_args()); + return $this->initializeLazyObject()->sendEcho(...\func_get_args()); } public function setTimeout($key, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setTimeout(...\func_get_args()); + return $this->initializeLazyObject()->setTimeout(...\func_get_args()); } public function substr($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->substr(...\func_get_args()); + return $this->initializeLazyObject()->substr(...\func_get_args()); } public function zDelete($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDelete(...\func_get_args()); + return $this->initializeLazyObject()->zDelete(...\func_get_args()); } public function zDeleteRangeByRank($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDeleteRangeByRank(...\func_get_args()); + return $this->initializeLazyObject()->zDeleteRangeByRank(...\func_get_args()); } public function zDeleteRangeByScore($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDeleteRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zDeleteRangeByScore(...\func_get_args()); } public function zInter($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zInter(...\func_get_args()); + return $this->initializeLazyObject()->zInter(...\func_get_args()); } public function zRemove($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemove(...\func_get_args()); + return $this->initializeLazyObject()->zRemove(...\func_get_args()); } public function zRemoveRangeByScore($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemoveRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRemoveRangeByScore(...\func_get_args()); } public function zReverseRange($key, $start, $end, $scores = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zReverseRange(...\func_get_args()); + return $this->initializeLazyObject()->zReverseRange(...\func_get_args()); } public function zSize($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zSize(...\func_get_args()); + return $this->initializeLazyObject()->zSize(...\func_get_args()); } public function zUnion($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zUnion(...\func_get_args()); + return $this->initializeLazyObject()->zUnion(...\func_get_args()); } } diff --git a/app/vendor/symfony/cache/Traits/Redis6Proxy.php b/app/vendor/symfony/cache/Traits/Redis6Proxy.php index c841d4269..c7e05cd3f 100644 --- a/app/vendor/symfony/cache/Traits/Redis6Proxy.php +++ b/app/vendor/symfony/cache/Traits/Redis6Proxy.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Cache\Traits; use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Component\VarExporter\LazyProxyTrait; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-needed symbols @@ -26,1244 +25,1242 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); class Redis6Proxy extends \Redis implements ResetInterface, LazyObjectInterface { use Redis6ProxyTrait; - use LazyProxyTrait { + use RedisProxyTrait { resetLazyObject as reset; } - private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct($options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); + $this->initializeLazyObject()->__construct(...\func_get_args()); } public function _compress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); + return $this->initializeLazyObject()->_compress(...\func_get_args()); } public function _uncompress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); + return $this->initializeLazyObject()->_uncompress(...\func_get_args()); } public function _prefix($key): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); + return $this->initializeLazyObject()->_prefix(...\func_get_args()); } public function _serialize($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); + return $this->initializeLazyObject()->_serialize(...\func_get_args()); } public function _unserialize($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); + return $this->initializeLazyObject()->_unserialize(...\func_get_args()); } public function _pack($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); + return $this->initializeLazyObject()->_pack(...\func_get_args()); } public function _unpack($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); + return $this->initializeLazyObject()->_unpack(...\func_get_args()); } public function acl($subcmd, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); + return $this->initializeLazyObject()->acl(...\func_get_args()); } public function append($key, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); + return $this->initializeLazyObject()->append(...\func_get_args()); } public function auth(#[\SensitiveParameter] $credentials): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); + return $this->initializeLazyObject()->auth(...\func_get_args()); } public function bgSave(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgSave(...\func_get_args()); + return $this->initializeLazyObject()->bgSave(...\func_get_args()); } public function bgrewriteaof(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); + return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); } public function bitcount($key, $start = 0, $end = -1, $bybit = false): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); + return $this->initializeLazyObject()->bitcount(...\func_get_args()); } public function bitop($operation, $deskey, $srckey, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); + return $this->initializeLazyObject()->bitop(...\func_get_args()); } public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); + return $this->initializeLazyObject()->bitpos(...\func_get_args()); } public function blPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blPop(...\func_get_args()); + return $this->initializeLazyObject()->blPop(...\func_get_args()); } public function brPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brPop(...\func_get_args()); + return $this->initializeLazyObject()->brPop(...\func_get_args()); } public function brpoplpush($src, $dst, $timeout): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); } public function bzPopMax($key, $timeout_or_key, ...$extra_args): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMax(...\func_get_args()); + return $this->initializeLazyObject()->bzPopMax(...\func_get_args()); } public function bzPopMin($key, $timeout_or_key, ...$extra_args): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMin(...\func_get_args()); + return $this->initializeLazyObject()->bzPopMin(...\func_get_args()); } public function bzmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); + return $this->initializeLazyObject()->bzmpop(...\func_get_args()); } public function zmpop($keys, $from, $count = 1): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); + return $this->initializeLazyObject()->zmpop(...\func_get_args()); } public function blmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); + return $this->initializeLazyObject()->blmpop(...\func_get_args()); } public function lmpop($keys, $from, $count = 1): \Redis|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); + return $this->initializeLazyObject()->lmpop(...\func_get_args()); } public function clearLastError(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); + return $this->initializeLazyObject()->clearLastError(...\func_get_args()); } public function client($opt, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); + return $this->initializeLazyObject()->client(...\func_get_args()); } public function close(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); + return $this->initializeLazyObject()->close(...\func_get_args()); } public function command($opt = null, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); + return $this->initializeLazyObject()->command(...\func_get_args()); } public function config($operation, $key_or_settings = null, $value = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); + return $this->initializeLazyObject()->config(...\func_get_args()); } public function connect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); + return $this->initializeLazyObject()->connect(...\func_get_args()); } public function copy($src, $dst, $options = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); + return $this->initializeLazyObject()->copy(...\func_get_args()); } public function dbSize(): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbSize(...\func_get_args()); + return $this->initializeLazyObject()->dbSize(...\func_get_args()); } public function debug($key): \Redis|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->debug(...\func_get_args()); + return $this->initializeLazyObject()->debug(...\func_get_args()); } public function decr($key, $by = 1): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); + return $this->initializeLazyObject()->decr(...\func_get_args()); } public function decrBy($key, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrBy(...\func_get_args()); + return $this->initializeLazyObject()->decrBy(...\func_get_args()); } public function del($key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); + return $this->initializeLazyObject()->del(...\func_get_args()); } public function delete($key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->delete(...\func_get_args()); + return $this->initializeLazyObject()->delete(...\func_get_args()); } public function discard(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); + return $this->initializeLazyObject()->discard(...\func_get_args()); } public function echo($str): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); + return $this->initializeLazyObject()->echo(...\func_get_args()); } public function eval($script, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); + return $this->initializeLazyObject()->eval(...\func_get_args()); } public function eval_ro($script_sha, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); + return $this->initializeLazyObject()->eval_ro(...\func_get_args()); } public function evalsha($sha1, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); + return $this->initializeLazyObject()->evalsha(...\func_get_args()); } public function evalsha_ro($sha1, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); + return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); } public function exec(): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); + return $this->initializeLazyObject()->exec(...\func_get_args()); } public function exists($key, ...$other_keys): \Redis|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); + return $this->initializeLazyObject()->exists(...\func_get_args()); } public function expire($key, $timeout, $mode = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); + return $this->initializeLazyObject()->expire(...\func_get_args()); } public function expireAt($key, $timestamp, $mode = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireAt(...\func_get_args()); + return $this->initializeLazyObject()->expireAt(...\func_get_args()); } public function failover($to = null, $abort = false, $timeout = 0): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->failover(...\func_get_args()); + return $this->initializeLazyObject()->failover(...\func_get_args()); } public function expiretime($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); + return $this->initializeLazyObject()->expiretime(...\func_get_args()); } public function pexpiretime($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); + return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); } public function fcall($fn, $keys = [], $args = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall(...\func_get_args()); + return $this->initializeLazyObject()->fcall(...\func_get_args()); } public function fcall_ro($fn, $keys = [], $args = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall_ro(...\func_get_args()); + return $this->initializeLazyObject()->fcall_ro(...\func_get_args()); } public function flushAll($sync = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushAll(...\func_get_args()); + return $this->initializeLazyObject()->flushAll(...\func_get_args()); } public function flushDB($sync = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushDB(...\func_get_args()); + return $this->initializeLazyObject()->flushDB(...\func_get_args()); } public function function($operation, ...$args): \Redis|array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->function(...\func_get_args()); + return $this->initializeLazyObject()->function(...\func_get_args()); } public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); + return $this->initializeLazyObject()->geoadd(...\func_get_args()); } public function geodist($key, $src, $dst, $unit = null): \Redis|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); + return $this->initializeLazyObject()->geodist(...\func_get_args()); } public function geohash($key, $member, ...$other_members): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); + return $this->initializeLazyObject()->geohash(...\func_get_args()); } public function geopos($key, $member, ...$other_members): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); + return $this->initializeLazyObject()->geopos(...\func_get_args()); } public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); + return $this->initializeLazyObject()->georadius(...\func_get_args()); } public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); } public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); } public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); } public function geosearch($key, $position, $shape, $unit, $options = []): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); + return $this->initializeLazyObject()->geosearch(...\func_get_args()); } public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Redis|array|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); + return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); } public function get($key): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); + return $this->initializeLazyObject()->get(...\func_get_args()); } public function getAuth(): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); + return $this->initializeLazyObject()->getAuth(...\func_get_args()); } public function getBit($key, $idx): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBit(...\func_get_args()); + return $this->initializeLazyObject()->getBit(...\func_get_args()); } public function getEx($key, $options = []): \Redis|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getEx(...\func_get_args()); + return $this->initializeLazyObject()->getEx(...\func_get_args()); } public function getDBNum(): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDBNum(...\func_get_args()); + return $this->initializeLazyObject()->getDBNum(...\func_get_args()); } public function getDel($key): \Redis|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDel(...\func_get_args()); + return $this->initializeLazyObject()->getDel(...\func_get_args()); } public function getHost(): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); + return $this->initializeLazyObject()->getHost(...\func_get_args()); } public function getLastError(): ?string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); + return $this->initializeLazyObject()->getLastError(...\func_get_args()); } public function getMode(): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); + return $this->initializeLazyObject()->getMode(...\func_get_args()); } public function getOption($option): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); + return $this->initializeLazyObject()->getOption(...\func_get_args()); } public function getPersistentID(): ?string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); + return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); } public function getPort(): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); + return $this->initializeLazyObject()->getPort(...\func_get_args()); } public function getRange($key, $start, $end): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getRange(...\func_get_args()); + return $this->initializeLazyObject()->getRange(...\func_get_args()); } public function lcs($key1, $key2, $options = null): \Redis|array|false|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); + return $this->initializeLazyObject()->lcs(...\func_get_args()); } public function getReadTimeout(): float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); } public function getset($key, $value): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); + return $this->initializeLazyObject()->getset(...\func_get_args()); } public function getTimeout(): false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getTimeout(...\func_get_args()); } public function getTransferredBytes(): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTransferredBytes(...\func_get_args()); + return $this->initializeLazyObject()->getTransferredBytes(...\func_get_args()); } public function clearTransferredBytes(): void { - ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearTransferredBytes(...\func_get_args()); + $this->initializeLazyObject()->clearTransferredBytes(...\func_get_args()); } public function hDel($key, $field, ...$other_fields): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hDel(...\func_get_args()); + return $this->initializeLazyObject()->hDel(...\func_get_args()); } public function hExists($key, $field): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hExists(...\func_get_args()); + return $this->initializeLazyObject()->hExists(...\func_get_args()); } public function hGet($key, $member): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGet(...\func_get_args()); + return $this->initializeLazyObject()->hGet(...\func_get_args()); } public function hGetAll($key): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGetAll(...\func_get_args()); + return $this->initializeLazyObject()->hGetAll(...\func_get_args()); } public function hIncrBy($key, $field, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrBy(...\func_get_args()); + return $this->initializeLazyObject()->hIncrBy(...\func_get_args()); } public function hIncrByFloat($key, $field, $value): \Redis|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrByFloat(...\func_get_args()); + return $this->initializeLazyObject()->hIncrByFloat(...\func_get_args()); } public function hKeys($key): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hKeys(...\func_get_args()); + return $this->initializeLazyObject()->hKeys(...\func_get_args()); } public function hLen($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hLen(...\func_get_args()); + return $this->initializeLazyObject()->hLen(...\func_get_args()); } public function hMget($key, $fields): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMget(...\func_get_args()); + return $this->initializeLazyObject()->hMget(...\func_get_args()); } public function hMset($key, $fieldvals): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMset(...\func_get_args()); + return $this->initializeLazyObject()->hMset(...\func_get_args()); } public function hSetNx($key, $field, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSetNx(...\func_get_args()); + return $this->initializeLazyObject()->hSetNx(...\func_get_args()); } public function hStrLen($key, $field): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hStrLen(...\func_get_args()); + return $this->initializeLazyObject()->hStrLen(...\func_get_args()); } public function hVals($key): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hVals(...\func_get_args()); + return $this->initializeLazyObject()->hVals(...\func_get_args()); } public function hscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function incr($key, $by = 1): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); + return $this->initializeLazyObject()->incr(...\func_get_args()); } public function incrBy($key, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrBy(...\func_get_args()); + return $this->initializeLazyObject()->incrBy(...\func_get_args()); } public function incrByFloat($key, $value): \Redis|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrByFloat(...\func_get_args()); + return $this->initializeLazyObject()->incrByFloat(...\func_get_args()); } public function info(...$sections): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); + return $this->initializeLazyObject()->info(...\func_get_args()); } public function isConnected(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); + return $this->initializeLazyObject()->isConnected(...\func_get_args()); } public function keys($pattern) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); + return $this->initializeLazyObject()->keys(...\func_get_args()); } public function lInsert($key, $pos, $pivot, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lInsert(...\func_get_args()); + return $this->initializeLazyObject()->lInsert(...\func_get_args()); } public function lLen($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lLen(...\func_get_args()); + return $this->initializeLazyObject()->lLen(...\func_get_args()); } public function lMove($src, $dst, $wherefrom, $whereto): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lMove(...\func_get_args()); + return $this->initializeLazyObject()->lMove(...\func_get_args()); } public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); + return $this->initializeLazyObject()->blmove(...\func_get_args()); } public function lPop($key, $count = 0): \Redis|array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPop(...\func_get_args()); + return $this->initializeLazyObject()->lPop(...\func_get_args()); } public function lPos($key, $value, $options = null): \Redis|array|bool|int|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPos(...\func_get_args()); + return $this->initializeLazyObject()->lPos(...\func_get_args()); } public function lPush($key, ...$elements): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPush(...\func_get_args()); + return $this->initializeLazyObject()->lPush(...\func_get_args()); } public function rPush($key, ...$elements): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPush(...\func_get_args()); + return $this->initializeLazyObject()->rPush(...\func_get_args()); } public function lPushx($key, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPushx(...\func_get_args()); + return $this->initializeLazyObject()->lPushx(...\func_get_args()); } public function rPushx($key, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPushx(...\func_get_args()); + return $this->initializeLazyObject()->rPushx(...\func_get_args()); } public function lSet($key, $index, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSet(...\func_get_args()); + return $this->initializeLazyObject()->lSet(...\func_get_args()); } public function lastSave(): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastSave(...\func_get_args()); + return $this->initializeLazyObject()->lastSave(...\func_get_args()); } public function lindex($key, $index): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); + return $this->initializeLazyObject()->lindex(...\func_get_args()); } public function lrange($key, $start, $end): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); + return $this->initializeLazyObject()->lrange(...\func_get_args()); } public function lrem($key, $value, $count = 0): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); + return $this->initializeLazyObject()->lrem(...\func_get_args()); } public function ltrim($key, $start, $end): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); + return $this->initializeLazyObject()->ltrim(...\func_get_args()); } public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); + return $this->initializeLazyObject()->migrate(...\func_get_args()); } public function move($key, $index): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); + return $this->initializeLazyObject()->move(...\func_get_args()); } public function mset($key_values): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); + return $this->initializeLazyObject()->mset(...\func_get_args()); } public function msetnx($key_values): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); + return $this->initializeLazyObject()->msetnx(...\func_get_args()); } public function multi($value = \Redis::MULTI): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); + return $this->initializeLazyObject()->multi(...\func_get_args()); } public function object($subcommand, $key): \Redis|false|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); + return $this->initializeLazyObject()->object(...\func_get_args()); } public function open($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->open(...\func_get_args()); + return $this->initializeLazyObject()->open(...\func_get_args()); } public function pconnect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); + return $this->initializeLazyObject()->pconnect(...\func_get_args()); } public function persist($key): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); + return $this->initializeLazyObject()->persist(...\func_get_args()); } public function pexpire($key, $timeout, $mode = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); + return $this->initializeLazyObject()->pexpire(...\func_get_args()); } public function pexpireAt($key, $timestamp, $mode = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireAt(...\func_get_args()); + return $this->initializeLazyObject()->pexpireAt(...\func_get_args()); } public function pfadd($key, $elements): \Redis|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); + return $this->initializeLazyObject()->pfadd(...\func_get_args()); } public function pfcount($key_or_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); + return $this->initializeLazyObject()->pfcount(...\func_get_args()); } public function pfmerge($dst, $srckeys): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); + return $this->initializeLazyObject()->pfmerge(...\func_get_args()); } public function ping($message = null): \Redis|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); + return $this->initializeLazyObject()->ping(...\func_get_args()); } public function pipeline(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); + return $this->initializeLazyObject()->pipeline(...\func_get_args()); } public function popen($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->popen(...\func_get_args()); + return $this->initializeLazyObject()->popen(...\func_get_args()); } public function psetex($key, $expire, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); + return $this->initializeLazyObject()->psetex(...\func_get_args()); } public function psubscribe($patterns, $cb): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); + return $this->initializeLazyObject()->psubscribe(...\func_get_args()); } public function pttl($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); + return $this->initializeLazyObject()->pttl(...\func_get_args()); } public function publish($channel, $message): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } public function pubsub($command, $arg = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); + return $this->initializeLazyObject()->pubsub(...\func_get_args()); } public function punsubscribe($patterns): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); } public function rPop($key, $count = 0): \Redis|array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPop(...\func_get_args()); + return $this->initializeLazyObject()->rPop(...\func_get_args()); } public function randomKey(): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomKey(...\func_get_args()); + return $this->initializeLazyObject()->randomKey(...\func_get_args()); } public function rawcommand($command, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); + return $this->initializeLazyObject()->rawcommand(...\func_get_args()); } public function rename($old_name, $new_name): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); + return $this->initializeLazyObject()->rename(...\func_get_args()); } public function renameNx($key_src, $key_dst): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameNx(...\func_get_args()); + return $this->initializeLazyObject()->renameNx(...\func_get_args()); } public function restore($key, $ttl, $value, $options = null): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); + return $this->initializeLazyObject()->restore(...\func_get_args()); } public function role(): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); + return $this->initializeLazyObject()->role(...\func_get_args()); } public function rpoplpush($srckey, $dstkey): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); } public function sAdd($key, $value, ...$other_values): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAdd(...\func_get_args()); + return $this->initializeLazyObject()->sAdd(...\func_get_args()); } public function sAddArray($key, $values): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAddArray(...\func_get_args()); + return $this->initializeLazyObject()->sAddArray(...\func_get_args()); } public function sDiff($key, ...$other_keys): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiff(...\func_get_args()); + return $this->initializeLazyObject()->sDiff(...\func_get_args()); } public function sDiffStore($dst, $key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiffStore(...\func_get_args()); + return $this->initializeLazyObject()->sDiffStore(...\func_get_args()); } public function sInter($key, ...$other_keys): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInter(...\func_get_args()); + return $this->initializeLazyObject()->sInter(...\func_get_args()); } public function sintercard($keys, $limit = -1): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); + return $this->initializeLazyObject()->sintercard(...\func_get_args()); } public function sInterStore($key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInterStore(...\func_get_args()); + return $this->initializeLazyObject()->sInterStore(...\func_get_args()); } public function sMembers($key): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMembers(...\func_get_args()); + return $this->initializeLazyObject()->sMembers(...\func_get_args()); } public function sMisMember($key, $member, ...$other_members): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMisMember(...\func_get_args()); + return $this->initializeLazyObject()->sMisMember(...\func_get_args()); } public function sMove($src, $dst, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMove(...\func_get_args()); + return $this->initializeLazyObject()->sMove(...\func_get_args()); } public function sPop($key, $count = 0): \Redis|array|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sPop(...\func_get_args()); + return $this->initializeLazyObject()->sPop(...\func_get_args()); } public function sUnion($key, ...$other_keys): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnion(...\func_get_args()); + return $this->initializeLazyObject()->sUnion(...\func_get_args()); } public function sUnionStore($dst, $key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnionStore(...\func_get_args()); + return $this->initializeLazyObject()->sUnionStore(...\func_get_args()); } public function save(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); + return $this->initializeLazyObject()->save(...\func_get_args()); } public function scan(&$iterator, $pattern = null, $count = 0, $type = null): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); + return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); } public function scard($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); + return $this->initializeLazyObject()->scard(...\func_get_args()); } public function script($command, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); + return $this->initializeLazyObject()->script(...\func_get_args()); } public function select($db): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); + return $this->initializeLazyObject()->select(...\func_get_args()); } public function set($key, $value, $options = null): \Redis|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); + return $this->initializeLazyObject()->set(...\func_get_args()); } public function setBit($key, $idx, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setBit(...\func_get_args()); + return $this->initializeLazyObject()->setBit(...\func_get_args()); } public function setRange($key, $index, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setRange(...\func_get_args()); + return $this->initializeLazyObject()->setRange(...\func_get_args()); } public function setOption($option, $value): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); + return $this->initializeLazyObject()->setOption(...\func_get_args()); } public function setex($key, $expire, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); + return $this->initializeLazyObject()->setex(...\func_get_args()); } public function setnx($key, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); + return $this->initializeLazyObject()->setnx(...\func_get_args()); } public function sismember($key, $value): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); + return $this->initializeLazyObject()->sismember(...\func_get_args()); } public function slaveof($host = null, $port = 6379): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slaveof(...\func_get_args()); + return $this->initializeLazyObject()->slaveof(...\func_get_args()); } public function replicaof($host = null, $port = 6379): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->replicaof(...\func_get_args()); + return $this->initializeLazyObject()->replicaof(...\func_get_args()); } public function touch($key_or_array, ...$more_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); + return $this->initializeLazyObject()->touch(...\func_get_args()); } public function slowlog($operation, $length = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); + return $this->initializeLazyObject()->slowlog(...\func_get_args()); } public function sort($key, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); + return $this->initializeLazyObject()->sort(...\func_get_args()); } public function sort_ro($key, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); + return $this->initializeLazyObject()->sort_ro(...\func_get_args()); } public function sortAsc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAsc(...\func_get_args()); + return $this->initializeLazyObject()->sortAsc(...\func_get_args()); } public function sortAscAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAscAlpha(...\func_get_args()); + return $this->initializeLazyObject()->sortAscAlpha(...\func_get_args()); } public function sortDesc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDesc(...\func_get_args()); + return $this->initializeLazyObject()->sortDesc(...\func_get_args()); } public function sortDescAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDescAlpha(...\func_get_args()); + return $this->initializeLazyObject()->sortDescAlpha(...\func_get_args()); } public function srem($key, $value, ...$other_values): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); + return $this->initializeLazyObject()->srem(...\func_get_args()); } public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function ssubscribe($channels, $cb): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ssubscribe(...\func_get_args()); + return $this->initializeLazyObject()->ssubscribe(...\func_get_args()); } public function strlen($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); + return $this->initializeLazyObject()->strlen(...\func_get_args()); } public function subscribe($channels, $cb): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); + return $this->initializeLazyObject()->subscribe(...\func_get_args()); } public function sunsubscribe($channels): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->sunsubscribe(...\func_get_args()); } public function swapdb($src, $dst): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->swapdb(...\func_get_args()); + return $this->initializeLazyObject()->swapdb(...\func_get_args()); } public function time(): \Redis|array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); + return $this->initializeLazyObject()->time(...\func_get_args()); } public function ttl($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); + return $this->initializeLazyObject()->ttl(...\func_get_args()); } public function type($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); + return $this->initializeLazyObject()->type(...\func_get_args()); } public function unlink($key, ...$other_keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); + return $this->initializeLazyObject()->unlink(...\func_get_args()); } public function unsubscribe($channels): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); } public function unwatch(): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); + return $this->initializeLazyObject()->unwatch(...\func_get_args()); } public function watch($key, ...$other_keys): \Redis|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); + return $this->initializeLazyObject()->watch(...\func_get_args()); } public function wait($numreplicas, $timeout): false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); + return $this->initializeLazyObject()->wait(...\func_get_args()); } public function xack($key, $group, $ids): false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); + return $this->initializeLazyObject()->xack(...\func_get_args()); } public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); + return $this->initializeLazyObject()->xadd(...\func_get_args()); } public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); + return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); } public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); + return $this->initializeLazyObject()->xclaim(...\func_get_args()); } public function xdel($key, $ids): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); + return $this->initializeLazyObject()->xdel(...\func_get_args()); } public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); + return $this->initializeLazyObject()->xgroup(...\func_get_args()); } public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); + return $this->initializeLazyObject()->xinfo(...\func_get_args()); } public function xlen($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); + return $this->initializeLazyObject()->xlen(...\func_get_args()); } public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); + return $this->initializeLazyObject()->xpending(...\func_get_args()); } public function xrange($key, $start, $end, $count = -1): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); + return $this->initializeLazyObject()->xrange(...\func_get_args()); } public function xread($streams, $count = -1, $block = -1): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); + return $this->initializeLazyObject()->xread(...\func_get_args()); } public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); + return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); } public function xrevrange($key, $end, $start, $count = -1): \Redis|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); + return $this->initializeLazyObject()->xrevrange(...\func_get_args()); } public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); + return $this->initializeLazyObject()->xtrim(...\func_get_args()); } public function zAdd($key, $score_or_options, ...$more_scores_and_mems): \Redis|false|float|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zAdd(...\func_get_args()); + return $this->initializeLazyObject()->zAdd(...\func_get_args()); } public function zCard($key): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCard(...\func_get_args()); + return $this->initializeLazyObject()->zCard(...\func_get_args()); } public function zCount($key, $start, $end): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCount(...\func_get_args()); + return $this->initializeLazyObject()->zCount(...\func_get_args()); } public function zIncrBy($key, $value, $member): \Redis|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zIncrBy(...\func_get_args()); + return $this->initializeLazyObject()->zIncrBy(...\func_get_args()); } public function zLexCount($key, $min, $max): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zLexCount(...\func_get_args()); + return $this->initializeLazyObject()->zLexCount(...\func_get_args()); } public function zMscore($key, $member, ...$other_members): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zMscore(...\func_get_args()); + return $this->initializeLazyObject()->zMscore(...\func_get_args()); } public function zPopMax($key, $count = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMax(...\func_get_args()); + return $this->initializeLazyObject()->zPopMax(...\func_get_args()); } public function zPopMin($key, $count = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMin(...\func_get_args()); + return $this->initializeLazyObject()->zPopMin(...\func_get_args()); } public function zRange($key, $start, $end, $options = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRange(...\func_get_args()); + return $this->initializeLazyObject()->zRange(...\func_get_args()); } public function zRangeByLex($key, $min, $max, $offset = -1, $count = -1): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRangeByLex(...\func_get_args()); } public function zRangeByScore($key, $start, $end, $options = []): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRangeByScore(...\func_get_args()); } public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); + return $this->initializeLazyObject()->zrangestore(...\func_get_args()); } public function zRandMember($key, $options = null): \Redis|array|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRandMember(...\func_get_args()); + return $this->initializeLazyObject()->zRandMember(...\func_get_args()); } public function zRank($key, $member): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRank(...\func_get_args()); + return $this->initializeLazyObject()->zRank(...\func_get_args()); } public function zRem($key, $member, ...$other_members): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRem(...\func_get_args()); + return $this->initializeLazyObject()->zRem(...\func_get_args()); } public function zRemRangeByLex($key, $min, $max): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByLex(...\func_get_args()); } public function zRemRangeByRank($key, $start, $end): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByRank(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByRank(...\func_get_args()); } public function zRemRangeByScore($key, $start, $end): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRemRangeByScore(...\func_get_args()); } public function zRevRange($key, $start, $end, $scores = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRange(...\func_get_args()); + return $this->initializeLazyObject()->zRevRange(...\func_get_args()); } public function zRevRangeByLex($key, $max, $min, $offset = -1, $count = -1): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByLex(...\func_get_args()); + return $this->initializeLazyObject()->zRevRangeByLex(...\func_get_args()); } public function zRevRangeByScore($key, $max, $min, $options = []): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByScore(...\func_get_args()); + return $this->initializeLazyObject()->zRevRangeByScore(...\func_get_args()); } public function zRevRank($key, $member): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRank(...\func_get_args()); + return $this->initializeLazyObject()->zRevRank(...\func_get_args()); } public function zScore($key, $member): \Redis|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zScore(...\func_get_args()); + return $this->initializeLazyObject()->zScore(...\func_get_args()); } public function zdiff($keys, $options = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); + return $this->initializeLazyObject()->zdiff(...\func_get_args()); } public function zdiffstore($dst, $keys): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); } public function zinter($keys, $weights = null, $options = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); + return $this->initializeLazyObject()->zinter(...\func_get_args()); } public function zintercard($keys, $limit = -1): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); + return $this->initializeLazyObject()->zintercard(...\func_get_args()); } public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); + return $this->initializeLazyObject()->zinterstore(...\func_get_args()); } public function zscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function zunion($keys, $weights = null, $options = null): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); + return $this->initializeLazyObject()->zunion(...\func_get_args()); } public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); + return $this->initializeLazyObject()->zunionstore(...\func_get_args()); } } diff --git a/app/vendor/symfony/cache/Traits/Redis6ProxyTrait.php b/app/vendor/symfony/cache/Traits/Redis6ProxyTrait.php index 34f60cb10..bb8d97849 100644 --- a/app/vendor/symfony/cache/Traits/Redis6ProxyTrait.php +++ b/app/vendor/symfony/cache/Traits/Redis6ProxyTrait.php @@ -19,32 +19,32 @@ trait Redis6ProxyTrait { public function dump($key): \Redis|string|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dump(...\func_get_args()); } public function hRandField($key, $options = null): \Redis|array|string|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hRandField(...\func_get_args()); + return $this->initializeLazyObject()->hRandField(...\func_get_args()); } public function hSet($key, ...$fields_and_vals): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); + return $this->initializeLazyObject()->hSet(...\func_get_args()); } public function mget($keys): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function sRandMember($key, $count = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRandMember(...\func_get_args()); + return $this->initializeLazyObject()->sRandMember(...\func_get_args()); } public function waitaof($numlocal, $numreplicas, $timeout): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); + return $this->initializeLazyObject()->waitaof(...\func_get_args()); } } } else { @@ -55,27 +55,27 @@ trait Redis6ProxyTrait { public function dump($key): \Redis|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dump(...\func_get_args()); } public function hRandField($key, $options = null): \Redis|array|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hRandField(...\func_get_args()); + return $this->initializeLazyObject()->hRandField(...\func_get_args()); } public function hSet($key, $member, $value): \Redis|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); + return $this->initializeLazyObject()->hSet(...\func_get_args()); } public function mget($keys): \Redis|array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function sRandMember($key, $count = 0): \Redis|array|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRandMember(...\func_get_args()); + return $this->initializeLazyObject()->sRandMember(...\func_get_args()); } } } diff --git a/app/vendor/symfony/cache/Traits/RedisCluster5Proxy.php b/app/vendor/symfony/cache/Traits/RedisCluster5Proxy.php index 511c53dd7..43f340478 100644 --- a/app/vendor/symfony/cache/Traits/RedisCluster5Proxy.php +++ b/app/vendor/symfony/cache/Traits/RedisCluster5Proxy.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Cache\Traits; use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Component\VarExporter\LazyProxyTrait; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-needed symbols @@ -25,959 +24,957 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); */ class RedisCluster5Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface { - use LazyProxyTrait { + use RedisProxyTrait { resetLazyObject as reset; } - private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, #[\SensitiveParameter] $auth = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); + $this->initializeLazyObject()->__construct(...\func_get_args()); } public function _masters() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_masters(...\func_get_args()); + return $this->initializeLazyObject()->_masters(...\func_get_args()); } public function _prefix($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); + return $this->initializeLazyObject()->_prefix(...\func_get_args()); } public function _redir() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_redir(...\func_get_args()); + return $this->initializeLazyObject()->_redir(...\func_get_args()); } public function _serialize($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); + return $this->initializeLazyObject()->_serialize(...\func_get_args()); } public function _unserialize($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); + return $this->initializeLazyObject()->_unserialize(...\func_get_args()); } public function _compress($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); + return $this->initializeLazyObject()->_compress(...\func_get_args()); } public function _uncompress($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); + return $this->initializeLazyObject()->_uncompress(...\func_get_args()); } public function _pack($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); + return $this->initializeLazyObject()->_pack(...\func_get_args()); } public function _unpack($value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); + return $this->initializeLazyObject()->_unpack(...\func_get_args()); } public function acl($key_or_address, $subcmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); + return $this->initializeLazyObject()->acl(...\func_get_args()); } public function append($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); + return $this->initializeLazyObject()->append(...\func_get_args()); } public function bgrewriteaof($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); + return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); } public function bgsave($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); + return $this->initializeLazyObject()->bgsave(...\func_get_args()); } public function bitcount($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); + return $this->initializeLazyObject()->bitcount(...\func_get_args()); } public function bitop($operation, $ret_key, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); + return $this->initializeLazyObject()->bitop(...\func_get_args()); } public function bitpos($key, $bit, $start = null, $end = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); + return $this->initializeLazyObject()->bitpos(...\func_get_args()); } public function blpop($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); + return $this->initializeLazyObject()->blpop(...\func_get_args()); } public function brpop($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); + return $this->initializeLazyObject()->brpop(...\func_get_args()); } public function brpoplpush($src, $dst, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); } public function clearlasterror() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearlasterror(...\func_get_args()); + return $this->initializeLazyObject()->clearlasterror(...\func_get_args()); } public function bzpopmax($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); } public function bzpopmin($key, $timeout_or_key, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); } public function client($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); + return $this->initializeLazyObject()->client(...\func_get_args()); } public function close() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); + return $this->initializeLazyObject()->close(...\func_get_args()); } public function cluster($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cluster(...\func_get_args()); + return $this->initializeLazyObject()->cluster(...\func_get_args()); } public function command(...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); + return $this->initializeLazyObject()->command(...\func_get_args()); } public function config($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); + return $this->initializeLazyObject()->config(...\func_get_args()); } public function dbsize($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); + return $this->initializeLazyObject()->dbsize(...\func_get_args()); } public function decr($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); + return $this->initializeLazyObject()->decr(...\func_get_args()); } public function decrby($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); + return $this->initializeLazyObject()->decrby(...\func_get_args()); } public function del($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); + return $this->initializeLazyObject()->del(...\func_get_args()); } public function discard() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); + return $this->initializeLazyObject()->discard(...\func_get_args()); } public function dump($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dump(...\func_get_args()); } public function echo($msg) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); + return $this->initializeLazyObject()->echo(...\func_get_args()); } public function eval($script, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); + return $this->initializeLazyObject()->eval(...\func_get_args()); } public function evalsha($script_sha, $args = null, $num_keys = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); + return $this->initializeLazyObject()->evalsha(...\func_get_args()); } public function exec() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); + return $this->initializeLazyObject()->exec(...\func_get_args()); } public function exists($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); + return $this->initializeLazyObject()->exists(...\func_get_args()); } public function expire($key, $timeout) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); + return $this->initializeLazyObject()->expire(...\func_get_args()); } public function expireat($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); + return $this->initializeLazyObject()->expireat(...\func_get_args()); } public function flushall($key_or_address, $async = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); + return $this->initializeLazyObject()->flushall(...\func_get_args()); } public function flushdb($key_or_address, $async = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); + return $this->initializeLazyObject()->flushdb(...\func_get_args()); } public function geoadd($key, $lng, $lat, $member, ...$other_triples) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); + return $this->initializeLazyObject()->geoadd(...\func_get_args()); } public function geodist($key, $src, $dst, $unit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); + return $this->initializeLazyObject()->geodist(...\func_get_args()); } public function geohash($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); + return $this->initializeLazyObject()->geohash(...\func_get_args()); } public function geopos($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); + return $this->initializeLazyObject()->geopos(...\func_get_args()); } public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); + return $this->initializeLazyObject()->georadius(...\func_get_args()); } public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); } public function georadiusbymember($key, $member, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); } public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); } public function get($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); + return $this->initializeLazyObject()->get(...\func_get_args()); } public function getbit($key, $offset) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); + return $this->initializeLazyObject()->getbit(...\func_get_args()); } public function getlasterror() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getlasterror(...\func_get_args()); + return $this->initializeLazyObject()->getlasterror(...\func_get_args()); } public function getmode() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getmode(...\func_get_args()); + return $this->initializeLazyObject()->getmode(...\func_get_args()); } public function getoption($option) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getoption(...\func_get_args()); + return $this->initializeLazyObject()->getoption(...\func_get_args()); } public function getrange($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); + return $this->initializeLazyObject()->getrange(...\func_get_args()); } public function getset($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); + return $this->initializeLazyObject()->getset(...\func_get_args()); } public function hdel($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); + return $this->initializeLazyObject()->hdel(...\func_get_args()); } public function hexists($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); + return $this->initializeLazyObject()->hexists(...\func_get_args()); } public function hget($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); + return $this->initializeLazyObject()->hget(...\func_get_args()); } public function hgetall($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); + return $this->initializeLazyObject()->hgetall(...\func_get_args()); } public function hincrby($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); + return $this->initializeLazyObject()->hincrby(...\func_get_args()); } public function hincrbyfloat($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); } public function hkeys($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); + return $this->initializeLazyObject()->hkeys(...\func_get_args()); } public function hlen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); + return $this->initializeLazyObject()->hlen(...\func_get_args()); } public function hmget($key, $keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); + return $this->initializeLazyObject()->hmget(...\func_get_args()); } public function hmset($key, $pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); + return $this->initializeLazyObject()->hmset(...\func_get_args()); } public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function hset($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); + return $this->initializeLazyObject()->hset(...\func_get_args()); } public function hsetnx($key, $member, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); + return $this->initializeLazyObject()->hsetnx(...\func_get_args()); } public function hstrlen($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); + return $this->initializeLazyObject()->hstrlen(...\func_get_args()); } public function hvals($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); + return $this->initializeLazyObject()->hvals(...\func_get_args()); } public function incr($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); + return $this->initializeLazyObject()->incr(...\func_get_args()); } public function incrby($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); + return $this->initializeLazyObject()->incrby(...\func_get_args()); } public function incrbyfloat($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); } public function info($key_or_address, $option = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); + return $this->initializeLazyObject()->info(...\func_get_args()); } public function keys($pattern) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); + return $this->initializeLazyObject()->keys(...\func_get_args()); } public function lastsave($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); + return $this->initializeLazyObject()->lastsave(...\func_get_args()); } public function lget($key, $index) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lget(...\func_get_args()); + return $this->initializeLazyObject()->lget(...\func_get_args()); } public function lindex($key, $index) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); + return $this->initializeLazyObject()->lindex(...\func_get_args()); } public function linsert($key, $position, $pivot, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); + return $this->initializeLazyObject()->linsert(...\func_get_args()); } public function llen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); + return $this->initializeLazyObject()->llen(...\func_get_args()); } public function lpop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); + return $this->initializeLazyObject()->lpop(...\func_get_args()); } public function lpush($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); + return $this->initializeLazyObject()->lpush(...\func_get_args()); } public function lpushx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); + return $this->initializeLazyObject()->lpushx(...\func_get_args()); } public function lrange($key, $start, $end) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); + return $this->initializeLazyObject()->lrange(...\func_get_args()); } public function lrem($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); + return $this->initializeLazyObject()->lrem(...\func_get_args()); } public function lset($key, $index, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); + return $this->initializeLazyObject()->lset(...\func_get_args()); } public function ltrim($key, $start, $stop) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); + return $this->initializeLazyObject()->ltrim(...\func_get_args()); } public function mget($keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function mset($pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); + return $this->initializeLazyObject()->mset(...\func_get_args()); } public function msetnx($pairs) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); + return $this->initializeLazyObject()->msetnx(...\func_get_args()); } public function multi() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); + return $this->initializeLazyObject()->multi(...\func_get_args()); } public function object($field, $key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); + return $this->initializeLazyObject()->object(...\func_get_args()); } public function persist($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); + return $this->initializeLazyObject()->persist(...\func_get_args()); } public function pexpire($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); + return $this->initializeLazyObject()->pexpire(...\func_get_args()); } public function pexpireat($key, $timestamp) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); + return $this->initializeLazyObject()->pexpireat(...\func_get_args()); } public function pfadd($key, $elements) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); + return $this->initializeLazyObject()->pfadd(...\func_get_args()); } public function pfcount($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); + return $this->initializeLazyObject()->pfcount(...\func_get_args()); } public function pfmerge($dstkey, $keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); + return $this->initializeLazyObject()->pfmerge(...\func_get_args()); } public function ping($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); + return $this->initializeLazyObject()->ping(...\func_get_args()); } public function psetex($key, $expire, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); + return $this->initializeLazyObject()->psetex(...\func_get_args()); } public function psubscribe($patterns, $callback) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); + return $this->initializeLazyObject()->psubscribe(...\func_get_args()); } public function pttl($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); + return $this->initializeLazyObject()->pttl(...\func_get_args()); } public function publish($channel, $message) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } public function pubsub($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); + return $this->initializeLazyObject()->pubsub(...\func_get_args()); } public function punsubscribe($pattern, ...$other_patterns) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); } public function randomkey($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); + return $this->initializeLazyObject()->randomkey(...\func_get_args()); } public function rawcommand($cmd, ...$args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); + return $this->initializeLazyObject()->rawcommand(...\func_get_args()); } public function rename($key, $newkey) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); + return $this->initializeLazyObject()->rename(...\func_get_args()); } public function renamenx($key, $newkey) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); + return $this->initializeLazyObject()->renamenx(...\func_get_args()); } public function restore($ttl, $key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); + return $this->initializeLazyObject()->restore(...\func_get_args()); } public function role() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); + return $this->initializeLazyObject()->role(...\func_get_args()); } public function rpop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); + return $this->initializeLazyObject()->rpop(...\func_get_args()); } public function rpoplpush($src, $dst) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); } public function rpush($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); + return $this->initializeLazyObject()->rpush(...\func_get_args()); } public function rpushx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); + return $this->initializeLazyObject()->rpushx(...\func_get_args()); } public function sadd($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); + return $this->initializeLazyObject()->sadd(...\func_get_args()); } public function saddarray($key, $options) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->saddarray(...\func_get_args()); + return $this->initializeLazyObject()->saddarray(...\func_get_args()); } public function save($key_or_address) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); + return $this->initializeLazyObject()->save(...\func_get_args()); } public function scan(&$i_iterator, $str_node, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); + return $this->initializeLazyObject()->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); } public function scard($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); + return $this->initializeLazyObject()->scard(...\func_get_args()); } public function script($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); + return $this->initializeLazyObject()->script(...\func_get_args()); } public function sdiff($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); + return $this->initializeLazyObject()->sdiff(...\func_get_args()); } public function sdiffstore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); } public function set($key, $value, $opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); + return $this->initializeLazyObject()->set(...\func_get_args()); } public function setbit($key, $offset, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); + return $this->initializeLazyObject()->setbit(...\func_get_args()); } public function setex($key, $expire, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); + return $this->initializeLazyObject()->setex(...\func_get_args()); } public function setnx($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); + return $this->initializeLazyObject()->setnx(...\func_get_args()); } public function setoption($option, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setoption(...\func_get_args()); + return $this->initializeLazyObject()->setoption(...\func_get_args()); } public function setrange($key, $offset, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); + return $this->initializeLazyObject()->setrange(...\func_get_args()); } public function sinter($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); + return $this->initializeLazyObject()->sinter(...\func_get_args()); } public function sinterstore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); + return $this->initializeLazyObject()->sinterstore(...\func_get_args()); } public function sismember($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); + return $this->initializeLazyObject()->sismember(...\func_get_args()); } public function slowlog($key_or_address, $arg = null, ...$other_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); + return $this->initializeLazyObject()->slowlog(...\func_get_args()); } public function smembers($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); + return $this->initializeLazyObject()->smembers(...\func_get_args()); } public function smove($src, $dst, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); + return $this->initializeLazyObject()->smove(...\func_get_args()); } public function sort($key, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); + return $this->initializeLazyObject()->sort(...\func_get_args()); } public function spop($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); + return $this->initializeLazyObject()->spop(...\func_get_args()); } public function srandmember($key, $count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); + return $this->initializeLazyObject()->srandmember(...\func_get_args()); } public function srem($key, $value) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); + return $this->initializeLazyObject()->srem(...\func_get_args()); } public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function strlen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); + return $this->initializeLazyObject()->strlen(...\func_get_args()); } public function subscribe($channels, $callback) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); + return $this->initializeLazyObject()->subscribe(...\func_get_args()); } public function sunion($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); + return $this->initializeLazyObject()->sunion(...\func_get_args()); } public function sunionstore($dst, $key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); + return $this->initializeLazyObject()->sunionstore(...\func_get_args()); } public function time() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); + return $this->initializeLazyObject()->time(...\func_get_args()); } public function ttl($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); + return $this->initializeLazyObject()->ttl(...\func_get_args()); } public function type($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); + return $this->initializeLazyObject()->type(...\func_get_args()); } public function unsubscribe($channel, ...$other_channels) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); } public function unlink($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); + return $this->initializeLazyObject()->unlink(...\func_get_args()); } public function unwatch() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); + return $this->initializeLazyObject()->unwatch(...\func_get_args()); } public function watch($key, ...$other_keys) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); + return $this->initializeLazyObject()->watch(...\func_get_args()); } public function xack($str_key, $str_group, $arr_ids) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); + return $this->initializeLazyObject()->xack(...\func_get_args()); } public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); + return $this->initializeLazyObject()->xadd(...\func_get_args()); } public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); + return $this->initializeLazyObject()->xclaim(...\func_get_args()); } public function xdel($str_key, $arr_ids) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); + return $this->initializeLazyObject()->xdel(...\func_get_args()); } public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); + return $this->initializeLazyObject()->xgroup(...\func_get_args()); } public function xinfo($str_cmd, $str_key = null, $str_group = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); + return $this->initializeLazyObject()->xinfo(...\func_get_args()); } public function xlen($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); + return $this->initializeLazyObject()->xlen(...\func_get_args()); } public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); + return $this->initializeLazyObject()->xpending(...\func_get_args()); } public function xrange($str_key, $str_start, $str_end, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); + return $this->initializeLazyObject()->xrange(...\func_get_args()); } public function xread($arr_streams, $i_count = null, $i_block = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); + return $this->initializeLazyObject()->xread(...\func_get_args()); } public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); + return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); } public function xrevrange($str_key, $str_start, $str_end, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); + return $this->initializeLazyObject()->xrevrange(...\func_get_args()); } public function xtrim($str_key, $i_maxlen, $boo_approximate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); + return $this->initializeLazyObject()->xtrim(...\func_get_args()); } public function zadd($key, $score, $value, ...$extra_args) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); + return $this->initializeLazyObject()->zadd(...\func_get_args()); } public function zcard($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); + return $this->initializeLazyObject()->zcard(...\func_get_args()); } public function zcount($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); + return $this->initializeLazyObject()->zcount(...\func_get_args()); } public function zincrby($key, $value, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); + return $this->initializeLazyObject()->zincrby(...\func_get_args()); } public function zinterstore($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); + return $this->initializeLazyObject()->zinterstore(...\func_get_args()); } public function zlexcount($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); + return $this->initializeLazyObject()->zlexcount(...\func_get_args()); } public function zpopmax($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); + return $this->initializeLazyObject()->zpopmax(...\func_get_args()); } public function zpopmin($key) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); + return $this->initializeLazyObject()->zpopmin(...\func_get_args()); } public function zrange($key, $start, $end, $scores = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); + return $this->initializeLazyObject()->zrange(...\func_get_args()); } public function zrangebylex($key, $min, $max, $offset = null, $limit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); } public function zrangebyscore($key, $start, $end, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); } public function zrank($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); + return $this->initializeLazyObject()->zrank(...\func_get_args()); } public function zrem($key, $member, ...$other_members) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); + return $this->initializeLazyObject()->zrem(...\func_get_args()); } public function zremrangebylex($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); } public function zremrangebyrank($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); } public function zremrangebyscore($key, $min, $max) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); } public function zrevrange($key, $start, $end, $scores = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); + return $this->initializeLazyObject()->zrevrange(...\func_get_args()); } public function zrevrangebylex($key, $min, $max, $offset = null, $limit = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); } public function zrevrangebyscore($key, $start, $end, $options = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); } public function zrevrank($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); + return $this->initializeLazyObject()->zrevrank(...\func_get_args()); } public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); } public function zscore($key, $member) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); + return $this->initializeLazyObject()->zscore(...\func_get_args()); } public function zunionstore($key, $keys, $weights = null, $aggregate = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); + return $this->initializeLazyObject()->zunionstore(...\func_get_args()); } } diff --git a/app/vendor/symfony/cache/Traits/RedisCluster6Proxy.php b/app/vendor/symfony/cache/Traits/RedisCluster6Proxy.php index c19aa1620..38dedf7ad 100644 --- a/app/vendor/symfony/cache/Traits/RedisCluster6Proxy.php +++ b/app/vendor/symfony/cache/Traits/RedisCluster6Proxy.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Cache\Traits; use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Component\VarExporter\LazyProxyTrait; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-needed symbols @@ -26,1114 +25,1112 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); class RedisCluster6Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface { use RedisCluster6ProxyTrait; - use LazyProxyTrait { + use RedisProxyTrait { resetLazyObject as reset; } - private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct($name, $seeds = null, $timeout = 0, $read_timeout = 0, $persistent = false, #[\SensitiveParameter] $auth = null, $context = null) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); + $this->initializeLazyObject()->__construct(...\func_get_args()); } public function _compress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); + return $this->initializeLazyObject()->_compress(...\func_get_args()); } public function _uncompress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); + return $this->initializeLazyObject()->_uncompress(...\func_get_args()); } public function _serialize($value): bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); + return $this->initializeLazyObject()->_serialize(...\func_get_args()); } public function _unserialize($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); + return $this->initializeLazyObject()->_unserialize(...\func_get_args()); } public function _pack($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); + return $this->initializeLazyObject()->_pack(...\func_get_args()); } public function _unpack($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); + return $this->initializeLazyObject()->_unpack(...\func_get_args()); } public function _prefix($key): bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); + return $this->initializeLazyObject()->_prefix(...\func_get_args()); } public function _masters(): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_masters(...\func_get_args()); + return $this->initializeLazyObject()->_masters(...\func_get_args()); } public function _redir(): ?string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_redir(...\func_get_args()); + return $this->initializeLazyObject()->_redir(...\func_get_args()); } public function acl($key_or_address, $subcmd, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); + return $this->initializeLazyObject()->acl(...\func_get_args()); } public function append($key, $value): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); + return $this->initializeLazyObject()->append(...\func_get_args()); } public function bgrewriteaof($key_or_address): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); + return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); } public function bgsave($key_or_address): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); + return $this->initializeLazyObject()->bgsave(...\func_get_args()); } public function bitcount($key, $start = 0, $end = -1, $bybit = false): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); + return $this->initializeLazyObject()->bitcount(...\func_get_args()); } public function bitop($operation, $deskey, $srckey, ...$otherkeys): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); + return $this->initializeLazyObject()->bitop(...\func_get_args()); } public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); + return $this->initializeLazyObject()->bitpos(...\func_get_args()); } public function blpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); + return $this->initializeLazyObject()->blpop(...\func_get_args()); } public function brpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); + return $this->initializeLazyObject()->brpop(...\func_get_args()); } public function brpoplpush($srckey, $deskey, $timeout): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); } public function lmove($src, $dst, $wherefrom, $whereto): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmove(...\func_get_args()); + return $this->initializeLazyObject()->lmove(...\func_get_args()); } public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); + return $this->initializeLazyObject()->blmove(...\func_get_args()); } public function bzpopmax($key, $timeout_or_key, ...$extra_args): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); } public function bzpopmin($key, $timeout_or_key, ...$extra_args): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); } public function bzmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); + return $this->initializeLazyObject()->bzmpop(...\func_get_args()); } public function zmpop($keys, $from, $count = 1): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); + return $this->initializeLazyObject()->zmpop(...\func_get_args()); } public function blmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); + return $this->initializeLazyObject()->blmpop(...\func_get_args()); } public function lmpop($keys, $from, $count = 1): \RedisCluster|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); + return $this->initializeLazyObject()->lmpop(...\func_get_args()); } public function clearlasterror(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearlasterror(...\func_get_args()); + return $this->initializeLazyObject()->clearlasterror(...\func_get_args()); } public function client($key_or_address, $subcommand, $arg = null): array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); + return $this->initializeLazyObject()->client(...\func_get_args()); } public function close(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); + return $this->initializeLazyObject()->close(...\func_get_args()); } public function cluster($key_or_address, $command, ...$extra_args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cluster(...\func_get_args()); + return $this->initializeLazyObject()->cluster(...\func_get_args()); } public function command(...$extra_args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); + return $this->initializeLazyObject()->command(...\func_get_args()); } public function config($key_or_address, $subcommand, ...$extra_args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); + return $this->initializeLazyObject()->config(...\func_get_args()); } public function dbsize($key_or_address): \RedisCluster|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); + return $this->initializeLazyObject()->dbsize(...\func_get_args()); } public function copy($src, $dst, $options = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); + return $this->initializeLazyObject()->copy(...\func_get_args()); } public function decr($key, $by = 1): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); + return $this->initializeLazyObject()->decr(...\func_get_args()); } public function decrby($key, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); + return $this->initializeLazyObject()->decrby(...\func_get_args()); } public function decrbyfloat($key, $value): float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->decrbyfloat(...\func_get_args()); } public function del($key, ...$other_keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); + return $this->initializeLazyObject()->del(...\func_get_args()); } public function discard(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); + return $this->initializeLazyObject()->discard(...\func_get_args()); } public function dump($key): \RedisCluster|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dump(...\func_get_args()); } public function echo($key_or_address, $msg): \RedisCluster|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); + return $this->initializeLazyObject()->echo(...\func_get_args()); } public function eval($script, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); + return $this->initializeLazyObject()->eval(...\func_get_args()); } public function eval_ro($script, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); + return $this->initializeLazyObject()->eval_ro(...\func_get_args()); } public function evalsha($script_sha, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); + return $this->initializeLazyObject()->evalsha(...\func_get_args()); } public function evalsha_ro($script_sha, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); + return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); } public function exec(): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); + return $this->initializeLazyObject()->exec(...\func_get_args()); } public function exists($key, ...$other_keys): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); + return $this->initializeLazyObject()->exists(...\func_get_args()); } public function touch($key, ...$other_keys): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); + return $this->initializeLazyObject()->touch(...\func_get_args()); } public function expire($key, $timeout, $mode = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); + return $this->initializeLazyObject()->expire(...\func_get_args()); } public function expireat($key, $timestamp, $mode = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); + return $this->initializeLazyObject()->expireat(...\func_get_args()); } public function expiretime($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); + return $this->initializeLazyObject()->expiretime(...\func_get_args()); } public function pexpiretime($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); + return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); } public function flushall($key_or_address, $async = false): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); + return $this->initializeLazyObject()->flushall(...\func_get_args()); } public function flushdb($key_or_address, $async = false): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); + return $this->initializeLazyObject()->flushdb(...\func_get_args()); } public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); + return $this->initializeLazyObject()->geoadd(...\func_get_args()); } public function geodist($key, $src, $dest, $unit = null): \RedisCluster|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); + return $this->initializeLazyObject()->geodist(...\func_get_args()); } public function geohash($key, $member, ...$other_members): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); + return $this->initializeLazyObject()->geohash(...\func_get_args()); } public function geopos($key, $member, ...$other_members): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); + return $this->initializeLazyObject()->geopos(...\func_get_args()); } public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); + return $this->initializeLazyObject()->georadius(...\func_get_args()); } public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); } public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); } public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); } public function geosearch($key, $position, $shape, $unit, $options = []): \RedisCluster|array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); + return $this->initializeLazyObject()->geosearch(...\func_get_args()); } public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \RedisCluster|array|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); + return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); } public function get($key): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); + return $this->initializeLazyObject()->get(...\func_get_args()); } public function getbit($key, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); + return $this->initializeLazyObject()->getbit(...\func_get_args()); } public function getlasterror(): ?string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getlasterror(...\func_get_args()); + return $this->initializeLazyObject()->getlasterror(...\func_get_args()); } public function getmode(): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getmode(...\func_get_args()); + return $this->initializeLazyObject()->getmode(...\func_get_args()); } public function getoption($option): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getoption(...\func_get_args()); + return $this->initializeLazyObject()->getoption(...\func_get_args()); } public function getrange($key, $start, $end): \RedisCluster|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); + return $this->initializeLazyObject()->getrange(...\func_get_args()); } public function lcs($key1, $key2, $options = null): \RedisCluster|array|false|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); + return $this->initializeLazyObject()->lcs(...\func_get_args()); } public function getset($key, $value): \RedisCluster|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); + return $this->initializeLazyObject()->getset(...\func_get_args()); } public function gettransferredbytes(): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->gettransferredbytes(...\func_get_args()); + return $this->initializeLazyObject()->gettransferredbytes(...\func_get_args()); } public function cleartransferredbytes(): void { - ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cleartransferredbytes(...\func_get_args()); + $this->initializeLazyObject()->cleartransferredbytes(...\func_get_args()); } public function hdel($key, $member, ...$other_members): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); + return $this->initializeLazyObject()->hdel(...\func_get_args()); } public function hexists($key, $member): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); + return $this->initializeLazyObject()->hexists(...\func_get_args()); } public function hget($key, $member): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); + return $this->initializeLazyObject()->hget(...\func_get_args()); } public function hgetall($key): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); + return $this->initializeLazyObject()->hgetall(...\func_get_args()); } public function hincrby($key, $member, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); + return $this->initializeLazyObject()->hincrby(...\func_get_args()); } public function hincrbyfloat($key, $member, $value): \RedisCluster|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); } public function hkeys($key): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); + return $this->initializeLazyObject()->hkeys(...\func_get_args()); } public function hlen($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); + return $this->initializeLazyObject()->hlen(...\func_get_args()); } public function hmget($key, $keys): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); + return $this->initializeLazyObject()->hmget(...\func_get_args()); } public function hmset($key, $key_values): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); + return $this->initializeLazyObject()->hmset(...\func_get_args()); } public function hscan($key, &$iterator, $pattern = null, $count = 0): array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function hrandfield($key, $options = null): \RedisCluster|array|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hrandfield(...\func_get_args()); + return $this->initializeLazyObject()->hrandfield(...\func_get_args()); } public function hset($key, $member, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); + return $this->initializeLazyObject()->hset(...\func_get_args()); } public function hsetnx($key, $member, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); + return $this->initializeLazyObject()->hsetnx(...\func_get_args()); } public function hstrlen($key, $field): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); + return $this->initializeLazyObject()->hstrlen(...\func_get_args()); } public function hvals($key): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); + return $this->initializeLazyObject()->hvals(...\func_get_args()); } public function incr($key, $by = 1): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); + return $this->initializeLazyObject()->incr(...\func_get_args()); } public function incrby($key, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); + return $this->initializeLazyObject()->incrby(...\func_get_args()); } public function incrbyfloat($key, $value): \RedisCluster|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); } public function info($key_or_address, ...$sections): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); + return $this->initializeLazyObject()->info(...\func_get_args()); } public function keys($pattern): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); + return $this->initializeLazyObject()->keys(...\func_get_args()); } public function lastsave($key_or_address): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); + return $this->initializeLazyObject()->lastsave(...\func_get_args()); } public function lget($key, $index): \RedisCluster|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lget(...\func_get_args()); + return $this->initializeLazyObject()->lget(...\func_get_args()); } public function lindex($key, $index): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); + return $this->initializeLazyObject()->lindex(...\func_get_args()); } public function linsert($key, $pos, $pivot, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); + return $this->initializeLazyObject()->linsert(...\func_get_args()); } public function llen($key): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); + return $this->initializeLazyObject()->llen(...\func_get_args()); } public function lpop($key, $count = 0): \RedisCluster|array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); + return $this->initializeLazyObject()->lpop(...\func_get_args()); } public function lpos($key, $value, $options = null): \Redis|array|bool|int|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpos(...\func_get_args()); + return $this->initializeLazyObject()->lpos(...\func_get_args()); } public function lpush($key, $value, ...$other_values): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); + return $this->initializeLazyObject()->lpush(...\func_get_args()); } public function lpushx($key, $value): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); + return $this->initializeLazyObject()->lpushx(...\func_get_args()); } public function lrange($key, $start, $end): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); + return $this->initializeLazyObject()->lrange(...\func_get_args()); } public function lrem($key, $value, $count = 0): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); + return $this->initializeLazyObject()->lrem(...\func_get_args()); } public function lset($key, $index, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); + return $this->initializeLazyObject()->lset(...\func_get_args()); } public function ltrim($key, $start, $end): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); + return $this->initializeLazyObject()->ltrim(...\func_get_args()); } public function mget($keys): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function mset($key_values): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); + return $this->initializeLazyObject()->mset(...\func_get_args()); } public function msetnx($key_values): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); + return $this->initializeLazyObject()->msetnx(...\func_get_args()); } public function multi($value = \Redis::MULTI): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); + return $this->initializeLazyObject()->multi(...\func_get_args()); } public function object($subcommand, $key): \RedisCluster|false|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); + return $this->initializeLazyObject()->object(...\func_get_args()); } public function persist($key): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); + return $this->initializeLazyObject()->persist(...\func_get_args()); } public function pexpire($key, $timeout, $mode = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); + return $this->initializeLazyObject()->pexpire(...\func_get_args()); } public function pexpireat($key, $timestamp, $mode = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); + return $this->initializeLazyObject()->pexpireat(...\func_get_args()); } public function pfadd($key, $elements): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); + return $this->initializeLazyObject()->pfadd(...\func_get_args()); } public function pfcount($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); + return $this->initializeLazyObject()->pfcount(...\func_get_args()); } public function pfmerge($key, $keys): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); + return $this->initializeLazyObject()->pfmerge(...\func_get_args()); } public function ping($key_or_address, $message = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); + return $this->initializeLazyObject()->ping(...\func_get_args()); } public function psetex($key, $timeout, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); + return $this->initializeLazyObject()->psetex(...\func_get_args()); } public function psubscribe($patterns, $callback): void { - ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); + $this->initializeLazyObject()->psubscribe(...\func_get_args()); } public function pttl($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); + return $this->initializeLazyObject()->pttl(...\func_get_args()); } public function pubsub($key_or_address, ...$values): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); + return $this->initializeLazyObject()->pubsub(...\func_get_args()); } public function punsubscribe($pattern, ...$other_patterns): array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); } public function randomkey($key_or_address): \RedisCluster|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); + return $this->initializeLazyObject()->randomkey(...\func_get_args()); } public function rawcommand($key_or_address, $command, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); + return $this->initializeLazyObject()->rawcommand(...\func_get_args()); } public function rename($key_src, $key_dst): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); + return $this->initializeLazyObject()->rename(...\func_get_args()); } public function renamenx($key, $newkey): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); + return $this->initializeLazyObject()->renamenx(...\func_get_args()); } public function restore($key, $timeout, $value, $options = null): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); + return $this->initializeLazyObject()->restore(...\func_get_args()); } public function role($key_or_address): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); + return $this->initializeLazyObject()->role(...\func_get_args()); } public function rpop($key, $count = 0): \RedisCluster|array|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); + return $this->initializeLazyObject()->rpop(...\func_get_args()); } public function rpoplpush($src, $dst): \RedisCluster|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); } public function rpush($key, ...$elements): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); + return $this->initializeLazyObject()->rpush(...\func_get_args()); } public function rpushx($key, $value): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); + return $this->initializeLazyObject()->rpushx(...\func_get_args()); } public function sadd($key, $value, ...$other_values): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); + return $this->initializeLazyObject()->sadd(...\func_get_args()); } public function saddarray($key, $values): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->saddarray(...\func_get_args()); + return $this->initializeLazyObject()->saddarray(...\func_get_args()); } public function save($key_or_address): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); + return $this->initializeLazyObject()->save(...\func_get_args()); } public function scan(&$iterator, $key_or_address, $pattern = null, $count = 0): array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); + return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); } public function scard($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); + return $this->initializeLazyObject()->scard(...\func_get_args()); } public function script($key_or_address, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); + return $this->initializeLazyObject()->script(...\func_get_args()); } public function sdiff($key, ...$other_keys): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); + return $this->initializeLazyObject()->sdiff(...\func_get_args()); } public function sdiffstore($dst, $key, ...$other_keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); } public function set($key, $value, $options = null): \RedisCluster|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); + return $this->initializeLazyObject()->set(...\func_get_args()); } public function setbit($key, $offset, $onoff): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); + return $this->initializeLazyObject()->setbit(...\func_get_args()); } public function setex($key, $expire, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); + return $this->initializeLazyObject()->setex(...\func_get_args()); } public function setnx($key, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); + return $this->initializeLazyObject()->setnx(...\func_get_args()); } public function setoption($option, $value): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setoption(...\func_get_args()); + return $this->initializeLazyObject()->setoption(...\func_get_args()); } public function setrange($key, $offset, $value): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); + return $this->initializeLazyObject()->setrange(...\func_get_args()); } public function sinter($key, ...$other_keys): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); + return $this->initializeLazyObject()->sinter(...\func_get_args()); } public function sintercard($keys, $limit = -1): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); + return $this->initializeLazyObject()->sintercard(...\func_get_args()); } public function sinterstore($key, ...$other_keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); + return $this->initializeLazyObject()->sinterstore(...\func_get_args()); } public function sismember($key, $value): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); + return $this->initializeLazyObject()->sismember(...\func_get_args()); } public function smismember($key, $member, ...$other_members): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smismember(...\func_get_args()); + return $this->initializeLazyObject()->smismember(...\func_get_args()); } public function slowlog($key_or_address, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); + return $this->initializeLazyObject()->slowlog(...\func_get_args()); } public function smembers($key): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); + return $this->initializeLazyObject()->smembers(...\func_get_args()); } public function smove($src, $dst, $member): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); + return $this->initializeLazyObject()->smove(...\func_get_args()); } public function sort($key, $options = null): \RedisCluster|array|bool|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); + return $this->initializeLazyObject()->sort(...\func_get_args()); } public function sort_ro($key, $options = null): \RedisCluster|array|bool|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); + return $this->initializeLazyObject()->sort_ro(...\func_get_args()); } public function spop($key, $count = 0): \RedisCluster|array|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); + return $this->initializeLazyObject()->spop(...\func_get_args()); } public function srandmember($key, $count = 0): \RedisCluster|array|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); + return $this->initializeLazyObject()->srandmember(...\func_get_args()); } public function srem($key, $value, ...$other_values): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); + return $this->initializeLazyObject()->srem(...\func_get_args()); } public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function strlen($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); + return $this->initializeLazyObject()->strlen(...\func_get_args()); } public function subscribe($channels, $cb): void { - ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); + $this->initializeLazyObject()->subscribe(...\func_get_args()); } public function sunion($key, ...$other_keys): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); + return $this->initializeLazyObject()->sunion(...\func_get_args()); } public function sunionstore($dst, $key, ...$other_keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); + return $this->initializeLazyObject()->sunionstore(...\func_get_args()); } public function time($key_or_address): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); + return $this->initializeLazyObject()->time(...\func_get_args()); } public function ttl($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); + return $this->initializeLazyObject()->ttl(...\func_get_args()); } public function type($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); + return $this->initializeLazyObject()->type(...\func_get_args()); } public function unsubscribe($channels): array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); } public function unlink($key, ...$other_keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); + return $this->initializeLazyObject()->unlink(...\func_get_args()); } public function unwatch(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); + return $this->initializeLazyObject()->unwatch(...\func_get_args()); } public function watch($key, ...$other_keys): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); + return $this->initializeLazyObject()->watch(...\func_get_args()); } public function xack($key, $group, $ids): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); + return $this->initializeLazyObject()->xack(...\func_get_args()); } public function xadd($key, $id, $values, $maxlen = 0, $approx = false): \RedisCluster|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); + return $this->initializeLazyObject()->xadd(...\func_get_args()); } public function xclaim($key, $group, $consumer, $min_iddle, $ids, $options): \RedisCluster|array|false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); + return $this->initializeLazyObject()->xclaim(...\func_get_args()); } public function xdel($key, $ids): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); + return $this->initializeLazyObject()->xdel(...\func_get_args()); } public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); + return $this->initializeLazyObject()->xgroup(...\func_get_args()); } public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); + return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); } public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); + return $this->initializeLazyObject()->xinfo(...\func_get_args()); } public function xlen($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); + return $this->initializeLazyObject()->xlen(...\func_get_args()); } public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); + return $this->initializeLazyObject()->xpending(...\func_get_args()); } public function xrange($key, $start, $end, $count = -1): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); + return $this->initializeLazyObject()->xrange(...\func_get_args()); } public function xread($streams, $count = -1, $block = -1): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); + return $this->initializeLazyObject()->xread(...\func_get_args()); } public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); + return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); } public function xrevrange($key, $start, $end, $count = -1): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); + return $this->initializeLazyObject()->xrevrange(...\func_get_args()); } public function xtrim($key, $maxlen, $approx = false, $minid = false, $limit = -1): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); + return $this->initializeLazyObject()->xtrim(...\func_get_args()); } public function zadd($key, $score_or_options, ...$more_scores_and_mems): \RedisCluster|false|float|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); + return $this->initializeLazyObject()->zadd(...\func_get_args()); } public function zcard($key): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); + return $this->initializeLazyObject()->zcard(...\func_get_args()); } public function zcount($key, $start, $end): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); + return $this->initializeLazyObject()->zcount(...\func_get_args()); } public function zincrby($key, $value, $member): \RedisCluster|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); + return $this->initializeLazyObject()->zincrby(...\func_get_args()); } public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); + return $this->initializeLazyObject()->zinterstore(...\func_get_args()); } public function zintercard($keys, $limit = -1): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); + return $this->initializeLazyObject()->zintercard(...\func_get_args()); } public function zlexcount($key, $min, $max): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); + return $this->initializeLazyObject()->zlexcount(...\func_get_args()); } public function zpopmax($key, $value = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); + return $this->initializeLazyObject()->zpopmax(...\func_get_args()); } public function zpopmin($key, $value = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); + return $this->initializeLazyObject()->zpopmin(...\func_get_args()); } public function zrange($key, $start, $end, $options = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); + return $this->initializeLazyObject()->zrange(...\func_get_args()); } public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); + return $this->initializeLazyObject()->zrangestore(...\func_get_args()); } public function zrandmember($key, $options = null): \RedisCluster|array|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrandmember(...\func_get_args()); + return $this->initializeLazyObject()->zrandmember(...\func_get_args()); } public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); } public function zrangebyscore($key, $start, $end, $options = []): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); } public function zrank($key, $member): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); + return $this->initializeLazyObject()->zrank(...\func_get_args()); } public function zrem($key, $value, ...$other_values): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); + return $this->initializeLazyObject()->zrem(...\func_get_args()); } public function zremrangebylex($key, $min, $max): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); } public function zremrangebyrank($key, $min, $max): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); } public function zremrangebyscore($key, $min, $max): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); } public function zrevrange($key, $min, $max, $options = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); + return $this->initializeLazyObject()->zrevrange(...\func_get_args()); } public function zrevrangebylex($key, $min, $max, $options = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); } public function zrevrangebyscore($key, $min, $max, $options = null): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); } public function zrevrank($key, $member): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); + return $this->initializeLazyObject()->zrevrank(...\func_get_args()); } public function zscan($key, &$iterator, $pattern = null, $count = 0): \RedisCluster|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function zscore($key, $member): \RedisCluster|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); + return $this->initializeLazyObject()->zscore(...\func_get_args()); } public function zmscore($key, $member, ...$other_members): \Redis|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmscore(...\func_get_args()); + return $this->initializeLazyObject()->zmscore(...\func_get_args()); } public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); + return $this->initializeLazyObject()->zunionstore(...\func_get_args()); } public function zinter($keys, $weights = null, $options = null): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); + return $this->initializeLazyObject()->zinter(...\func_get_args()); } public function zdiffstore($dst, $keys): \RedisCluster|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); } public function zunion($keys, $weights = null, $options = null): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); + return $this->initializeLazyObject()->zunion(...\func_get_args()); } public function zdiff($keys, $options = null): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); + return $this->initializeLazyObject()->zdiff(...\func_get_args()); } } diff --git a/app/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php b/app/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php index 9c3169e32..5033c0131 100644 --- a/app/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php +++ b/app/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php @@ -19,17 +19,17 @@ trait RedisCluster6ProxyTrait { public function getex($key, $options = []): \RedisCluster|string|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getex(...\func_get_args()); + return $this->initializeLazyObject()->getex(...\func_get_args()); } public function publish($channel, $message): \RedisCluster|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } public function waitaof($key_or_address, $numlocal, $numreplicas, $timeout): \RedisCluster|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); + return $this->initializeLazyObject()->waitaof(...\func_get_args()); } } } else { @@ -40,7 +40,7 @@ trait RedisCluster6ProxyTrait { public function publish($channel, $message): \RedisCluster|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } } } diff --git a/app/vendor/symfony/cache/Traits/RedisProxyTrait.php b/app/vendor/symfony/cache/Traits/RedisProxyTrait.php new file mode 100644 index 000000000..1acbdf19c --- /dev/null +++ b/app/vendor/symfony/cache/Traits/RedisProxyTrait.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits; + +/** + * @internal + */ +trait RedisProxyTrait +{ + private \Closure $initializer; + private ?parent $realInstance = null; + + public static function createLazyProxy(\Closure $initializer, ?self $instance = null): static + { + $instance ??= (new \ReflectionClass(static::class))->newInstanceWithoutConstructor(); + $instance->realInstance = null; + $instance->initializer = $initializer; + + return $instance; + } + + public function isLazyObjectInitialized(bool $partial = false): bool + { + return isset($this->realInstance); + } + + public function initializeLazyObject(): object + { + return $this->realInstance ??= ($this->initializer)(); + } + + public function resetLazyObject(): bool + { + $this->realInstance = null; + + return true; + } + + public function __destruct() + { + } +} diff --git a/app/vendor/symfony/cache/Traits/RedisTrait.php b/app/vendor/symfony/cache/Traits/RedisTrait.php index bcd8a8cd6..87c689209 100644 --- a/app/vendor/symfony/cache/Traits/RedisTrait.php +++ b/app/vendor/symfony/cache/Traits/RedisTrait.php @@ -57,7 +57,7 @@ private function init(\Redis|Relay|\RedisArray|\RedisCluster|\Predis\ClientInter parent::__construct($namespace, $defaultLifetime); if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); + throw new InvalidArgumentException(\sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); } if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) { @@ -199,14 +199,14 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra \extension_loaded('relay') => Relay::class, default => \Predis\Client::class, }, - 1 < \count($hosts) && \extension_loaded('redis') => 1 < \count($hosts) ? \RedisArray::class : \Redis::class, + 1 < \count($hosts) && \extension_loaded('redis') => \RedisArray::class, \extension_loaded('redis') => \Redis::class, \extension_loaded('relay') => Relay::class, default => \Predis\Client::class, }; if (isset($params['redis_sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) { - throw new CacheException(sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class)); + throw new CacheException(\sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class)); } $isRedisExt = is_a($class, \Redis::class, true); @@ -263,7 +263,7 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra } while (++$hostIndex < \count($hosts) && !$address); if (isset($params['redis_sentinel']) && !$address) { - throw new InvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null); + throw new InvalidArgumentException(\sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null); } try { @@ -298,7 +298,7 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra restore_error_handler(); } if (!$isConnected) { - $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? sprintf(' (%s)', $error[1]) : ''; + $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? \sprintf(' (%s)', $error[1]) : ''; throw new InvalidArgumentException('Redis connection failed: '.$error.'.'); } @@ -423,9 +423,9 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra $redis->getConnection()->setSentinelTimeout($params['timeout']); } } elseif (class_exists($class, false)) { - throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class)); + throw new InvalidArgumentException(\sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class)); } else { - throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); + throw new InvalidArgumentException(\sprintf('Class "%s" does not exist.', $class)); } return $redis; @@ -614,7 +614,7 @@ private function pipeline(\Closure $generator, ?object $redis = null): \Generato } }); } elseif ($redis instanceof \RedisArray) { - $connections = $results = $ids = []; + $connections = $results = []; foreach ($generator() as $command => $args) { $id = 'eval' === $command ? $args[1][0] : $args[0]; if (!isset($connections[$h = $redis->_target($id)])) { diff --git a/app/vendor/symfony/cache/Traits/Relay/CopyTrait.php b/app/vendor/symfony/cache/Traits/Relay/CopyTrait.php new file mode 100644 index 000000000..84d52f44c --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/CopyTrait.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.8.1', '>=')) { + /** + * @internal + */ + trait CopyTrait + { + public function copy($src, $dst, $options = null): \Relay\Relay|bool + { + return $this->initializeLazyObject()->copy(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait CopyTrait + { + public function copy($src, $dst, $options = null): \Relay\Relay|false|int + { + return $this->initializeLazyObject()->copy(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php b/app/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php new file mode 100644 index 000000000..a358f80b7 --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait GeosearchTrait + { + public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array|false + { + return $this->initializeLazyObject()->geosearch(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait GeosearchTrait + { + public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array + { + return $this->initializeLazyObject()->geosearch(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php b/app/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php new file mode 100644 index 000000000..f26333e9f --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait GetrangeTrait + { + public function getrange($key, $start, $end): mixed + { + return $this->initializeLazyObject()->getrange(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait GetrangeTrait + { + public function getrange($key, $start, $end): \Relay\Relay|false|string + { + return $this->initializeLazyObject()->getrange(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/HsetTrait.php b/app/vendor/symfony/cache/Traits/Relay/HsetTrait.php new file mode 100644 index 000000000..833424460 --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/HsetTrait.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait HsetTrait + { + public function hset($key, ...$keys_and_vals): \Relay\Relay|false|int + { + return $this->initializeLazyObject()->hset(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait HsetTrait + { + public function hset($key, $mem, $val, ...$kvals): \Relay\Relay|false|int + { + return $this->initializeLazyObject()->hset(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/MoveTrait.php b/app/vendor/symfony/cache/Traits/Relay/MoveTrait.php new file mode 100644 index 000000000..18086f61d --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/MoveTrait.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait MoveTrait + { + public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): mixed + { + return $this->initializeLazyObject()->blmove(...\func_get_args()); + } + + public function lmove($srckey, $dstkey, $srcpos, $dstpos): mixed + { + return $this->initializeLazyObject()->lmove(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait MoveTrait + { + public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): \Relay\Relay|false|string|null + { + return $this->initializeLazyObject()->blmove(...\func_get_args()); + } + + public function lmove($srckey, $dstkey, $srcpos, $dstpos): \Relay\Relay|false|string|null + { + return $this->initializeLazyObject()->lmove(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php b/app/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php new file mode 100644 index 000000000..661ec4760 --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait NullableReturnTrait + { + public function dump($key): \Relay\Relay|false|string|null + { + return $this->initializeLazyObject()->dump(...\func_get_args()); + } + + public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float|null + { + return $this->initializeLazyObject()->geodist(...\func_get_args()); + } + + public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string|null + { + return $this->initializeLazyObject()->hrandfield(...\func_get_args()); + } + + public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string|null + { + return $this->initializeLazyObject()->xadd(...\func_get_args()); + } + + public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int|null + { + return $this->initializeLazyObject()->zrank(...\func_get_args()); + } + + public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int|null + { + return $this->initializeLazyObject()->zrevrank(...\func_get_args()); + } + + public function zscore($key, $member): \Relay\Relay|false|float|null + { + return $this->initializeLazyObject()->zscore(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait NullableReturnTrait + { + public function dump($key): \Relay\Relay|false|string + { + return $this->initializeLazyObject()->dump(...\func_get_args()); + } + + public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float + { + return $this->initializeLazyObject()->geodist(...\func_get_args()); + } + + public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string + { + return $this->initializeLazyObject()->hrandfield(...\func_get_args()); + } + + public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string + { + return $this->initializeLazyObject()->xadd(...\func_get_args()); + } + + public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int + { + return $this->initializeLazyObject()->zrank(...\func_get_args()); + } + + public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int + { + return $this->initializeLazyObject()->zrevrank(...\func_get_args()); + } + + public function zscore($key, $member): \Relay\Relay|false|float + { + return $this->initializeLazyObject()->zscore(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/Relay/PfcountTrait.php b/app/vendor/symfony/cache/Traits/Relay/PfcountTrait.php new file mode 100644 index 000000000..84e5c5977 --- /dev/null +++ b/app/vendor/symfony/cache/Traits/Relay/PfcountTrait.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits\Relay; + +if (version_compare(phpversion('relay'), '0.9.0', '>=')) { + /** + * @internal + */ + trait PfcountTrait + { + public function pfcount($key_or_keys): \Relay\Relay|false|int + { + return $this->initializeLazyObject()->pfcount(...\func_get_args()); + } + } +} else { + /** + * @internal + */ + trait PfcountTrait + { + public function pfcount($key): \Relay\Relay|false|int + { + return $this->initializeLazyObject()->pfcount(...\func_get_args()); + } + } +} diff --git a/app/vendor/symfony/cache/Traits/RelayProxy.php b/app/vendor/symfony/cache/Traits/RelayProxy.php index 96d7d19b4..e0ca8873a 100644 --- a/app/vendor/symfony/cache/Traits/RelayProxy.php +++ b/app/vendor/symfony/cache/Traits/RelayProxy.php @@ -11,8 +11,14 @@ namespace Symfony\Component\Cache\Traits; +use Symfony\Component\Cache\Traits\Relay\CopyTrait; +use Symfony\Component\Cache\Traits\Relay\GeosearchTrait; +use Symfony\Component\Cache\Traits\Relay\GetrangeTrait; +use Symfony\Component\Cache\Traits\Relay\HsetTrait; +use Symfony\Component\Cache\Traits\Relay\MoveTrait; +use Symfony\Component\Cache\Traits\Relay\NullableReturnTrait; +use Symfony\Component\Cache\Traits\Relay\PfcountTrait; use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Component\VarExporter\LazyProxyTrait; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-needed symbols @@ -25,1295 +31,1235 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); */ class RelayProxy extends \Relay\Relay implements ResetInterface, LazyObjectInterface { - use LazyProxyTrait { + use CopyTrait; + use GeosearchTrait; + use GetrangeTrait; + use HsetTrait; + use MoveTrait; + use NullableReturnTrait; + use PfcountTrait; + use RedisProxyTrait { resetLazyObject as reset; } use RelayProxyTrait; - private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct($host = null, $port = 6379, $connect_timeout = 0.0, $command_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0) { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); + $this->initializeLazyObject()->__construct(...\func_get_args()); } public function connect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); + return $this->initializeLazyObject()->connect(...\func_get_args()); } public function pconnect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); + return $this->initializeLazyObject()->pconnect(...\func_get_args()); } public function close(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); + return $this->initializeLazyObject()->close(...\func_get_args()); } public function pclose(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pclose(...\func_get_args()); + return $this->initializeLazyObject()->pclose(...\func_get_args()); } public function listen($callback): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->listen(...\func_get_args()); + return $this->initializeLazyObject()->listen(...\func_get_args()); } public function onFlushed($callback): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->onFlushed(...\func_get_args()); + return $this->initializeLazyObject()->onFlushed(...\func_get_args()); } public function onInvalidated($callback, $pattern = null): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->onInvalidated(...\func_get_args()); + return $this->initializeLazyObject()->onInvalidated(...\func_get_args()); } public function dispatchEvents(): false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dispatchEvents(...\func_get_args()); + return $this->initializeLazyObject()->dispatchEvents(...\func_get_args()); } public function getOption($option): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); + return $this->initializeLazyObject()->getOption(...\func_get_args()); } public function option($option, $value = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->option(...\func_get_args()); + return $this->initializeLazyObject()->option(...\func_get_args()); } public function setOption($option, $value): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); + return $this->initializeLazyObject()->setOption(...\func_get_args()); } public function addIgnorePatterns(...$pattern): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->addIgnorePatterns(...\func_get_args()); + return $this->initializeLazyObject()->addIgnorePatterns(...\func_get_args()); } public function addAllowPatterns(...$pattern): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->addAllowPatterns(...\func_get_args()); + return $this->initializeLazyObject()->addAllowPatterns(...\func_get_args()); } public function getTimeout(): false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getTimeout(...\func_get_args()); } public function timeout(): false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->timeout(...\func_get_args()); + return $this->initializeLazyObject()->timeout(...\func_get_args()); } public function getReadTimeout(): false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); + return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); } public function readTimeout(): false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->readTimeout(...\func_get_args()); + return $this->initializeLazyObject()->readTimeout(...\func_get_args()); } public function getBytes(): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBytes(...\func_get_args()); + return $this->initializeLazyObject()->getBytes(...\func_get_args()); } public function bytes(): array { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bytes(...\func_get_args()); + return $this->initializeLazyObject()->bytes(...\func_get_args()); } public function getHost(): false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); + return $this->initializeLazyObject()->getHost(...\func_get_args()); } public function isConnected(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); + return $this->initializeLazyObject()->isConnected(...\func_get_args()); } public function getPort(): false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); + return $this->initializeLazyObject()->getPort(...\func_get_args()); } public function getAuth(): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); + return $this->initializeLazyObject()->getAuth(...\func_get_args()); } public function getDbNum(): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDbNum(...\func_get_args()); + return $this->initializeLazyObject()->getDbNum(...\func_get_args()); } public function _serialize($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); + return $this->initializeLazyObject()->_serialize(...\func_get_args()); } public function _unserialize($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); + return $this->initializeLazyObject()->_unserialize(...\func_get_args()); } public function _compress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); + return $this->initializeLazyObject()->_compress(...\func_get_args()); } public function _uncompress($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); + return $this->initializeLazyObject()->_uncompress(...\func_get_args()); } public function _pack($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); + return $this->initializeLazyObject()->_pack(...\func_get_args()); } public function _unpack($value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); + return $this->initializeLazyObject()->_unpack(...\func_get_args()); } public function _prefix($value): string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); + return $this->initializeLazyObject()->_prefix(...\func_get_args()); } public function getLastError(): ?string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); + return $this->initializeLazyObject()->getLastError(...\func_get_args()); } public function clearLastError(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); + return $this->initializeLazyObject()->clearLastError(...\func_get_args()); } public function endpointId(): false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->endpointId(...\func_get_args()); + return $this->initializeLazyObject()->endpointId(...\func_get_args()); } public function getPersistentID(): false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); + return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); } public function socketId(): false|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->socketId(...\func_get_args()); + return $this->initializeLazyObject()->socketId(...\func_get_args()); } public function rawCommand($cmd, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawCommand(...\func_get_args()); + return $this->initializeLazyObject()->rawCommand(...\func_get_args()); } public function select($db): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); + return $this->initializeLazyObject()->select(...\func_get_args()); } public function auth(#[\SensitiveParameter] $auth): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); + return $this->initializeLazyObject()->auth(...\func_get_args()); } public function info(...$sections): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); + return $this->initializeLazyObject()->info(...\func_get_args()); } public function flushdb($sync = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); + return $this->initializeLazyObject()->flushdb(...\func_get_args()); } public function flushall($sync = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); + return $this->initializeLazyObject()->flushall(...\func_get_args()); } public function fcall($name, $keys = [], $argv = [], $handler = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall(...\func_get_args()); + return $this->initializeLazyObject()->fcall(...\func_get_args()); } public function fcall_ro($name, $keys = [], $argv = [], $handler = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall_ro(...\func_get_args()); + return $this->initializeLazyObject()->fcall_ro(...\func_get_args()); } public function function($op, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->function(...\func_get_args()); + return $this->initializeLazyObject()->function(...\func_get_args()); } public function dbsize(): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); - } - - public function dump($key): \Relay\Relay|false|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + return $this->initializeLazyObject()->dbsize(...\func_get_args()); } public function replicaof($host = null, $port = 0): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->replicaof(...\func_get_args()); + return $this->initializeLazyObject()->replicaof(...\func_get_args()); } public function waitaof($numlocal, $numremote, $timeout): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); + return $this->initializeLazyObject()->waitaof(...\func_get_args()); } public function restore($key, $ttl, $value, $options = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); + return $this->initializeLazyObject()->restore(...\func_get_args()); } public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); + return $this->initializeLazyObject()->migrate(...\func_get_args()); } public function echo($arg): \Relay\Relay|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); + return $this->initializeLazyObject()->echo(...\func_get_args()); } public function ping($arg = null): \Relay\Relay|bool|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); + return $this->initializeLazyObject()->ping(...\func_get_args()); } public function idleTime(): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->idleTime(...\func_get_args()); + return $this->initializeLazyObject()->idleTime(...\func_get_args()); } public function randomkey(): \Relay\Relay|bool|null|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); + return $this->initializeLazyObject()->randomkey(...\func_get_args()); } public function time(): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); + return $this->initializeLazyObject()->time(...\func_get_args()); } public function bgrewriteaof(): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); + return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); } public function lastsave(): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); + return $this->initializeLazyObject()->lastsave(...\func_get_args()); } public function lcs($key1, $key2, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); + return $this->initializeLazyObject()->lcs(...\func_get_args()); } public function bgsave($schedule = false): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); + return $this->initializeLazyObject()->bgsave(...\func_get_args()); } public function save(): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); + return $this->initializeLazyObject()->save(...\func_get_args()); } public function role(): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); + return $this->initializeLazyObject()->role(...\func_get_args()); } public function ttl($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); + return $this->initializeLazyObject()->ttl(...\func_get_args()); } public function pttl($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); + return $this->initializeLazyObject()->pttl(...\func_get_args()); } public function exists(...$keys): \Relay\Relay|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); + return $this->initializeLazyObject()->exists(...\func_get_args()); } public function eval($script, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); + return $this->initializeLazyObject()->eval(...\func_get_args()); } public function eval_ro($script, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); + return $this->initializeLazyObject()->eval_ro(...\func_get_args()); } public function evalsha($sha, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); + return $this->initializeLazyObject()->evalsha(...\func_get_args()); } public function evalsha_ro($sha, $args = [], $num_keys = 0): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); + return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); } public function client($operation, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); + return $this->initializeLazyObject()->client(...\func_get_args()); } public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); + return $this->initializeLazyObject()->geoadd(...\func_get_args()); } public function geohash($key, $member, ...$other_members): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); + return $this->initializeLazyObject()->geohash(...\func_get_args()); } public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); + return $this->initializeLazyObject()->georadius(...\func_get_args()); } public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); } public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); + return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); } public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); - } - - public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); + return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); } public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); + return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); } public function get($key): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); + return $this->initializeLazyObject()->get(...\func_get_args()); } public function getset($key, $value): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); - } - - public function getrange($key, $start, $end): \Relay\Relay|false|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); + return $this->initializeLazyObject()->getset(...\func_get_args()); } public function setrange($key, $start, $value): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); + return $this->initializeLazyObject()->setrange(...\func_get_args()); } public function getbit($key, $pos): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); + return $this->initializeLazyObject()->getbit(...\func_get_args()); } public function bitcount($key, $start = 0, $end = -1, $by_bit = false): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); + return $this->initializeLazyObject()->bitcount(...\func_get_args()); } public function bitfield($key, ...$args): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitfield(...\func_get_args()); + return $this->initializeLazyObject()->bitfield(...\func_get_args()); } public function config($operation, $key = null, $value = null): \Relay\Relay|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); + return $this->initializeLazyObject()->config(...\func_get_args()); } public function command(...$args): \Relay\Relay|array|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); + return $this->initializeLazyObject()->command(...\func_get_args()); } public function bitop($operation, $dstkey, $srckey, ...$other_keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); + return $this->initializeLazyObject()->bitop(...\func_get_args()); } public function bitpos($key, $bit, $start = null, $end = null, $bybit = false): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); + return $this->initializeLazyObject()->bitpos(...\func_get_args()); } public function setbit($key, $pos, $val): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); + return $this->initializeLazyObject()->setbit(...\func_get_args()); } public function acl($cmd, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); + return $this->initializeLazyObject()->acl(...\func_get_args()); } public function append($key, $value): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); + return $this->initializeLazyObject()->append(...\func_get_args()); } public function set($key, $value, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); + return $this->initializeLazyObject()->set(...\func_get_args()); } public function getex($key, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getex(...\func_get_args()); + return $this->initializeLazyObject()->getex(...\func_get_args()); } public function getdel($key): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getdel(...\func_get_args()); + return $this->initializeLazyObject()->getdel(...\func_get_args()); } public function setex($key, $seconds, $value): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); + return $this->initializeLazyObject()->setex(...\func_get_args()); } public function pfadd($key, $elements): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); - } - - public function pfcount($key): \Relay\Relay|false|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); + return $this->initializeLazyObject()->pfadd(...\func_get_args()); } public function pfmerge($dst, $srckeys): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); + return $this->initializeLazyObject()->pfmerge(...\func_get_args()); } public function psetex($key, $milliseconds, $value): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); + return $this->initializeLazyObject()->psetex(...\func_get_args()); } public function publish($channel, $message): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + return $this->initializeLazyObject()->publish(...\func_get_args()); } public function pubsub($operation, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); + return $this->initializeLazyObject()->pubsub(...\func_get_args()); } public function spublish($channel, $message): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spublish(...\func_get_args()); + return $this->initializeLazyObject()->spublish(...\func_get_args()); } public function setnx($key, $value): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); + return $this->initializeLazyObject()->setnx(...\func_get_args()); } public function mget($keys): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + return $this->initializeLazyObject()->mget(...\func_get_args()); } public function move($key, $db): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); + return $this->initializeLazyObject()->move(...\func_get_args()); } public function mset($kvals): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); + return $this->initializeLazyObject()->mset(...\func_get_args()); } public function msetnx($kvals): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); + return $this->initializeLazyObject()->msetnx(...\func_get_args()); } public function rename($key, $newkey): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); + return $this->initializeLazyObject()->rename(...\func_get_args()); } public function renamenx($key, $newkey): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); + return $this->initializeLazyObject()->renamenx(...\func_get_args()); } public function del(...$keys): \Relay\Relay|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); + return $this->initializeLazyObject()->del(...\func_get_args()); } public function unlink(...$keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); + return $this->initializeLazyObject()->unlink(...\func_get_args()); } public function expire($key, $seconds, $mode = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); + return $this->initializeLazyObject()->expire(...\func_get_args()); } public function pexpire($key, $milliseconds): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); + return $this->initializeLazyObject()->pexpire(...\func_get_args()); } public function expireat($key, $timestamp): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); + return $this->initializeLazyObject()->expireat(...\func_get_args()); } public function expiretime($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); + return $this->initializeLazyObject()->expiretime(...\func_get_args()); } public function pexpireat($key, $timestamp_ms): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); + return $this->initializeLazyObject()->pexpireat(...\func_get_args()); } public function pexpiretime($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); + return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); } public function persist($key): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); + return $this->initializeLazyObject()->persist(...\func_get_args()); } public function type($key): \Relay\Relay|bool|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); - } - - public function lmove($srckey, $dstkey, $srcpos, $dstpos): \Relay\Relay|false|null|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmove(...\func_get_args()); - } - - public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): \Relay\Relay|false|null|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); + return $this->initializeLazyObject()->type(...\func_get_args()); } public function lrange($key, $start, $stop): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); + return $this->initializeLazyObject()->lrange(...\func_get_args()); } public function lpush($key, $mem, ...$mems): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); + return $this->initializeLazyObject()->lpush(...\func_get_args()); } public function rpush($key, $mem, ...$mems): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); + return $this->initializeLazyObject()->rpush(...\func_get_args()); } public function lpushx($key, $mem, ...$mems): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); + return $this->initializeLazyObject()->lpushx(...\func_get_args()); } public function rpushx($key, $mem, ...$mems): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); + return $this->initializeLazyObject()->rpushx(...\func_get_args()); } public function lset($key, $index, $mem): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); + return $this->initializeLazyObject()->lset(...\func_get_args()); } public function lpop($key, $count = 1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); + return $this->initializeLazyObject()->lpop(...\func_get_args()); } public function lpos($key, $value, $options = null): \Relay\Relay|array|false|int|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpos(...\func_get_args()); + return $this->initializeLazyObject()->lpos(...\func_get_args()); } public function rpop($key, $count = 1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); + return $this->initializeLazyObject()->rpop(...\func_get_args()); } public function rpoplpush($source, $dest): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); } public function brpoplpush($source, $dest, $timeout): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); + return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); } public function blpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); + return $this->initializeLazyObject()->blpop(...\func_get_args()); } public function blmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); + return $this->initializeLazyObject()->blmpop(...\func_get_args()); } public function bzmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); + return $this->initializeLazyObject()->bzmpop(...\func_get_args()); } public function lmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); + return $this->initializeLazyObject()->lmpop(...\func_get_args()); } public function zmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); + return $this->initializeLazyObject()->zmpop(...\func_get_args()); } public function brpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); + return $this->initializeLazyObject()->brpop(...\func_get_args()); } public function bzpopmax($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); } public function bzpopmin($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); + return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); } public function object($op, $key): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); + return $this->initializeLazyObject()->object(...\func_get_args()); } public function geopos($key, ...$members): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); + return $this->initializeLazyObject()->geopos(...\func_get_args()); } public function lrem($key, $mem, $count = 0): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); + return $this->initializeLazyObject()->lrem(...\func_get_args()); } public function lindex($key, $index): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); + return $this->initializeLazyObject()->lindex(...\func_get_args()); } public function linsert($key, $op, $pivot, $element): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); + return $this->initializeLazyObject()->linsert(...\func_get_args()); } public function ltrim($key, $start, $end): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); + return $this->initializeLazyObject()->ltrim(...\func_get_args()); } public function hget($hash, $member): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); + return $this->initializeLazyObject()->hget(...\func_get_args()); } public function hstrlen($hash, $member): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); + return $this->initializeLazyObject()->hstrlen(...\func_get_args()); } public function hgetall($hash): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); + return $this->initializeLazyObject()->hgetall(...\func_get_args()); } public function hkeys($hash): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); + return $this->initializeLazyObject()->hkeys(...\func_get_args()); } public function hvals($hash): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); + return $this->initializeLazyObject()->hvals(...\func_get_args()); } public function hmget($hash, $members): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); - } - - public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hrandfield(...\func_get_args()); + return $this->initializeLazyObject()->hmget(...\func_get_args()); } public function hmset($hash, $members): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); + return $this->initializeLazyObject()->hmset(...\func_get_args()); } public function hexists($hash, $member): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); + return $this->initializeLazyObject()->hexists(...\func_get_args()); } public function hsetnx($hash, $member, $value): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); - } - - public function hset($key, $mem, $val, ...$kvals): \Relay\Relay|false|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); + return $this->initializeLazyObject()->hsetnx(...\func_get_args()); } public function hdel($key, $mem, ...$mems): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); + return $this->initializeLazyObject()->hdel(...\func_get_args()); } public function hincrby($key, $mem, $value): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); + return $this->initializeLazyObject()->hincrby(...\func_get_args()); } public function hincrbyfloat($key, $mem, $value): \Relay\Relay|bool|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); } public function incr($key, $by = 1): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); + return $this->initializeLazyObject()->incr(...\func_get_args()); } public function decr($key, $by = 1): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); + return $this->initializeLazyObject()->decr(...\func_get_args()); } public function incrby($key, $value): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); + return $this->initializeLazyObject()->incrby(...\func_get_args()); } public function decrby($key, $value): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); + return $this->initializeLazyObject()->decrby(...\func_get_args()); } public function incrbyfloat($key, $value): \Relay\Relay|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); + return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); } public function sdiff($key, ...$other_keys): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); + return $this->initializeLazyObject()->sdiff(...\func_get_args()); } public function sdiffstore($key, ...$other_keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); } public function sinter($key, ...$other_keys): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); + return $this->initializeLazyObject()->sinter(...\func_get_args()); } public function sintercard($keys, $limit = -1): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); + return $this->initializeLazyObject()->sintercard(...\func_get_args()); } public function sinterstore($key, ...$other_keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); + return $this->initializeLazyObject()->sinterstore(...\func_get_args()); } public function sunion($key, ...$other_keys): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); + return $this->initializeLazyObject()->sunion(...\func_get_args()); } public function sunionstore($key, ...$other_keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); + return $this->initializeLazyObject()->sunionstore(...\func_get_args()); } public function subscribe($channels, $callback): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); + return $this->initializeLazyObject()->subscribe(...\func_get_args()); } public function unsubscribe($channels = []): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); } public function psubscribe($patterns, $callback): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); + return $this->initializeLazyObject()->psubscribe(...\func_get_args()); } public function punsubscribe($patterns = []): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); } public function ssubscribe($channels, $callback): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ssubscribe(...\func_get_args()); + return $this->initializeLazyObject()->ssubscribe(...\func_get_args()); } public function sunsubscribe($channels = []): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunsubscribe(...\func_get_args()); + return $this->initializeLazyObject()->sunsubscribe(...\func_get_args()); } public function touch($key_or_array, ...$more_keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); + return $this->initializeLazyObject()->touch(...\func_get_args()); } public function pipeline(): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); + return $this->initializeLazyObject()->pipeline(...\func_get_args()); } public function multi($mode = 0): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); + return $this->initializeLazyObject()->multi(...\func_get_args()); } public function exec(): \Relay\Relay|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); + return $this->initializeLazyObject()->exec(...\func_get_args()); } public function wait($replicas, $timeout): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); + return $this->initializeLazyObject()->wait(...\func_get_args()); } public function watch($key, ...$other_keys): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); + return $this->initializeLazyObject()->watch(...\func_get_args()); } public function unwatch(): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); + return $this->initializeLazyObject()->unwatch(...\func_get_args()); } public function discard(): bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); + return $this->initializeLazyObject()->discard(...\func_get_args()); } public function getMode($masked = false): int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); + return $this->initializeLazyObject()->getMode(...\func_get_args()); } public function clearBytes(): void { - ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearBytes(...\func_get_args()); + $this->initializeLazyObject()->clearBytes(...\func_get_args()); } public function scan(&$iterator, $match = null, $count = 0, $type = null): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); + return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); } public function hscan($key, &$iterator, $match = null, $count = 0): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function sscan($key, &$iterator, $match = null, $count = 0): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function zscan($key, &$iterator, $match = null, $count = 0): array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); + return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); } public function keys($pattern): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); + return $this->initializeLazyObject()->keys(...\func_get_args()); } public function slowlog($operation, ...$extra_args): \Relay\Relay|array|bool|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); + return $this->initializeLazyObject()->slowlog(...\func_get_args()); } public function smembers($set): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); + return $this->initializeLazyObject()->smembers(...\func_get_args()); } public function sismember($set, $member): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); + return $this->initializeLazyObject()->sismember(...\func_get_args()); } public function smismember($set, ...$members): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smismember(...\func_get_args()); + return $this->initializeLazyObject()->smismember(...\func_get_args()); } public function srem($set, $member, ...$members): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); + return $this->initializeLazyObject()->srem(...\func_get_args()); } public function sadd($set, $member, ...$members): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); + return $this->initializeLazyObject()->sadd(...\func_get_args()); } public function sort($key, $options = []): \Relay\Relay|array|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); + return $this->initializeLazyObject()->sort(...\func_get_args()); } public function sort_ro($key, $options = []): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); + return $this->initializeLazyObject()->sort_ro(...\func_get_args()); } public function smove($srcset, $dstset, $member): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); + return $this->initializeLazyObject()->smove(...\func_get_args()); } public function spop($set, $count = 1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); + return $this->initializeLazyObject()->spop(...\func_get_args()); } public function srandmember($set, $count = 1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); + return $this->initializeLazyObject()->srandmember(...\func_get_args()); } public function scard($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); + return $this->initializeLazyObject()->scard(...\func_get_args()); } public function script($command, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); + return $this->initializeLazyObject()->script(...\func_get_args()); } public function strlen($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); + return $this->initializeLazyObject()->strlen(...\func_get_args()); } public function hlen($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); + return $this->initializeLazyObject()->hlen(...\func_get_args()); } public function llen($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); + return $this->initializeLazyObject()->llen(...\func_get_args()); } public function xack($key, $group, $ids): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); - } - - public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); + return $this->initializeLazyObject()->xack(...\func_get_args()); } public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Relay\Relay|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); + return $this->initializeLazyObject()->xclaim(...\func_get_args()); } public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Relay\Relay|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); + return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); } public function xlen($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); + return $this->initializeLazyObject()->xlen(...\func_get_args()); } public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); + return $this->initializeLazyObject()->xgroup(...\func_get_args()); } public function xdel($key, $ids): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); + return $this->initializeLazyObject()->xdel(...\func_get_args()); } public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); + return $this->initializeLazyObject()->xinfo(...\func_get_args()); } public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null, $idle = 0): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); + return $this->initializeLazyObject()->xpending(...\func_get_args()); } public function xrange($key, $start, $end, $count = -1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); + return $this->initializeLazyObject()->xrange(...\func_get_args()); } public function xrevrange($key, $end, $start, $count = -1): \Relay\Relay|array|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); + return $this->initializeLazyObject()->xrevrange(...\func_get_args()); } public function xread($streams, $count = -1, $block = -1): \Relay\Relay|array|bool|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); + return $this->initializeLazyObject()->xread(...\func_get_args()); } public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Relay\Relay|array|bool|null { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); + return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); } public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); + return $this->initializeLazyObject()->xtrim(...\func_get_args()); } public function zadd($key, ...$args): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); + return $this->initializeLazyObject()->zadd(...\func_get_args()); } public function zrandmember($key, $options = null): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrandmember(...\func_get_args()); + return $this->initializeLazyObject()->zrandmember(...\func_get_args()); } public function zrange($key, $start, $end, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); + return $this->initializeLazyObject()->zrange(...\func_get_args()); } public function zrevrange($key, $start, $end, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); + return $this->initializeLazyObject()->zrevrange(...\func_get_args()); } public function zrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); } public function zrevrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); } public function zrangestore($dst, $src, $start, $end, $options = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); + return $this->initializeLazyObject()->zrangestore(...\func_get_args()); } public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); } public function zrevrangebylex($key, $max, $min, $offset = -1, $count = -1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); - } - - public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); - } - - public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); + return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); } public function zrem($key, ...$args): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); + return $this->initializeLazyObject()->zrem(...\func_get_args()); } public function zremrangebylex($key, $min, $max): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); } public function zremrangebyrank($key, $start, $end): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); } public function zremrangebyscore($key, $min, $max): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); + return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); } public function zcard($key): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); + return $this->initializeLazyObject()->zcard(...\func_get_args()); } public function zcount($key, $min, $max): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); + return $this->initializeLazyObject()->zcount(...\func_get_args()); } public function zdiff($keys, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); + return $this->initializeLazyObject()->zdiff(...\func_get_args()); } public function zdiffstore($dst, $keys): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); + return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); } public function zincrby($key, $score, $mem): \Relay\Relay|false|float { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); + return $this->initializeLazyObject()->zincrby(...\func_get_args()); } public function zlexcount($key, $min, $max): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); + return $this->initializeLazyObject()->zlexcount(...\func_get_args()); } public function zmscore($key, ...$mems): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmscore(...\func_get_args()); - } - - public function zscore($key, $member): \Relay\Relay|false|float - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); + return $this->initializeLazyObject()->zmscore(...\func_get_args()); } public function zinter($keys, $weights = null, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); + return $this->initializeLazyObject()->zinter(...\func_get_args()); } public function zintercard($keys, $limit = -1): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); + return $this->initializeLazyObject()->zintercard(...\func_get_args()); } public function zinterstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); + return $this->initializeLazyObject()->zinterstore(...\func_get_args()); } public function zunion($keys, $weights = null, $options = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); + return $this->initializeLazyObject()->zunion(...\func_get_args()); } public function zunionstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); + return $this->initializeLazyObject()->zunionstore(...\func_get_args()); } public function zpopmin($key, $count = 1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); + return $this->initializeLazyObject()->zpopmin(...\func_get_args()); } public function zpopmax($key, $count = 1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); + return $this->initializeLazyObject()->zpopmax(...\func_get_args()); } public function _getKeys() { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_getKeys(...\func_get_args()); + return $this->initializeLazyObject()->_getKeys(...\func_get_args()); } } diff --git a/app/vendor/symfony/cache/Traits/RelayProxyTrait.php b/app/vendor/symfony/cache/Traits/RelayProxyTrait.php index a1d252b96..6077b44f3 100644 --- a/app/vendor/symfony/cache/Traits/RelayProxyTrait.php +++ b/app/vendor/symfony/cache/Traits/RelayProxyTrait.php @@ -17,129 +17,124 @@ */ trait RelayProxyTrait { - public function copy($src, $dst, $options = null): \Relay\Relay|bool - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); - } - public function jsonArrAppend($key, $value_or_array, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrAppend(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrAppend(...\func_get_args()); } public function jsonArrIndex($key, $path, $value, $start = 0, $stop = -1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrIndex(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrIndex(...\func_get_args()); } public function jsonArrInsert($key, $path, $index, $value, ...$other_values): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrInsert(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrInsert(...\func_get_args()); } public function jsonArrLen($key, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrLen(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrLen(...\func_get_args()); } public function jsonArrPop($key, $path = null, $index = -1): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrPop(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrPop(...\func_get_args()); } public function jsonArrTrim($key, $path, $start, $stop): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrTrim(...\func_get_args()); + return $this->initializeLazyObject()->jsonArrTrim(...\func_get_args()); } public function jsonClear($key, $path = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonClear(...\func_get_args()); + return $this->initializeLazyObject()->jsonClear(...\func_get_args()); } public function jsonDebug($command, $key, $path = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonDebug(...\func_get_args()); + return $this->initializeLazyObject()->jsonDebug(...\func_get_args()); } public function jsonDel($key, $path = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonDel(...\func_get_args()); + return $this->initializeLazyObject()->jsonDel(...\func_get_args()); } public function jsonForget($key, $path = null): \Relay\Relay|false|int { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonForget(...\func_get_args()); + return $this->initializeLazyObject()->jsonForget(...\func_get_args()); } public function jsonGet($key, $options = [], ...$paths): mixed { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonGet(...\func_get_args()); + return $this->initializeLazyObject()->jsonGet(...\func_get_args()); } public function jsonMerge($key, $path, $value): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMerge(...\func_get_args()); + return $this->initializeLazyObject()->jsonMerge(...\func_get_args()); } public function jsonMget($key_or_array, $path): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMget(...\func_get_args()); + return $this->initializeLazyObject()->jsonMget(...\func_get_args()); } public function jsonMset($key, $path, $value, ...$other_triples): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMset(...\func_get_args()); + return $this->initializeLazyObject()->jsonMset(...\func_get_args()); } public function jsonNumIncrBy($key, $path, $value): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonNumIncrBy(...\func_get_args()); + return $this->initializeLazyObject()->jsonNumIncrBy(...\func_get_args()); } public function jsonNumMultBy($key, $path, $value): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonNumMultBy(...\func_get_args()); + return $this->initializeLazyObject()->jsonNumMultBy(...\func_get_args()); } public function jsonObjKeys($key, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonObjKeys(...\func_get_args()); + return $this->initializeLazyObject()->jsonObjKeys(...\func_get_args()); } public function jsonObjLen($key, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonObjLen(...\func_get_args()); + return $this->initializeLazyObject()->jsonObjLen(...\func_get_args()); } public function jsonResp($key, $path = null): \Relay\Relay|array|false|int|string { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonResp(...\func_get_args()); + return $this->initializeLazyObject()->jsonResp(...\func_get_args()); } public function jsonSet($key, $path, $value, $condition = null): \Relay\Relay|bool { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonSet(...\func_get_args()); + return $this->initializeLazyObject()->jsonSet(...\func_get_args()); } public function jsonStrAppend($key, $value, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonStrAppend(...\func_get_args()); + return $this->initializeLazyObject()->jsonStrAppend(...\func_get_args()); } public function jsonStrLen($key, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonStrLen(...\func_get_args()); + return $this->initializeLazyObject()->jsonStrLen(...\func_get_args()); } public function jsonToggle($key, $path): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonToggle(...\func_get_args()); + return $this->initializeLazyObject()->jsonToggle(...\func_get_args()); } public function jsonType($key, $path = null): \Relay\Relay|array|false { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonType(...\func_get_args()); + return $this->initializeLazyObject()->jsonType(...\func_get_args()); } } } else { @@ -148,9 +143,5 @@ public function jsonType($key, $path = null): \Relay\Relay|array|false */ trait RelayProxyTrait { - public function copy($src, $dst, $options = null): \Relay\Relay|false|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); - } } } diff --git a/app/vendor/symfony/cache/composer.json b/app/vendor/symfony/cache/composer.json index d537037ae..bdb461be8 100644 --- a/app/vendor/symfony/cache/composer.json +++ b/app/vendor/symfony/cache/composer.json @@ -34,6 +34,7 @@ "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/filesystem": "^6.4|^7.0", diff --git a/app/vendor/symfony/config/Builder/ClassBuilder.php b/app/vendor/symfony/config/Builder/ClassBuilder.php index f34ab8519..5ae8bda16 100644 --- a/app/vendor/symfony/config/Builder/ClassBuilder.php +++ b/app/vendor/symfony/config/Builder/ClassBuilder.php @@ -63,11 +63,11 @@ public function build(): string } unset($path[$key]); } - $require .= sprintf('require_once __DIR__.\DIRECTORY_SEPARATOR.\'%s\';', implode('\'.\DIRECTORY_SEPARATOR.\'', $path))."\n"; + $require .= \sprintf('require_once __DIR__.\DIRECTORY_SEPARATOR.\'%s\';', implode('\'.\DIRECTORY_SEPARATOR.\'', $path))."\n"; } $use = $require ? "\n" : ''; foreach (array_keys($this->use) as $statement) { - $use .= sprintf('use %s;', $statement)."\n"; + $use .= \sprintf('use %s;', $statement)."\n"; } $implements = [] === $this->implements ? '' : 'implements '.implode(', ', $this->implements); @@ -82,7 +82,7 @@ public function build(): string } } - $content = strtr(' $this->namespace, 'REQUIRE' => $require, 'USE' => $use, 'CLASS' => $this->getName(), 'IMPLEMENTS' => $implements, 'BODY' => $body]); - - return $content; } public function addRequire(self $class): void @@ -126,8 +124,8 @@ public function addProperty(string $name, ?string $classType = null, ?string $de $property->setType($classType); } $this->properties[] = $property; - $defaultValue = null !== $defaultValue ? sprintf(' = %s', $defaultValue) : ''; - $property->setContent(sprintf('private $%s%s;', $property->getName(), $defaultValue)); + $defaultValue = null !== $defaultValue ? \sprintf(' = %s', $defaultValue) : ''; + $property->setContent(\sprintf('private $%s%s;', $property->getName(), $defaultValue)); return $property; } diff --git a/app/vendor/symfony/config/Builder/ConfigBuilderGenerator.php b/app/vendor/symfony/config/Builder/ConfigBuilderGenerator.php index 4923eaf25..08e91c2d1 100644 --- a/app/vendor/symfony/config/Builder/ConfigBuilderGenerator.php +++ b/app/vendor/symfony/config/Builder/ConfigBuilderGenerator.php @@ -114,7 +114,7 @@ private function buildNode(NodeInterface $node, ClassBuilder $class, string $nam $child instanceof PrototypedArrayNode => $this->handlePrototypedArrayNode($child, $class, $namespace), $child instanceof VariableNode => $this->handleVariableNode($child, $class), $child instanceof ArrayNode => $this->handleArrayNode($child, $class, $namespace), - default => throw new \RuntimeException(sprintf('Unknown node "%s".', $child::class)), + default => throw new \RuntimeException(\sprintf('Unknown node "%s".', $child::class)), }; } } @@ -129,9 +129,9 @@ private function handleArrayNode(ArrayNode $node, ClassBuilder $class, string $n $hasNormalizationClosures = $this->hasNormalizationClosures($node); $comment = $this->getComment($node); if ($hasNormalizationClosures) { - $comment = sprintf(" * @template TValue\n * @param TValue \$value\n%s", $comment); - $comment .= sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); - $comment .= sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); + $comment = \sprintf(" * @template TValue\n * @param TValue \$value\n%s", $comment); + $comment .= \sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); + $comment .= \sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); } if ('' !== $comment) { $comment = "/**\n$comment*/\n"; @@ -281,9 +281,9 @@ public function NAME(string $VAR, TYPE $VALUE): static $comment = $this->getComment($node); if ($hasNormalizationClosures) { - $comment = sprintf(" * @template TValue\n * @param TValue \$value\n%s", $comment); - $comment .= sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); - $comment .= sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); + $comment = \sprintf(" * @template TValue\n * @param TValue \$value\n%s", $comment); + $comment .= \sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); + $comment .= \sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); } if ('' !== $comment) { $comment = "/**\n$comment*/\n"; @@ -425,7 +425,7 @@ private function getComment(BaseNode $node): string } if ($node instanceof EnumNode) { - $comment .= sprintf(' * @param ParamConfigurator|%s $value', implode('|', array_unique(array_map(fn ($a) => !$a instanceof \UnitEnum ? var_export($a, true) : '\\'.ltrim(var_export($a, true), '\\'), $node->getValues()))))."\n"; + $comment .= \sprintf(' * @param ParamConfigurator|%s $value', implode('|', array_unique(array_map(fn ($a) => !$a instanceof \UnitEnum ? var_export($a, true) : '\\'.ltrim(var_export($a, true), '\\'), $node->getValues()))))."\n"; } else { $parameterTypes = $this->getParameterTypes($node); $comment .= ' * @param ParamConfigurator|'.implode('|', $parameterTypes).' $value'."\n"; @@ -578,7 +578,7 @@ public function NAME(string $key, mixed $value): static private function getSubNamespace(ClassBuilder $rootClass): string { - return sprintf('%s\\%s', $rootClass->getNamespace(), substr($rootClass->getName(), 0, -6)); + return \sprintf('%s\\%s', $rootClass->getNamespace(), substr($rootClass->getName(), 0, -6)); } private function hasNormalizationClosures(NodeInterface $node): bool diff --git a/app/vendor/symfony/config/CHANGELOG.md b/app/vendor/symfony/config/CHANGELOG.md index 169798955..e38639e4d 100644 --- a/app/vendor/symfony/config/CHANGELOG.md +++ b/app/vendor/symfony/config/CHANGELOG.md @@ -1,6 +1,17 @@ CHANGELOG ========= +7.2 +--- + + * Add `#[WhenNot]` attribute to prevent service from being registered in a specific environment + * Generate a meta file in JSON format for resource tracking + * Add `SkippingResourceChecker` + * Add support for `defaultNull()` on `BooleanNode` + * Add `StringNode` and `StringNodeDefinition` + * Add `ArrayNodeDefinition::stringPrototype()` method + * Add `NodeBuilder::stringNode()` method + 7.1 --- diff --git a/app/vendor/symfony/config/ConfigCache.php b/app/vendor/symfony/config/ConfigCache.php index 7c87b9b9e..400b6162c 100644 --- a/app/vendor/symfony/config/ConfigCache.php +++ b/app/vendor/symfony/config/ConfigCache.php @@ -11,7 +11,9 @@ namespace Symfony\Component\Config; +use Symfony\Component\Config\Resource\ResourceInterface; use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; +use Symfony\Component\Config\Resource\SkippingResourceChecker; /** * ConfigCache caches arbitrary content in files on disk. @@ -26,18 +28,23 @@ class ConfigCache extends ResourceCheckerConfigCache { /** - * @param string $file The absolute cache path - * @param bool $debug Whether debugging is enabled or not - * @param string|null $metaFile The absolute path to the meta file + * @param string $file The absolute cache path + * @param bool $debug Whether debugging is enabled or not + * @param string|null $metaFile The absolute path to the meta file + * @param class-string[]|null $skippedResourceTypes */ public function __construct( string $file, private bool $debug, ?string $metaFile = null, + array|null $skippedResourceTypes = null, ) { $checkers = []; - if (true === $this->debug) { - $checkers = [new SelfCheckingResourceChecker()]; + if ($this->debug) { + if (null !== $skippedResourceTypes) { + $checkers[] = new SkippingResourceChecker($skippedResourceTypes); + } + $checkers[] = new SelfCheckingResourceChecker(); } parent::__construct($file, $checkers, $metaFile); diff --git a/app/vendor/symfony/config/Definition/ArrayNode.php b/app/vendor/symfony/config/Definition/ArrayNode.php index 15ad47862..5301b7243 100644 --- a/app/vendor/symfony/config/Definition/ArrayNode.php +++ b/app/vendor/symfony/config/Definition/ArrayNode.php @@ -159,7 +159,7 @@ public function hasDefaultValue(): bool public function getDefaultValue(): mixed { if (!$this->hasDefaultValue()) { - throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath())); + throw new \RuntimeException(\sprintf('The node at path "%s" has no default value.', $this->getPath())); } $defaults = []; @@ -185,7 +185,7 @@ public function addChild(NodeInterface $node): void throw new \InvalidArgumentException('Child nodes must be named.'); } if (isset($this->children[$name])) { - throw new \InvalidArgumentException(sprintf('A child node named "%s" already exists.', $name)); + throw new \InvalidArgumentException(\sprintf('A child node named "%s" already exists.', $name)); } $this->children[$name] = $node; @@ -198,15 +198,15 @@ public function addChild(NodeInterface $node): void protected function finalizeValue(mixed $value): mixed { if (false === $value) { - throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s.', $this->getPath(), json_encode($value))); + throw new UnsetKeyException(\sprintf('Unsetting key for path "%s", value: false.', $this->getPath())); } foreach ($this->children as $name => $child) { if (!\array_key_exists($name, $value)) { if ($child->isRequired()) { - $message = sprintf('The child config "%s" under "%s" must be configured', $name, $this->getPath()); + $message = \sprintf('The child config "%s" under "%s" must be configured', $name, $this->getPath()); if ($child->getInfo()) { - $message .= sprintf(': %s', $child->getInfo()); + $message .= \sprintf(': %s', $child->getInfo()); } else { $message .= '.'; } @@ -241,7 +241,7 @@ protected function finalizeValue(mixed $value): mixed protected function validateType(mixed $value): void { if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "array", but got "%s"', $this->getPath(), get_debug_type($value))); + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "array", but got "%s"', $this->getPath(), get_debug_type($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } @@ -292,13 +292,13 @@ protected function normalizeValue(mixed $value): mixed } } - $msg = sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); + $msg = \sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); if (\count($guesses)) { asort($guesses); - $msg .= sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses))); + $msg .= \sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses))); } else { - $msg .= sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals)); + $msg .= \sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals)); } $ex = new InvalidConfigurationException($msg); @@ -347,7 +347,7 @@ protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed // no conflict if (!\array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); + $ex = new InvalidConfigurationException(\sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); $ex->setPath($this->getPath()); throw $ex; diff --git a/app/vendor/symfony/config/Definition/BaseNode.php b/app/vendor/symfony/config/Definition/BaseNode.php index 180d59708..9cfd69239 100644 --- a/app/vendor/symfony/config/Definition/BaseNode.php +++ b/app/vendor/symfony/config/Definition/BaseNode.php @@ -285,7 +285,7 @@ public function getPath(): string final public function merge(mixed $leftSide, mixed $rightSide): mixed { if (!$this->allowOverwrite) { - throw new ForbiddenOverwriteException(sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath())); + throw new ForbiddenOverwriteException(\sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath())); } if ($leftSide !== $leftPlaceholders = self::resolvePlaceholderValue($leftSide)) { @@ -404,7 +404,7 @@ final public function finalize(mixed $value): mixed throw $e; } catch (\Exception $e) { - throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": ', $this->getPath()).$e->getMessage(), $e->getCode(), $e); + throw new InvalidConfigurationException(\sprintf('Invalid configuration for path "%s": ', $this->getPath()).$e->getMessage(), $e->getCode(), $e); } } @@ -477,7 +477,7 @@ private static function resolvePlaceholderValue(mixed $value): mixed private function doValidateType(mixed $value): void { if (null !== $this->handlingPlaceholder && !$this->allowPlaceholders()) { - $e = new InvalidTypeException(sprintf('A dynamic value is not compatible with a "%s" node type at path "%s".', static::class, $this->getPath())); + $e = new InvalidTypeException(\sprintf('A dynamic value is not compatible with a "%s" node type at path "%s".', static::class, $this->getPath())); $e->setPath($this->getPath()); throw $e; @@ -493,7 +493,7 @@ private function doValidateType(mixed $value): void $validTypes = $this->getValidPlaceholderTypes(); if ($validTypes && array_diff($knownTypes, $validTypes)) { - $e = new InvalidTypeException(sprintf( + $e = new InvalidTypeException(\sprintf( 'Invalid type for path "%s". Expected %s, but got %s.', $this->getPath(), 1 === \count($validTypes) ? '"'.reset($validTypes).'"' : 'one of "'.implode('", "', $validTypes).'"', diff --git a/app/vendor/symfony/config/Definition/BooleanNode.php b/app/vendor/symfony/config/Definition/BooleanNode.php index f6ab5bfb1..b4ed0f0eb 100644 --- a/app/vendor/symfony/config/Definition/BooleanNode.php +++ b/app/vendor/symfony/config/Definition/BooleanNode.php @@ -20,10 +20,23 @@ */ class BooleanNode extends ScalarNode { + public function __construct( + ?string $name, + ?NodeInterface $parent = null, + string $pathSeparator = self::DEFAULT_PATH_SEPARATOR, + private bool $nullable = false, + ) { + parent::__construct($name, $parent, $pathSeparator); + } + protected function validateType(mixed $value): void { if (!\is_bool($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "bool", but got "%s".', $this->getPath(), get_debug_type($value))); + if (null === $value && $this->nullable) { + return; + } + + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "bool%s", but got "%s".', $this->getPath(), $this->nullable ? '" or "null' : '', get_debug_type($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/app/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/app/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php index 4596151fb..6b75ba137 100644 --- a/app/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php +++ b/app/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php @@ -73,6 +73,11 @@ public function scalarPrototype(): ScalarNodeDefinition return $this->prototype('scalar'); } + public function stringPrototype(): StringNodeDefinition + { + return $this->prototype('string'); + } + public function booleanPrototype(): BooleanNodeDefinition { return $this->prototype('boolean'); @@ -371,7 +376,7 @@ protected function createNode(): NodeInterface if ($this->default) { if (!\is_array($this->defaultValue)) { - throw new \InvalidArgumentException(sprintf('%s: the default value of an array node has to be an array.', $node->getPath())); + throw new \InvalidArgumentException(\sprintf('%s: the default value of an array node has to be an array.', $node->getPath())); } $node->setDefaultValue($this->defaultValue); @@ -429,23 +434,23 @@ protected function validateConcreteNode(ArrayNode $node): void $path = $node->getPath(); if (null !== $this->key) { - throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path)); } if (false === $this->allowEmptyValue) { - throw new InvalidDefinitionException(sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s".', $path)); } if (true === $this->atLeastOne) { - throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path)); } if ($this->default) { - throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path)); } if (false !== $this->addDefaultChildren) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path)); } } @@ -459,20 +464,20 @@ protected function validatePrototypeNode(PrototypedArrayNode $node): void $path = $node->getPath(); if ($this->addDefaults) { - throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path)); } if (false !== $this->addDefaultChildren) { if ($this->default) { - throw new InvalidDefinitionException(sprintf('A default value and default children might not be used together at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('A default value and default children might not be used together at path "%s".', $path)); } if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path)); } if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path)); + throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path)); } } } @@ -497,7 +502,7 @@ public function find(string $nodePath): NodeDefinition : substr($nodePath, 0, $pathSeparatorPos); if (null === $node = ($this->children[$firstPathSegment] ?? null)) { - throw new \RuntimeException(sprintf('Node with name "%s" does not exist in the current node "%s".', $firstPathSegment, $this->name)); + throw new \RuntimeException(\sprintf('Node with name "%s" does not exist in the current node "%s".', $firstPathSegment, $this->name)); } if (false === $pathSeparatorPos) { diff --git a/app/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/app/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php index 15e63961a..bc03c9c94 100644 --- a/app/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php +++ b/app/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php @@ -33,7 +33,7 @@ public function __construct(?string $name, ?NodeParentInterface $parent = null) */ protected function instantiateNode(): BooleanNode { - return new BooleanNode($this->name, $this->parent, $this->pathSeparator); + return new BooleanNode($this->name, $this->parent, $this->pathSeparator, null === $this->nullEquivalent); } /** @@ -43,4 +43,20 @@ public function cannotBeEmpty(): static { throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.'); } + + public function defaultNull(): static + { + $this->nullEquivalent = null; + + return parent::defaultNull(); + } + + public function defaultValue(mixed $value): static + { + if (null === $value) { + $this->nullEquivalent = null; + } + + return parent::defaultValue($value); + } } diff --git a/app/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/app/vendor/symfony/config/Definition/Builder/ExprBuilder.php index d391f8524..e802df2ee 100644 --- a/app/vendor/symfony/config/Definition/Builder/ExprBuilder.php +++ b/app/vendor/symfony/config/Definition/Builder/ExprBuilder.php @@ -194,7 +194,7 @@ public function thenEmptyArray(): static */ public function thenInvalid(string $message): static { - $this->thenPart = static fn ($v) => throw new \InvalidArgumentException(sprintf($message, json_encode($v))); + $this->thenPart = static fn ($v) => throw new \InvalidArgumentException(\sprintf($message, json_encode($v))); return $this; } diff --git a/app/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/app/vendor/symfony/config/Definition/Builder/NodeBuilder.php index d79075a91..b3fa7bfd5 100644 --- a/app/vendor/symfony/config/Definition/Builder/NodeBuilder.php +++ b/app/vendor/symfony/config/Definition/Builder/NodeBuilder.php @@ -31,6 +31,7 @@ public function __construct() 'float' => FloatNodeDefinition::class, 'array' => ArrayNodeDefinition::class, 'enum' => EnumNodeDefinition::class, + 'string' => StringNodeDefinition::class, ]; } @@ -102,6 +103,14 @@ public function variableNode(string $name): VariableNodeDefinition return $this->node($name, 'variable'); } + /** + * Creates a child string node. + */ + public function stringNode(string $name): StringNodeDefinition + { + return $this->node($name, 'string'); + } + /** * Returns the parent node. */ @@ -185,13 +194,13 @@ protected function getNodeClass(string $type): string $type = strtolower($type); if (!isset($this->nodeMapping[$type])) { - throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type)); + throw new \RuntimeException(\sprintf('The node type "%s" is not registered.', $type)); } $class = $this->nodeMapping[$type]; if (!class_exists($class)) { - throw new \RuntimeException(sprintf('The node class "%s" does not exist.', $class)); + throw new \RuntimeException(\sprintf('The node class "%s" does not exist.', $class)); } return $class; diff --git a/app/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/app/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php index 41129a2ff..06dc97994 100644 --- a/app/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php +++ b/app/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php @@ -33,7 +33,7 @@ abstract class NumericNodeDefinition extends ScalarNodeDefinition public function max(int|float $max): static { if (isset($this->min) && $this->min > $max) { - throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min)); + throw new \InvalidArgumentException(\sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min)); } $this->max = $max; @@ -50,7 +50,7 @@ public function max(int|float $max): static public function min(int|float $min): static { if (isset($this->max) && $this->max < $min) { - throw new \InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max)); + throw new \InvalidArgumentException(\sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max)); } $this->min = $min; diff --git a/app/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php b/app/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php new file mode 100644 index 000000000..c86f1bfd7 --- /dev/null +++ b/app/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\StringNode; + +/** + * This class provides a fluent interface for defining a node. + * + * @author Raffaele Carelle + */ +class StringNodeDefinition extends ScalarNodeDefinition +{ + public function __construct(?string $name, ?NodeParentInterface $parent = null) + { + parent::__construct($name, $parent); + + $this->nullEquivalent = ''; + } + + protected function instantiateNode(): StringNode + { + return new StringNode($this->name, $this->parent, $this->pathSeparator); + } +} diff --git a/app/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/app/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php index dd6f76c73..2131c7131 100644 --- a/app/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php +++ b/app/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php @@ -145,7 +145,7 @@ private function writeNode(NodeInterface $node, int $depth = 0, bool $root = fal if ($child instanceof BaseNode && $child->isDeprecated()) { $deprecation = $child->getDeprecation($child->getName(), $node->getPath()); - $comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); + $comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); } if ($child instanceof EnumNode) { @@ -199,7 +199,7 @@ private function writeNode(NodeInterface $node, int $depth = 0, bool $root = fal $rootOpenTag = '<'.$rootName; if (1 >= ($attributesCount = \count($rootAttributes))) { if (1 === $attributesCount) { - $rootOpenTag .= sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes))); + $rootOpenTag .= \sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes))); } $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>'; @@ -215,7 +215,7 @@ private function writeNode(NodeInterface $node, int $depth = 0, bool $root = fal $i = 1; foreach ($rootAttributes as $attrName => $attrValue) { - $attr = sprintf('%s="%s"', $attrName, $this->writeValue($attrValue)); + $attr = \sprintf('%s="%s"', $attrName, $this->writeValue($attrValue)); $this->writeLine($attr, $depth + 4); @@ -252,7 +252,7 @@ private function writeLine(string $text, int $indent = 0): void $indent = \strlen($text) + $indent; $format = '%'.$indent.'s'; - $this->reference .= sprintf($format, $text).\PHP_EOL; + $this->reference .= \sprintf($format, $text).\PHP_EOL; } /** diff --git a/app/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php b/app/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php index e8d7f5cfa..267444d92 100644 --- a/app/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php +++ b/app/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php @@ -40,7 +40,7 @@ public function dumpAtPath(ConfigurationInterface $configuration, string $path): foreach (explode('.', $path) as $step) { if (!$node instanceof ArrayNode) { - throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); + throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); } /** @var NodeInterface[] $children */ @@ -54,7 +54,7 @@ public function dumpAtPath(ConfigurationInterface $configuration, string $path): } } - throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); + throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); } return $this->dumpNode($node); @@ -121,7 +121,7 @@ private function writeNode(NodeInterface $node, ?NodeInterface $parentNode = nul // deprecated? if ($node instanceof BaseNode && $node->isDeprecated()) { $deprecation = $node->getDeprecation($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath()); - $comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); + $comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); } // example @@ -133,12 +133,12 @@ private function writeNode(NodeInterface $node, ?NodeInterface $parentNode = nul $comments = \count($comments) ? '# '.implode(', ', $comments) : ''; $key = $prototypedArray ? '-' : $node->getName().':'; - $text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' '); + $text = rtrim(\sprintf('%-21s%s %s', $key, $default, $comments), ' '); if ($node instanceof BaseNode && $info = $node->getInfo()) { $this->writeLine(''); // indenting multi-line info - $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info); + $info = str_replace("\n", \sprintf("\n%".($depth * 4).'s# ', ' '), $info); $this->writeLine('# '.$info, $depth * 4); } @@ -180,7 +180,7 @@ private function writeLine(string $text, int $indent = 0): void $indent = \strlen($text) + $indent; $format = '%'.$indent.'s'; - $this->reference .= sprintf($format, $text)."\n"; + $this->reference .= \sprintf($format, $text)."\n"; } private function writeArray(array $array, int $depth, bool $asComment = false): void @@ -193,14 +193,13 @@ private function writeArray(array $array, int $depth, bool $asComment = false): } else { $val = $value; } - $prefix = $asComment ? '# ' : ''; $prefix = $asComment ? '# ' : ''; if ($isIndexed) { $this->writeLine($prefix.'- '.$val, $depth * 4); } else { - $this->writeLine(sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4); + $this->writeLine(\sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4); } if (\is_array($value)) { diff --git a/app/vendor/symfony/config/Definition/EnumNode.php b/app/vendor/symfony/config/Definition/EnumNode.php index 29fe0bdfb..b253406c8 100644 --- a/app/vendor/symfony/config/Definition/EnumNode.php +++ b/app/vendor/symfony/config/Definition/EnumNode.php @@ -34,11 +34,11 @@ public function __construct(?string $name, ?NodeInterface $parent = null, array } if (!$value instanceof \UnitEnum) { - throw new \InvalidArgumentException(sprintf('"%s" only supports scalar, enum, or null values, "%s" given.', __CLASS__, get_debug_type($value))); + throw new \InvalidArgumentException(\sprintf('"%s" only supports scalar, enum, or null values, "%s" given.', __CLASS__, get_debug_type($value))); } if ($value::class !== ($enumClass ??= $value::class)) { - throw new \InvalidArgumentException(sprintf('"%s" only supports one type of enum, "%s" and "%s" passed.', __CLASS__, $enumClass, $value::class)); + throw new \InvalidArgumentException(\sprintf('"%s" only supports one type of enum, "%s" and "%s" passed.', __CLASS__, $enumClass, $value::class)); } } @@ -79,7 +79,7 @@ protected function finalizeValue(mixed $value): mixed $value = parent::finalizeValue($value); if (!\in_array($value, $this->values, true)) { - $ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), $this->getPermissibleValues(', '))); + $ex = new InvalidConfigurationException(\sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), $this->getPermissibleValues(', '))); $ex->setPath($this->getPath()); throw $ex; diff --git a/app/vendor/symfony/config/Definition/FloatNode.php b/app/vendor/symfony/config/Definition/FloatNode.php index 1023a1674..8b922804b 100644 --- a/app/vendor/symfony/config/Definition/FloatNode.php +++ b/app/vendor/symfony/config/Definition/FloatNode.php @@ -28,7 +28,7 @@ protected function validateType(mixed $value): void } if (!\is_float($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "float", but got "%s".', $this->getPath(), get_debug_type($value))); + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "float", but got "%s".', $this->getPath(), get_debug_type($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/app/vendor/symfony/config/Definition/IntegerNode.php b/app/vendor/symfony/config/Definition/IntegerNode.php index 3fe70f621..6fa3e6032 100644 --- a/app/vendor/symfony/config/Definition/IntegerNode.php +++ b/app/vendor/symfony/config/Definition/IntegerNode.php @@ -23,7 +23,7 @@ class IntegerNode extends NumericNode protected function validateType(mixed $value): void { if (!\is_int($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "int", but got "%s".', $this->getPath(), get_debug_type($value))); + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "int", but got "%s".', $this->getPath(), get_debug_type($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/app/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php b/app/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php index 940b894f7..09147f791 100644 --- a/app/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php +++ b/app/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php @@ -81,7 +81,7 @@ private function executeCallback(callable $callback, DefinitionConfigurator $con $reflectionType = $parameter->getType(); if (!$reflectionType instanceof \ReflectionNamedType) { - throw new \InvalidArgumentException(sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s").', $parameter->getName(), $path, DefinitionConfigurator::class)); + throw new \InvalidArgumentException(\sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s").', $parameter->getName(), $path, DefinitionConfigurator::class)); } $arguments[] = match ($reflectionType->getName()) { diff --git a/app/vendor/symfony/config/Definition/NumericNode.php b/app/vendor/symfony/config/Definition/NumericNode.php index b55ee922b..a97850c9d 100644 --- a/app/vendor/symfony/config/Definition/NumericNode.php +++ b/app/vendor/symfony/config/Definition/NumericNode.php @@ -20,14 +20,14 @@ */ class NumericNode extends ScalarNode { - protected int|float|null $min; - protected int|float|null $max; - - public function __construct(?string $name, ?NodeInterface $parent = null, int|float|null $min = null, int|float|null $max = null, string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR) - { + public function __construct( + ?string $name, + ?NodeInterface $parent = null, + protected int|float|null $min = null, + protected int|float|null $max = null, + string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR, + ) { parent::__construct($name, $parent, $pathSeparator); - $this->min = $min; - $this->max = $max; } protected function finalizeValue(mixed $value): mixed @@ -36,10 +36,10 @@ protected function finalizeValue(mixed $value): mixed $errorMsg = null; if (isset($this->min) && $value < $this->min) { - $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); + $errorMsg = \sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); } if (isset($this->max) && $value > $this->max) { - $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); + $errorMsg = \sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); } if (isset($errorMsg)) { $ex = new InvalidConfigurationException($errorMsg); diff --git a/app/vendor/symfony/config/Definition/PrototypedArrayNode.php b/app/vendor/symfony/config/Definition/PrototypedArrayNode.php index a11e72638..a901dab78 100644 --- a/app/vendor/symfony/config/Definition/PrototypedArrayNode.php +++ b/app/vendor/symfony/config/Definition/PrototypedArrayNode.php @@ -156,7 +156,7 @@ public function addChild(NodeInterface $node): never protected function finalizeValue(mixed $value): mixed { if (false === $value) { - throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s.', $this->getPath(), json_encode($value))); + throw new UnsetKeyException(\sprintf('Unsetting key for path "%s", value: false.', $this->getPath())); } foreach ($value as $k => $v) { @@ -169,7 +169,7 @@ protected function finalizeValue(mixed $value): mixed } if (\count($value) < $this->minNumberOfElements) { - $ex = new InvalidConfigurationException(sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements)); + $ex = new InvalidConfigurationException(\sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements)); $ex->setPath($this->getPath()); throw $ex; @@ -194,7 +194,7 @@ protected function normalizeValue(mixed $value): mixed foreach ($value as $k => $v) { if (null !== $this->keyAttribute && \is_array($v)) { if (!isset($v[$this->keyAttribute]) && \is_int($k) && $isList) { - $ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath())); + $ex = new InvalidConfigurationException(\sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -217,17 +217,15 @@ protected function normalizeValue(mixed $value): mixed $valuePrototype = current($this->valuePrototypes) ?: clone $children['value']; $valuePrototype->parent = $this; $originalClosures = $this->prototype->normalizationClosures; - if (\is_array($originalClosures)) { - $valuePrototypeClosures = $valuePrototype->normalizationClosures; - $valuePrototype->normalizationClosures = \is_array($valuePrototypeClosures) ? array_merge($originalClosures, $valuePrototypeClosures) : $originalClosures; - } + $valuePrototypeClosures = $valuePrototype->normalizationClosures; + $valuePrototype->normalizationClosures = array_merge($originalClosures, $valuePrototypeClosures); $this->valuePrototypes[$k] = $valuePrototype; } } } if (\array_key_exists($k, $normalized)) { - $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); + $ex = new DuplicateKeyException(\sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -268,7 +266,7 @@ protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed // no conflict if (!\array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); + $ex = new InvalidConfigurationException(\sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); $ex->setPath($this->getPath()); throw $ex; diff --git a/app/vendor/symfony/config/Definition/ScalarNode.php b/app/vendor/symfony/config/Definition/ScalarNode.php index a7ccb917c..341769249 100644 --- a/app/vendor/symfony/config/Definition/ScalarNode.php +++ b/app/vendor/symfony/config/Definition/ScalarNode.php @@ -30,7 +30,7 @@ class ScalarNode extends VariableNode protected function validateType(mixed $value): void { if (!\is_scalar($value) && null !== $value) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "scalar", but got "%s".', $this->getPath(), get_debug_type($value))); + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "scalar", but got "%s".', $this->getPath(), get_debug_type($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/app/vendor/symfony/config/Definition/StringNode.php b/app/vendor/symfony/config/Definition/StringNode.php new file mode 100644 index 000000000..6687b8825 --- /dev/null +++ b/app/vendor/symfony/config/Definition/StringNode.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents a String value in the config tree. + * + * @author Raffaele Carelle + */ +class StringNode extends ScalarNode +{ + protected function validateType(mixed $value): void + { + if (!\is_string($value)) { + $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "string", but got "%s".', $this->getPath(), get_debug_type($value))); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } + + protected function getValidPlaceholderTypes(): array + { + return ['string']; + } +} diff --git a/app/vendor/symfony/config/Definition/VariableNode.php b/app/vendor/symfony/config/Definition/VariableNode.php index 22c28500f..ed1b903a1 100644 --- a/app/vendor/symfony/config/Definition/VariableNode.php +++ b/app/vendor/symfony/config/Definition/VariableNode.php @@ -69,7 +69,7 @@ protected function finalizeValue(mixed $value): mixed // deny environment variables only when using custom validators // this avoids ever passing an empty value to final validation closures if (!$this->allowEmptyValue && $this->isHandlingPlaceholder() && $this->finalValidationClosures) { - $e = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath())); + $e = new InvalidConfigurationException(\sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath())); if ($hint = $this->getInfo()) { $e->addHint($hint); } @@ -79,7 +79,7 @@ protected function finalizeValue(mixed $value): mixed } if (!$this->allowEmptyValue && $this->isValueEmpty($value)) { - $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value))); + $ex = new InvalidConfigurationException(\sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/app/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php b/app/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php index 2d2a4de00..d39bde046 100644 --- a/app/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php +++ b/app/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php @@ -20,7 +20,7 @@ class FileLoaderImportCircularReferenceException extends LoaderLoadException { public function __construct(array $resources, int $code = 0, ?\Throwable $previous = null) { - $message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]); + $message = \sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]); \Exception::__construct($message, $code, $previous); } diff --git a/app/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php b/app/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php index 5641a3145..d9e5b4f36 100644 --- a/app/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php +++ b/app/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php @@ -18,13 +18,13 @@ */ class FileLocatorFileNotFoundException extends \InvalidArgumentException { - private array $paths; - - public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, array $paths = []) - { + public function __construct( + string $message = '', + int $code = 0, + ?\Throwable $previous = null, + private array $paths = [], + ) { parent::__construct($message, $code, $previous); - - $this->paths = $paths; } public function getPaths(): array diff --git a/app/vendor/symfony/config/Exception/LoaderLoadException.php b/app/vendor/symfony/config/Exception/LoaderLoadException.php index a2d5e33c7..ce486a35f 100644 --- a/app/vendor/symfony/config/Exception/LoaderLoadException.php +++ b/app/vendor/symfony/config/Exception/LoaderLoadException.php @@ -31,7 +31,7 @@ public function __construct(mixed $resource, ?string $sourceResource = null, int try { $resource = json_encode($resource, \JSON_THROW_ON_ERROR); } catch (\JsonException) { - $resource = sprintf('resource of type "%s"', get_debug_type($resource)); + $resource = \sprintf('resource of type "%s"', get_debug_type($resource)); } } @@ -42,35 +42,35 @@ public function __construct(mixed $resource, ?string $sourceResource = null, int // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim... if (str_ends_with($previous->getMessage(), '.')) { $trimmedMessage = substr($previous->getMessage(), 0, -1); - $message .= sprintf('%s', $trimmedMessage).' in '; + $message .= \sprintf('%s', $trimmedMessage).' in '; } else { - $message .= sprintf('%s', $previous->getMessage()).' in '; + $message .= \sprintf('%s', $previous->getMessage()).' in '; } $message .= $resource.' '; // show tweaked trace to complete the human readable sentence if (null === $sourceResource) { - $message .= sprintf('(which is loaded in resource "%s")', $resource); + $message .= \sprintf('(which is loaded in resource "%s")', $resource); } else { - $message .= sprintf('(which is being imported from "%s")', $sourceResource); + $message .= \sprintf('(which is being imported from "%s")', $sourceResource); } $message .= '.'; // if there's no previous message, present it the default way } elseif (null === $sourceResource) { - $message .= sprintf('Cannot load resource "%s".', $resource); + $message .= \sprintf('Cannot load resource "%s".', $resource); } else { - $message .= sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource); + $message .= \sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource); } // Is the resource located inside a bundle? if ('@' === $resource[0]) { $parts = explode(\DIRECTORY_SEPARATOR, $resource); $bundle = substr($parts[0], 1); - $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); - $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); + $message .= \sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); + $message .= \sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); } elseif (null !== $type) { - $message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type); + $message .= \sprintf(' Make sure there is a loader supporting the "%s" type.', $type); } parent::__construct($message, $code, $previous); @@ -79,20 +79,20 @@ public function __construct(mixed $resource, ?string $sourceResource = null, int protected function varToString(mixed $var): string { if (\is_object($var)) { - return sprintf('Object(%s)', $var::class); + return \sprintf('Object(%s)', $var::class); } if (\is_array($var)) { $a = []; foreach ($var as $k => $v) { - $a[] = sprintf('%s => %s', $k, $this->varToString($v)); + $a[] = \sprintf('%s => %s', $k, $this->varToString($v)); } - return sprintf('Array(%s)', implode(', ', $a)); + return \sprintf('Array(%s)', implode(', ', $a)); } if (\is_resource($var)) { - return sprintf('Resource(%s)', get_resource_type($var)); + return \sprintf('Resource(%s)', get_resource_type($var)); } if (null === $var) { diff --git a/app/vendor/symfony/config/FileLocator.php b/app/vendor/symfony/config/FileLocator.php index ed8f01447..3a5064edc 100644 --- a/app/vendor/symfony/config/FileLocator.php +++ b/app/vendor/symfony/config/FileLocator.php @@ -43,7 +43,7 @@ public function locate(string $name, ?string $currentPath = null, bool $first = if ($this->isAbsolutePath($name)) { if (!file_exists($name)) { - throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); + throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); } return $name; @@ -70,7 +70,7 @@ public function locate(string $name, ?string $currentPath = null, bool $first = } if (!$filepaths) { - throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist (in: "%s").', $name, implode('", "', $paths)), 0, null, $notfound); + throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist (in: "%s").', $name, implode('", "', $paths)), 0, null, $notfound); } return $filepaths; diff --git a/app/vendor/symfony/config/Loader/FileLoader.php b/app/vendor/symfony/config/Loader/FileLoader.php index c217cd85b..8d9d84627 100644 --- a/app/vendor/symfony/config/Loader/FileLoader.php +++ b/app/vendor/symfony/config/Loader/FileLoader.php @@ -27,13 +27,12 @@ abstract class FileLoader extends Loader { protected static array $loading = []; - protected FileLocatorInterface $locator; - private ?string $currentDir = null; - public function __construct(FileLocatorInterface $locator, ?string $env = null) - { - $this->locator = $locator; + public function __construct( + protected FileLocatorInterface $locator, + ?string $env = null, + ) { parent::__construct($env); } diff --git a/app/vendor/symfony/config/Resource/ClassExistenceResource.php b/app/vendor/symfony/config/Resource/ClassExistenceResource.php index e2175b9ba..e7851740c 100644 --- a/app/vendor/symfony/config/Resource/ClassExistenceResource.php +++ b/app/vendor/symfony/config/Resource/ClassExistenceResource.php @@ -158,10 +158,10 @@ public static function throwOnRequiredClass(string $class, ?\Exception $previous throw $previous; } - $message = sprintf('Class "%s" not found.', $class); + $message = \sprintf('Class "%s" not found.', $class); if ($class !== (self::$autoloadedClass ?? $class)) { - $message = substr_replace($message, sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0); + $message = substr_replace($message, \sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0); } if (null !== $previous) { diff --git a/app/vendor/symfony/config/Resource/DirectoryResource.php b/app/vendor/symfony/config/Resource/DirectoryResource.php index 372a895c1..5fd5f65c9 100644 --- a/app/vendor/symfony/config/Resource/DirectoryResource.php +++ b/app/vendor/symfony/config/Resource/DirectoryResource.php @@ -35,7 +35,7 @@ public function __construct( $resolvedResource = realpath($resource) ?: (file_exists($resource) ? $resource : false); if (false === $resolvedResource || !is_dir($resolvedResource)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource)); + throw new \InvalidArgumentException(\sprintf('The directory "%s" does not exist.', $resource)); } $this->resource = $resolvedResource; diff --git a/app/vendor/symfony/config/Resource/FileResource.php b/app/vendor/symfony/config/Resource/FileResource.php index 6e8f9bdb3..44e5bbc57 100644 --- a/app/vendor/symfony/config/Resource/FileResource.php +++ b/app/vendor/symfony/config/Resource/FileResource.php @@ -34,7 +34,7 @@ public function __construct(string $resource) $resolvedResource = realpath($resource) ?: (file_exists($resource) ? $resource : false); if (false === $resolvedResource) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource)); + throw new \InvalidArgumentException(\sprintf('The file "%s" does not exist.', $resource)); } $this->resource = $resolvedResource; diff --git a/app/vendor/symfony/config/Resource/GlobResource.php b/app/vendor/symfony/config/Resource/GlobResource.php index 1cc627b21..e6a348e11 100644 --- a/app/vendor/symfony/config/Resource/GlobResource.php +++ b/app/vendor/symfony/config/Resource/GlobResource.php @@ -52,7 +52,7 @@ public function __construct( $this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0; if (false === $resolvedPrefix) { - throw new \InvalidArgumentException(sprintf('The path "%s" does not exist.', $prefix)); + throw new \InvalidArgumentException(\sprintf('The path "%s" does not exist.', $prefix)); } $this->prefix = $resolvedPrefix; diff --git a/app/vendor/symfony/config/Resource/ReflectionClassResource.php b/app/vendor/symfony/config/Resource/ReflectionClassResource.php index dbc927b59..e039329ca 100644 --- a/app/vendor/symfony/config/Resource/ReflectionClassResource.php +++ b/app/vendor/symfony/config/Resource/ReflectionClassResource.php @@ -23,14 +23,14 @@ class ReflectionClassResource implements SelfCheckingResourceInterface { private array $files = []; private string $className; - private \ReflectionClass $classReflector; private array $excludedVendors = []; private string $hash; - public function __construct(\ReflectionClass $classReflector, array $excludedVendors = []) - { + public function __construct( + private \ReflectionClass $classReflector, + array $excludedVendors = [], + ) { $this->className = $classReflector->name; - $this->classReflector = $classReflector; $this->excludedVendors = $excludedVendors; } @@ -81,7 +81,7 @@ private function loadFiles(\ReflectionClass $class): void $file = $class->getFileName(); if (false !== $file && is_file($file)) { foreach ($this->excludedVendors as $vendor) { - if (str_starts_with($file, $vendor) && false !== strpbrk(substr($file, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) { + if (\in_array($file[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($file, $vendor)) { $file = false; break; } @@ -154,6 +154,13 @@ private function generateSignature(\ReflectionClass $class): iterable } foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) { + foreach ($this->excludedVendors as $vendor) { + $file = $m->getFileName(); + if (\in_array($file[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($file, $vendor)) { + continue 2; + } + } + foreach ($m->getAttributes() as $a) { $attributes[] = [$a->getName(), (string) $a]; } diff --git a/app/vendor/symfony/config/Resource/SkippingResourceChecker.php b/app/vendor/symfony/config/Resource/SkippingResourceChecker.php new file mode 100644 index 000000000..0f0934c82 --- /dev/null +++ b/app/vendor/symfony/config/Resource/SkippingResourceChecker.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +use Symfony\Component\Config\ResourceCheckerInterface; + +class SkippingResourceChecker implements ResourceCheckerInterface +{ + private array $skippedResourceTypes; + + /** + * @param class-string[] $skippedResourceTypes + */ + public function __construct(array $skippedResourceTypes = []) + { + $this->skippedResourceTypes = array_flip($skippedResourceTypes); + } + + public function supports(ResourceInterface $metadata): bool + { + return !$this->skippedResourceTypes || isset($this->skippedResourceTypes[$metadata::class]); + } + + public function isFresh(ResourceInterface $resource, int $timestamp): bool + { + return true; + } +} diff --git a/app/vendor/symfony/config/ResourceCheckerConfigCache.php b/app/vendor/symfony/config/ResourceCheckerConfigCache.php index b7307489c..c201a3dcb 100644 --- a/app/vendor/symfony/config/ResourceCheckerConfigCache.php +++ b/app/vendor/symfony/config/ResourceCheckerConfigCache.php @@ -118,12 +118,26 @@ public function write(string $content, ?array $metadata = null): void } if (null !== $metadata) { - $filesystem->dumpFile($this->metaFile, serialize($metadata)); + $filesystem->dumpFile($this->metaFile, $ser = serialize($metadata)); try { $filesystem->chmod($this->metaFile, $mode, $umask); } catch (IOException) { // discard chmod failure (some filesystem may not support it) } + + $ser = preg_replace_callback('/;O:(\d+):"/', static fn ($m) => ';O:'.(9 + $m[1]).':"Tracking\\', $ser); + $ser = preg_replace_callback('/s:(\d+):"\0[^\0]++\0/', static fn ($m) => 's:'.($m[1] - \strlen($m[0]) + 6).':"', $ser); + $ser = unserialize($ser); + $ser = @json_encode($ser) ?: []; + $ser = str_replace('"__PHP_Incomplete_Class_Name":"Tracking\\\\', '"@type":"', $ser); + $ser = \sprintf('{"resources":%s}', $ser); + + $filesystem->dumpFile($this->metaFile.'.json', $ser); + try { + $filesystem->chmod($this->metaFile.'.json', $mode, $umask); + } catch (IOException) { + // discard chmod failure (some filesystem may not support it) + } } if (\function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL)) { diff --git a/app/vendor/symfony/config/Util/XmlUtils.php b/app/vendor/symfony/config/Util/XmlUtils.php index a7a43555b..02ebe7dbe 100644 --- a/app/vendor/symfony/config/Util/XmlUtils.php +++ b/app/vendor/symfony/config/Util/XmlUtils.php @@ -80,12 +80,12 @@ public static function parse(string $content, string|callable|null $schemaOrCall $valid = false; } } elseif (is_file($schemaOrCallable)) { - $schemaSource = (new Filesystem())->readFile((string) $schemaOrCallable); + $schemaSource = (new Filesystem())->readFile($schemaOrCallable); $valid = @$dom->schemaValidateSource($schemaSource); } else { libxml_use_internal_errors($internalErrors); - throw new XmlParsingException(sprintf('Invalid XSD file: "%s".', $schemaOrCallable)); + throw new XmlParsingException(\sprintf('Invalid XSD file: "%s".', $schemaOrCallable)); } if (!$valid) { @@ -116,23 +116,23 @@ public static function parse(string $content, string|callable|null $schemaOrCall public static function loadFile(string $file, string|callable|null $schemaOrCallable = null): \DOMDocument { if (!is_file($file)) { - throw new \InvalidArgumentException(sprintf('Resource "%s" is not a file.', $file)); + throw new \InvalidArgumentException(\sprintf('Resource "%s" is not a file.', $file)); } if (!is_readable($file)) { - throw new \InvalidArgumentException(sprintf('File "%s" is not readable.', $file)); + throw new \InvalidArgumentException(\sprintf('File "%s" is not readable.', $file)); } $content = (new Filesystem())->readFile($file); if ('' === trim($content)) { - throw new \InvalidArgumentException(sprintf('File "%s" does not contain valid XML, it is empty.', $file)); + throw new \InvalidArgumentException(\sprintf('File "%s" does not contain valid XML, it is empty.', $file)); } try { return static::parse($content, $schemaOrCallable); } catch (InvalidXmlException $e) { - throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious()); + throw new XmlParsingException(\sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious()); } } @@ -156,7 +156,7 @@ public static function loadFile(string $file, string|callable|null $schemaOrCall */ public static function convertDomElementToArray(\DOMElement $element, bool $checkPrefix = true): mixed { - $prefix = (string) $element->prefix; + $prefix = $element->prefix; $empty = true; $config = []; foreach ($element->attributes as $name => $node) { @@ -174,7 +174,7 @@ public static function convertDomElementToArray(\DOMElement $element, bool $chec $nodeValue = trim($node->nodeValue); $empty = false; } - } elseif ($checkPrefix && $prefix != (string) $node->prefix) { + } elseif ($checkPrefix && $prefix != $node->prefix) { continue; } elseif (!$node instanceof \DOMComment) { $value = static::convertDomElementToArray($node, $checkPrefix); @@ -243,7 +243,7 @@ protected static function getXmlErrors(bool $internalErrors): array { $errors = []; foreach (libxml_get_errors() as $error) { - $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + $errors[] = \sprintf('[%s %s] %s (in %s - line %d, column %d)', \LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', $error->code, trim($error->message), diff --git a/app/vendor/symfony/filesystem/Exception/FileNotFoundException.php b/app/vendor/symfony/filesystem/Exception/FileNotFoundException.php index 06b732b16..d0d27977d 100644 --- a/app/vendor/symfony/filesystem/Exception/FileNotFoundException.php +++ b/app/vendor/symfony/filesystem/Exception/FileNotFoundException.php @@ -25,7 +25,7 @@ public function __construct(?string $message = null, int $code = 0, ?\Throwable if (null === $path) { $message = 'File could not be found.'; } else { - $message = sprintf('File "%s" could not be found.', $path); + $message = \sprintf('File "%s" could not be found.', $path); } } diff --git a/app/vendor/symfony/filesystem/Filesystem.php b/app/vendor/symfony/filesystem/Filesystem.php index 3c259b07d..f97c8b2fe 100644 --- a/app/vendor/symfony/filesystem/Filesystem.php +++ b/app/vendor/symfony/filesystem/Filesystem.php @@ -38,7 +38,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe { $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); if ($originIsLocal && !is_file($originFile)) { - throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile); + throw new FileNotFoundException(\sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile); } $this->mkdir(\dirname($targetFile)); @@ -51,12 +51,12 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe if ($doCopy) { // https://bugs.php.net/64634 if (!$source = self::box('fopen', $originFile, 'r')) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); + throw new IOException(\sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); } // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default if (!$target = self::box('fopen', $targetFile, 'w', false, stream_context_create(['ftp' => ['overwrite' => true]]))) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); + throw new IOException(\sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); } $bytesCopied = stream_copy_to_stream($source, $target); @@ -65,7 +65,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe unset($source, $target); if (!is_file($targetFile)) { - throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile); + throw new IOException(\sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile); } if ($originIsLocal) { @@ -76,7 +76,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe self::box('touch', $targetFile, filemtime($originFile)); if ($bytesCopied !== $bytesOrigin = filesize($originFile)) { - throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile); + throw new IOException(\sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile); } } } @@ -95,7 +95,7 @@ public function mkdir(string|iterable $dirs, int $mode = 0777): void } if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) { - throw new IOException(sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir); + throw new IOException(\sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir); } } } @@ -109,7 +109,7 @@ public function exists(string|iterable $files): bool foreach ($this->toIterable($files) as $file) { if (\strlen($file) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file); + throw new IOException(\sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file); } if (!file_exists($file)) { @@ -132,7 +132,7 @@ public function touch(string|iterable $files, ?int $time = null, ?int $atime = n { foreach ($this->toIterable($files) as $file) { if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) { - throw new IOException(sprintf('Failed to touch "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to touch "%s": ', $file).self::$lastError, 0, null, $file); } } } @@ -160,7 +160,7 @@ private static function doRemove(array $files, bool $isRecursive): void if (is_link($file)) { // See https://bugs.php.net/52176 if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) { - throw new IOException(sprintf('Failed to remove symlink "%s": ', $file).self::$lastError); + throw new IOException(\sprintf('Failed to remove symlink "%s": ', $file).self::$lastError); } } elseif (is_dir($file)) { if (!$isRecursive) { @@ -191,10 +191,10 @@ private static function doRemove(array $files, bool $isRecursive): void $file = $origFile; } - throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError); + throw new IOException(\sprintf('Failed to remove directory "%s": ', $file).$lastError); } } elseif (!self::box('unlink', $file) && ((self::$lastError && str_contains(self::$lastError, 'Permission denied')) || file_exists($file))) { - throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError); + throw new IOException(\sprintf('Failed to remove file "%s": ', $file).self::$lastError); } } } @@ -212,7 +212,7 @@ public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool { foreach ($this->toIterable($files) as $file) { if (!self::box('chmod', $file, $mode & ~$umask)) { - throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file); } if ($recursive && is_dir($file) && !is_link($file)) { $this->chmod(new \FilesystemIterator($file), $mode, $umask, true); @@ -240,11 +240,11 @@ public function chown(string|iterable $files, string|int $user, bool $recursive } if (is_link($file) && \function_exists('lchown')) { if (!self::box('lchown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); } } else { if (!self::box('chown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); } } } @@ -270,11 +270,11 @@ public function chgrp(string|iterable $files, string|int $group, bool $recursive } if (is_link($file) && \function_exists('lchgrp')) { if (!self::box('lchgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); } } else { if (!self::box('chgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); + throw new IOException(\sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); } } } @@ -290,7 +290,7 @@ public function rename(string $origin, string $target, bool $overwrite = false): { // we check that target does not exist if (!$overwrite && $this->isReadable($target)) { - throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target); + throw new IOException(\sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target); } if (!self::box('rename', $origin, $target)) { @@ -301,7 +301,7 @@ public function rename(string $origin, string $target, bool $overwrite = false): return; } - throw new IOException(sprintf('Cannot rename "%s" to "%s": ', $origin, $target).self::$lastError, 0, null, $target); + throw new IOException(\sprintf('Cannot rename "%s" to "%s": ', $origin, $target).self::$lastError, 0, null, $target); } } @@ -315,7 +315,7 @@ private function isReadable(string $filename): bool $maxPathLength = \PHP_MAXPATHLEN - 2; if (\strlen($filename) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename); + throw new IOException(\sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename); } return is_readable($filename); @@ -372,7 +372,7 @@ public function hardlink(string $originFile, string|iterable $targetFiles): void } if (!is_file($originFile)) { - throw new FileNotFoundException(sprintf('Origin file "%s" is not a file.', $originFile)); + throw new FileNotFoundException(\sprintf('Origin file "%s" is not a file.', $originFile)); } foreach ($this->toIterable($targetFiles) as $targetFile) { @@ -396,10 +396,10 @@ private function linkException(string $origin, string $target, string $linkType) { if (self::$lastError) { if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) { - throw new IOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target); + throw new IOException(\sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target); } } - throw new IOException(sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target); + throw new IOException(\sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target); } /** @@ -436,11 +436,11 @@ public function readlink(string $path, bool $canonicalize = false): ?string public function makePathRelative(string $endPath, string $startPath): string { if (!$this->isAbsolutePath($startPath)) { - throw new InvalidArgumentException(sprintf('The start path "%s" is not absolute.', $startPath)); + throw new InvalidArgumentException(\sprintf('The start path "%s" is not absolute.', $startPath)); } if (!$this->isAbsolutePath($endPath)) { - throw new InvalidArgumentException(sprintf('The end path "%s" is not absolute.', $endPath)); + throw new InvalidArgumentException(\sprintf('The end path "%s" is not absolute.', $endPath)); } // Normalize separators on Windows @@ -526,7 +526,7 @@ public function mirror(string $originDir, string $targetDir, ?\Traversable $iter $originDirLen = \strlen($originDir); if (!$this->exists($originDir)) { - throw new IOException(sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir); + throw new IOException(\sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir); } // Iterate in destination folder to remove obsolete entries @@ -570,7 +570,7 @@ public function mirror(string $originDir, string $targetDir, ?\Traversable $iter } elseif (is_file($file)) { $this->copy($file, $target, $options['override'] ?? false); } else { - throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file); + throw new IOException(\sprintf('Unable to guess "%s" file type.', $file), 0, null, $file); } } } @@ -619,7 +619,7 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin // Loop until we create a valid temp file or have reached 10 attempts for ($i = 0; $i < 10; ++$i) { // Create a unique filename - $tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true).$suffix; + $tmpFile = $dir.'/'.$prefix.bin2hex(random_bytes(4)).$suffix; // Use fopen instead of file_exists as some streams do not support stat // Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability @@ -646,7 +646,7 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin public function dumpFile(string $filename, $content): void { if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); + throw new \TypeError(\sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); } $dir = \dirname($filename); @@ -667,7 +667,7 @@ public function dumpFile(string $filename, $content): void try { if (false === self::box('file_put_contents', $tmpFile, $content)) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); + throw new IOException(\sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); } self::box('chmod', $tmpFile, self::box('fileperms', $filename) ?: 0666 & ~umask()); @@ -695,7 +695,7 @@ public function dumpFile(string $filename, $content): void public function appendToFile(string $filename, $content, bool $lock = false): void { if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); + throw new \TypeError(\sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); } $dir = \dirname($filename); @@ -705,7 +705,7 @@ public function appendToFile(string $filename, $content, bool $lock = false): vo } if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND | ($lock ? \LOCK_EX : 0))) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); + throw new IOException(\sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); } } @@ -717,12 +717,12 @@ public function appendToFile(string $filename, $content, bool $lock = false): vo public function readFile(string $filename): string { if (is_dir($filename)) { - throw new IOException(sprintf('Failed to read file "%s": File is a directory.', $filename)); + throw new IOException(\sprintf('Failed to read file "%s": File is a directory.', $filename)); } $content = self::box('file_get_contents', $filename); if (false === $content) { - throw new IOException(sprintf('Failed to read file "%s": ', $filename).self::$lastError, 0, null, $filename); + throw new IOException(\sprintf('Failed to read file "%s": ', $filename).self::$lastError, 0, null, $filename); } return $content; @@ -746,7 +746,7 @@ private function getSchemeAndHierarchy(string $filename): array private static function assertFunctionExists(string $func): void { if (!\function_exists($func)) { - throw new IOException(sprintf('Unable to perform filesystem operation because the "%s()" function has been disabled.', $func)); + throw new IOException(\sprintf('Unable to perform filesystem operation because the "%s()" function has been disabled.', $func)); } } diff --git a/app/vendor/symfony/filesystem/Path.php b/app/vendor/symfony/filesystem/Path.php index db9ce4be9..2f2e87903 100644 --- a/app/vendor/symfony/filesystem/Path.php +++ b/app/vendor/symfony/filesystem/Path.php @@ -437,11 +437,11 @@ public static function isRelative(string $path): bool public static function makeAbsolute(string $path, string $basePath): string { if ('' === $basePath) { - throw new InvalidArgumentException(sprintf('The base path must be a non-empty string. Got: "%s".', $basePath)); + throw new InvalidArgumentException(\sprintf('The base path must be a non-empty string. Got: "%s".', $basePath)); } if (!self::isAbsolute($basePath)) { - throw new InvalidArgumentException(sprintf('The base path "%s" is not an absolute path.', $basePath)); + throw new InvalidArgumentException(\sprintf('The base path "%s" is not an absolute path.', $basePath)); } if (self::isAbsolute($path)) { @@ -531,12 +531,12 @@ public static function makeRelative(string $path, string $basePath): string // If the passed path is absolute, but the base path is not, we // cannot generate a relative path if ('' !== $root && '' === $baseRoot) { - throw new InvalidArgumentException(sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath)); + throw new InvalidArgumentException(\sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath)); } // Fail if the roots of the two paths are different if ($baseRoot && $root !== $baseRoot) { - throw new InvalidArgumentException(sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot)); + throw new InvalidArgumentException(\sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot)); } if ('' === $relativeBasePath) { diff --git a/app/vendor/symfony/translation/CHANGELOG.md b/app/vendor/symfony/translation/CHANGELOG.md index 5c18dde5d..622c7f75d 100644 --- a/app/vendor/symfony/translation/CHANGELOG.md +++ b/app/vendor/symfony/translation/CHANGELOG.md @@ -1,6 +1,20 @@ CHANGELOG ========= +7.2 +--- + + * Deprecate `ProviderFactoryTestCase`, extend `AbstractProviderFactoryTestCase` instead + + The `testIncompleteDsnException()` test is no longer provided by default. If you make use of it by implementing the `incompleteDsnProvider()` data providers, + you now need to use the `IncompleteDsnTestTrait`. + + * Make `ProviderFactoryTestCase` and `ProviderTestCase` compatible with PHPUnit 10+ + * Add `lint:translations` command + * Deprecate passing an escape character to `CsvFileLoader::setCsvControl()` + * Make Xliff 2.0 attributes in segment element available as `segment-attributes` + metadata returned by `XliffFileLoader` and make `XliffFileDumper` write them to the file + 7.1 --- diff --git a/app/vendor/symfony/translation/Catalogue/AbstractOperation.php b/app/vendor/symfony/translation/Catalogue/AbstractOperation.php index 7f559a4a9..4e825a2be 100644 --- a/app/vendor/symfony/translation/Catalogue/AbstractOperation.php +++ b/app/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -30,8 +30,6 @@ abstract class AbstractOperation implements OperationInterface public const NEW_BATCH = 'new'; public const ALL_BATCH = 'all'; - protected MessageCatalogueInterface $source; - protected MessageCatalogueInterface $target; protected MessageCatalogue $result; /** @@ -62,14 +60,14 @@ abstract class AbstractOperation implements OperationInterface /** * @throws LogicException */ - public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) - { + public function __construct( + protected MessageCatalogueInterface $source, + protected MessageCatalogueInterface $target, + ) { if ($source->getLocale() !== $target->getLocale()) { throw new LogicException('Operated catalogues must belong to the same locale.'); } - $this->source = $source; - $this->target = $target; $this->result = new MessageCatalogue($source->getLocale()); $this->messages = []; } @@ -97,7 +95,7 @@ public function getDomains(): array public function getMessages(string $domain): array { if (!\in_array($domain, $this->getDomains(), true)) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); + throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain)); } if (!isset($this->messages[$domain][self::ALL_BATCH])) { @@ -110,7 +108,7 @@ public function getMessages(string $domain): array public function getNewMessages(string $domain): array { if (!\in_array($domain, $this->getDomains(), true)) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); + throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain)); } if (!isset($this->messages[$domain][self::NEW_BATCH])) { @@ -123,7 +121,7 @@ public function getNewMessages(string $domain): array public function getObsoleteMessages(string $domain): array { if (!\in_array($domain, $this->getDomains(), true)) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); + throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain)); } if (!isset($this->messages[$domain][self::OBSOLETE_BATCH])) { @@ -160,7 +158,7 @@ public function moveMessagesToIntlDomainsIfPossible(string $batch = self::ALL_BA self::OBSOLETE_BATCH => $this->getObsoleteMessages($domain), self::NEW_BATCH => $this->getNewMessages($domain), self::ALL_BATCH => $this->getMessages($domain), - default => throw new \InvalidArgumentException(sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)), + default => throw new \InvalidArgumentException(\sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)), }; if (!$messages || (!$this->source->all($intlDomain) && $this->source->all($domain))) { diff --git a/app/vendor/symfony/translation/Command/TranslationLintCommand.php b/app/vendor/symfony/translation/Command/TranslationLintCommand.php new file mode 100644 index 000000000..e525fc07a --- /dev/null +++ b/app/vendor/symfony/translation/Command/TranslationLintCommand.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Command; + +use Symfony\Component\Console\Attribute\AsCommand; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Completion\CompletionInput; +use Symfony\Component\Console\Completion\CompletionSuggestions; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Translation\Exception\ExceptionInterface; +use Symfony\Component\Translation\TranslatorBagInterface; +use Symfony\Contracts\Translation\TranslatorInterface; + +/** + * Lint translations files syntax and outputs encountered errors. + * + * @author Hugo Alliaume + */ +#[AsCommand(name: 'lint:translations', description: 'Lint translations files syntax and outputs encountered errors')] +class TranslationLintCommand extends Command +{ + private SymfonyStyle $io; + + public function __construct( + private TranslatorInterface&TranslatorBagInterface $translator, + private array $enabledLocales = [], + ) { + parent::__construct(); + } + + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + { + if ($input->mustSuggestOptionValuesFor('locale')) { + $suggestions->suggestValues($this->enabledLocales); + } + } + + protected function configure(): void + { + $this + ->setDefinition([ + new InputOption('locale', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the locales to lint.', $this->enabledLocales), + ]) + ->setHelp(<<<'EOF' +The %command.name% command lint translations. + + php %command.full_name% +EOF + ); + } + + protected function initialize(InputInterface $input, OutputInterface $output): void + { + $this->io = new SymfonyStyle($input, $output); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $locales = $input->getOption('locale'); + + /** @var array> $errors */ + $errors = []; + $domainsByLocales = []; + + foreach ($locales as $locale) { + $messageCatalogue = $this->translator->getCatalogue($locale); + + foreach ($domainsByLocales[$locale] = $messageCatalogue->getDomains() as $domain) { + foreach ($messageCatalogue->all($domain) as $id => $translation) { + try { + $this->translator->trans($id, [], $domain, $messageCatalogue->getLocale()); + } catch (ExceptionInterface $e) { + $errors[$locale][$domain][$id] = $e; + } + } + } + } + + if (!$domainsByLocales) { + $this->io->error('No translation files were found.'); + + return Command::SUCCESS; + } + + $this->io->table( + ['Locale', 'Domains', 'Valid?'], + array_map( + static fn (string $locale, array $domains) => [ + $locale, + implode(', ', $domains), + !\array_key_exists($locale, $errors) ? 'Yes' : 'No', + ], + array_keys($domainsByLocales), + $domainsByLocales + ), + ); + + if ($errors) { + foreach ($errors as $locale => $domains) { + foreach ($domains as $domain => $domainsErrors) { + $this->io->section(\sprintf('Errors for locale "%s" and domain "%s"', $locale, $domain)); + + foreach ($domainsErrors as $id => $error) { + $this->io->text(\sprintf('Translation key "%s" is invalid:', $id)); + $this->io->error($error->getMessage()); + } + } + } + + return Command::FAILURE; + } + + $this->io->success('All translations are valid.'); + + return Command::SUCCESS; + } +} diff --git a/app/vendor/symfony/translation/Command/TranslationPullCommand.php b/app/vendor/symfony/translation/Command/TranslationPullCommand.php index 5d9c092c3..ad42716f5 100644 --- a/app/vendor/symfony/translation/Command/TranslationPullCommand.php +++ b/app/vendor/symfony/translation/Command/TranslationPullCommand.php @@ -34,22 +34,14 @@ final class TranslationPullCommand extends Command { use TranslationTrait; - private TranslationProviderCollection $providerCollection; - private TranslationWriterInterface $writer; - private TranslationReaderInterface $reader; - private string $defaultLocale; - private array $transPaths; - private array $enabledLocales; - - public function __construct(TranslationProviderCollection $providerCollection, TranslationWriterInterface $writer, TranslationReaderInterface $reader, string $defaultLocale, array $transPaths = [], array $enabledLocales = []) - { - $this->providerCollection = $providerCollection; - $this->writer = $writer; - $this->reader = $reader; - $this->defaultLocale = $defaultLocale; - $this->transPaths = $transPaths; - $this->enabledLocales = $enabledLocales; - + public function __construct( + private TranslationProviderCollection $providerCollection, + private TranslationWriterInterface $writer, + private TranslationReaderInterface $reader, + private string $defaultLocale, + private array $transPaths = [], + private array $enabledLocales = [], + ) { parent::__construct(); } @@ -163,7 +155,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->writer->write($operation->getResult(), $format, $writeOptions); } - $io->success(sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); + $io->success(\sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); return 0; } @@ -177,7 +169,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->writer->write($catalogue, $format, $writeOptions); } - $io->success(sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); + $io->success(\sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); return 0; } diff --git a/app/vendor/symfony/translation/Command/TranslationPushCommand.php b/app/vendor/symfony/translation/Command/TranslationPushCommand.php index 3310ac697..b1cdc5fc0 100644 --- a/app/vendor/symfony/translation/Command/TranslationPushCommand.php +++ b/app/vendor/symfony/translation/Command/TranslationPushCommand.php @@ -34,18 +34,12 @@ final class TranslationPushCommand extends Command { use TranslationTrait; - private TranslationProviderCollection $providers; - private TranslationReaderInterface $reader; - private array $transPaths; - private array $enabledLocales; - - public function __construct(TranslationProviderCollection $providers, TranslationReaderInterface $reader, array $transPaths = [], array $enabledLocales = []) - { - $this->providers = $providers; - $this->reader = $reader; - $this->transPaths = $transPaths; - $this->enabledLocales = $enabledLocales; - + public function __construct( + private TranslationProviderCollection $providers, + private TranslationReaderInterface $reader, + private array $transPaths = [], + private array $enabledLocales = [], + ) { parent::__construct(); } @@ -115,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $provider = $this->providers->get($input->getArgument('provider')); if (!$this->enabledLocales) { - throw new InvalidArgumentException(sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME))); + throw new InvalidArgumentException(\sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME))); } $io = new SymfonyStyle($input, $output); @@ -139,7 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!$deleteMissing && $force) { $provider->write($localTranslations); - $io->success(sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); + $io->success(\sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); return 0; } @@ -149,7 +143,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($deleteMissing) { $provider->delete($providerTranslations->diff($localTranslations)); - $io->success(sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); + $io->success(\sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); // Read provider translations again, after missing translations deletion, // to avoid push freshly deleted translations. @@ -164,7 +158,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $provider->write($translationsToWrite); - $io->success(sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); + $io->success(\sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); return 0; } diff --git a/app/vendor/symfony/translation/Command/XliffLintCommand.php b/app/vendor/symfony/translation/Command/XliffLintCommand.php index 439562556..82a9571ce 100644 --- a/app/vendor/symfony/translation/Command/XliffLintCommand.php +++ b/app/vendor/symfony/translation/Command/XliffLintCommand.php @@ -39,22 +39,24 @@ class XliffLintCommand extends Command private bool $displayCorrectFiles; private ?\Closure $directoryIteratorProvider; private ?\Closure $isReadableProvider; - private bool $requireStrictFileNames; - public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null, bool $requireStrictFileNames = true) - { + public function __construct( + ?string $name = null, + ?callable $directoryIteratorProvider = null, + ?callable $isReadableProvider = null, + private bool $requireStrictFileNames = true, + ) { parent::__construct($name); $this->directoryIteratorProvider = null === $directoryIteratorProvider ? null : $directoryIteratorProvider(...); $this->isReadableProvider = null === $isReadableProvider ? null : $isReadableProvider(...); - $this->requireStrictFileNames = $requireStrictFileNames; } protected function configure(): void { $this ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions()))) + ->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions()))) ->setHelp(<<%command.name% command lints an XLIFF file and outputs to STDOUT the first encountered syntax error. @@ -70,6 +72,9 @@ protected function configure(): void Or of a whole directory: php %command.full_name% dirname + +The --format option specifies the format of the command output: + php %command.full_name% dirname --format=json EOF @@ -95,7 +100,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $filesInfo = []; foreach ($filenames as $filename) { if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); + throw new RuntimeException(\sprintf('File or directory "%s" is not readable.', $filename)); } foreach ($this->getFiles($filename) as $file) { @@ -121,18 +126,18 @@ private function validate(string $content, ?string $file = null): array $document->loadXML($content); if (null !== $targetLanguage = $this->getTargetLanguageFromFile($document)) { - $normalizedLocalePattern = sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/')); + $normalizedLocalePattern = \sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/')); // strict file names require translation files to be named '____.locale.xlf' // otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed // also, the regexp matching must be case-insensitive, as defined for 'target-language' values // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language - $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern); + $expectedFilenamePattern = $this->requireStrictFileNames ? \sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : \sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern); if (0 === preg_match($expectedFilenamePattern, basename($file))) { $errors[] = [ 'line' => -1, 'column' => -1, - 'message' => sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage), + 'message' => \sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage), ]; } } @@ -157,7 +162,7 @@ private function display(SymfonyStyle $io, array $files): int 'txt' => $this->displayTxt($io, $files), 'json' => $this->displayJson($io, $files), 'github' => $this->displayTxt($io, $files, true), - default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))), + default => throw new InvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))), }; } @@ -169,25 +174,25 @@ private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGit foreach ($filesInfo as $info) { if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + $io->comment('OK'.($info['file'] ? \sprintf(' in %s', $info['file']) : '')); } elseif (!$info['valid']) { ++$erroredFiles; - $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + $io->text(' ERROR '.($info['file'] ? \sprintf(' in %s', $info['file']) : '')); $io->listing(array_map(function ($error) use ($info, $githubReporter) { // general document errors have a '-1' line number $line = -1 === $error['line'] ? null : $error['line']; $githubReporter?->error($error['message'], $info['file'], $line, null !== $line ? $error['column'] : null); - return null === $line ? $error['message'] : sprintf('Line %d, Column %d: %s', $line, $error['column'], $error['message']); + return null === $line ? $error['message'] : \sprintf('Line %d, Column %d: %s', $line, $error['column'], $error['message']); }, $info['messages'])); } } if (0 === $erroredFiles) { - $io->success(sprintf('All %d XLIFF files contain valid syntax.', $countFiles)); + $io->success(\sprintf('All %d XLIFF files contain valid syntax.', $countFiles)); } else { - $io->warning(sprintf('%d XLIFF files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles)); + $io->warning(\sprintf('%d XLIFF files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles)); } return min($erroredFiles, 1); @@ -275,6 +280,7 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti } } + /** @return string[] */ private function getAvailableFormatOptions(): array { return ['txt', 'json', 'github']; diff --git a/app/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/app/vendor/symfony/translation/DataCollector/TranslationDataCollector.php index d4f49cc66..e6bd619db 100644 --- a/app/vendor/symfony/translation/DataCollector/TranslationDataCollector.php +++ b/app/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -25,11 +25,9 @@ */ class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface { - private DataCollectorTranslator $translator; - - public function __construct(DataCollectorTranslator $translator) - { - $this->translator = $translator; + public function __construct( + private DataCollectorTranslator $translator, + ) { } public function lateCollect(): void diff --git a/app/vendor/symfony/translation/DataCollectorTranslator.php b/app/vendor/symfony/translation/DataCollectorTranslator.php index 1f52088b4..dcabedeb8 100644 --- a/app/vendor/symfony/translation/DataCollectorTranslator.php +++ b/app/vendor/symfony/translation/DataCollectorTranslator.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Translation; use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -27,19 +26,11 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter public const MESSAGE_MISSING = 1; public const MESSAGE_EQUALS_FALLBACK = 2; - private TranslatorInterface $translator; private array $messages = []; - /** - * @param TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator - */ - public function __construct(TranslatorInterface $translator) - { - if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator))); - } - - $this->translator = $translator; + public function __construct( + private TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator, + ) { } public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string @@ -73,7 +64,7 @@ public function getCatalogues(): array public function warmUp(string $cacheDir, ?string $buildDir = null): array { if ($this->translator instanceof WarmableInterface) { - return (array) $this->translator->warmUp($cacheDir, $buildDir); + return $this->translator->warmUp($cacheDir, $buildDir); } return []; diff --git a/app/vendor/symfony/translation/DependencyInjection/LoggingTranslatorPass.php b/app/vendor/symfony/translation/DependencyInjection/LoggingTranslatorPass.php index c21552f97..fba86981c 100644 --- a/app/vendor/symfony/translation/DependencyInjection/LoggingTranslatorPass.php +++ b/app/vendor/symfony/translation/DependencyInjection/LoggingTranslatorPass.php @@ -37,7 +37,7 @@ public function process(ContainerBuilder $container): void $class = $container->getParameterBag()->resolveValue($definition->getClass()); if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias)); + throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias)); } if (!$r->isSubclassOf(TranslatorInterface::class) || !$r->isSubclassOf(TranslatorBagInterface::class)) { diff --git a/app/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/app/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php index 28873d009..864a12105 100644 --- a/app/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php +++ b/app/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php @@ -31,7 +31,7 @@ public function process(ContainerBuilder $container): void foreach ($container->findTaggedServiceIds('translation.extractor', true) as $id => $attributes) { if (!isset($attributes[0]['alias'])) { - throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); + throw new RuntimeException(\sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); } $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]); diff --git a/app/vendor/symfony/translation/Dumper/FileDumper.php b/app/vendor/symfony/translation/Dumper/FileDumper.php index 3846e7380..2e1880f72 100644 --- a/app/vendor/symfony/translation/Dumper/FileDumper.php +++ b/app/vendor/symfony/translation/Dumper/FileDumper.php @@ -50,7 +50,7 @@ public function dump(MessageCatalogue $messages, array $options = []): void if (!file_exists($fullpath)) { $directory = \dirname($fullpath); if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { - throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory)); + throw new RuntimeException(\sprintf('Unable to create directory "%s".', $directory)); } } diff --git a/app/vendor/symfony/translation/Dumper/MoFileDumper.php b/app/vendor/symfony/translation/Dumper/MoFileDumper.php index 9ded5f4ef..a7b4b338c 100644 --- a/app/vendor/symfony/translation/Dumper/MoFileDumper.php +++ b/app/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -54,14 +54,11 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); } - $output = implode('', array_map($this->writeLong(...), $header)) + return implode('', array_map($this->writeLong(...), $header)) .$sourceOffsets .$targetOffsets .$sources - .$targets - ; - - return $output; + .$targets; } protected function getExtension(): string diff --git a/app/vendor/symfony/translation/Dumper/PoFileDumper.php b/app/vendor/symfony/translation/Dumper/PoFileDumper.php index a2d0deb78..8f55b8ab7 100644 --- a/app/vendor/symfony/translation/Dumper/PoFileDumper.php +++ b/app/vendor/symfony/translation/Dumper/PoFileDumper.php @@ -51,14 +51,14 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra $sourceRules = $this->getStandardRules($source); $targetRules = $this->getStandardRules($target); if (2 == \count($sourceRules) && [] !== $targetRules) { - $output .= sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0])); - $output .= sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1])); + $output .= \sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0])); + $output .= \sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1])); foreach ($targetRules as $i => $targetRule) { - $output .= sprintf('msgstr[%d] "%s"'."\n", $i, $this->escape($targetRule)); + $output .= \sprintf('msgstr[%d] "%s"'."\n", $i, $this->escape($targetRule)); } } else { - $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); - $output .= sprintf('msgstr "%s"'."\n", $this->escape($target)); + $output .= \sprintf('msgid "%s"'."\n", $this->escape($source)); + $output .= \sprintf('msgstr "%s"'."\n", $this->escape($target)); } } @@ -100,9 +100,9 @@ private function getStandardRules(string $id): array if (preg_match($intervalRegexp, $part)) { // Explicit rule is not a standard rule. return []; - } else { - $standardRules[] = $part; - } + } + + $standardRules[] = $part; } return $standardRules; @@ -123,7 +123,7 @@ private function formatComments(string|array $comments, string $prefix = ''): ?s $output = null; foreach ((array) $comments as $comment) { - $output .= sprintf('#%s %s'."\n", $prefix, $comment); + $output .= \sprintf('#%s %s'."\n", $prefix, $comment); } return $output; diff --git a/app/vendor/symfony/translation/Dumper/XliffFileDumper.php b/app/vendor/symfony/translation/Dumper/XliffFileDumper.php index 66698c5ca..b41394c19 100644 --- a/app/vendor/symfony/translation/Dumper/XliffFileDumper.php +++ b/app/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -46,7 +46,7 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return $this->dumpXliff2($defaultLocale, $messages, $domain); } - throw new InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); + throw new InvalidArgumentException(\sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); } protected function getExtension(): string @@ -193,6 +193,12 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ? $segment = $translation->appendChild($dom->createElement('segment')); + if ($this->hasMetadataArrayInfo('segment-attributes', $metadata)) { + foreach ($metadata['segment-attributes'] as $name => $value) { + $segment->setAttribute($name, $value); + } + } + $s = $segment->appendChild($dom->createElement('source')); $s->appendChild($dom->createTextNode($source)); diff --git a/app/vendor/symfony/translation/Dumper/YamlFileDumper.php b/app/vendor/symfony/translation/Dumper/YamlFileDumper.php index d2670331e..a30eaa319 100644 --- a/app/vendor/symfony/translation/Dumper/YamlFileDumper.php +++ b/app/vendor/symfony/translation/Dumper/YamlFileDumper.php @@ -23,11 +23,9 @@ */ class YamlFileDumper extends FileDumper { - private string $extension; - - public function __construct(string $extension = 'yml') - { - $this->extension = $extension; + public function __construct( + private string $extension = 'yml', + ) { } public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string diff --git a/app/vendor/symfony/translation/Exception/IncompleteDsnException.php b/app/vendor/symfony/translation/Exception/IncompleteDsnException.php index b304bde01..6c9247f89 100644 --- a/app/vendor/symfony/translation/Exception/IncompleteDsnException.php +++ b/app/vendor/symfony/translation/Exception/IncompleteDsnException.php @@ -16,7 +16,7 @@ class IncompleteDsnException extends InvalidArgumentException public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null) { if ($dsn) { - $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message; + $message = \sprintf('Invalid "%s" provider DSN: ', $dsn).$message; } parent::__construct($message, 0, $previous); diff --git a/app/vendor/symfony/translation/Exception/MissingRequiredOptionException.php b/app/vendor/symfony/translation/Exception/MissingRequiredOptionException.php index 46152e254..8cef03a81 100644 --- a/app/vendor/symfony/translation/Exception/MissingRequiredOptionException.php +++ b/app/vendor/symfony/translation/Exception/MissingRequiredOptionException.php @@ -18,7 +18,7 @@ class MissingRequiredOptionException extends IncompleteDsnException { public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null) { - $message = sprintf('The option "%s" is required but missing.', $option); + $message = \sprintf('The option "%s" is required but missing.', $option); parent::__construct($message, $dsn, $previous); } diff --git a/app/vendor/symfony/translation/Exception/ProviderException.php b/app/vendor/symfony/translation/Exception/ProviderException.php index f2981f58b..70e93fc1b 100644 --- a/app/vendor/symfony/translation/Exception/ProviderException.php +++ b/app/vendor/symfony/translation/Exception/ProviderException.php @@ -18,12 +18,14 @@ */ class ProviderException extends RuntimeException implements ProviderExceptionInterface { - private ResponseInterface $response; private string $debug; - public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null) - { - $this->response = $response; + public function __construct( + string $message, + private ResponseInterface $response, + int $code = 0, + ?\Exception $previous = null, + ) { $this->debug = $response->getInfo('debug') ?? ''; parent::__construct($message, $code, $previous); diff --git a/app/vendor/symfony/translation/Exception/UnsupportedSchemeException.php b/app/vendor/symfony/translation/Exception/UnsupportedSchemeException.php index 8d3295184..ca18444e4 100644 --- a/app/vendor/symfony/translation/Exception/UnsupportedSchemeException.php +++ b/app/vendor/symfony/translation/Exception/UnsupportedSchemeException.php @@ -43,14 +43,14 @@ public function __construct(Dsn $dsn, ?string $name = null, array $supported = [ } $package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null; if ($package && !class_exists($package['class'])) { - parent::__construct(sprintf('Unable to synchronize translations via "%s" as the provider is not installed. Try running "composer require %s".', $provider, $package['package'])); + parent::__construct(\sprintf('Unable to synchronize translations via "%s" as the provider is not installed. Try running "composer require %s".', $provider, $package['package'])); return; } - $message = sprintf('The "%s" scheme is not supported', $dsn->getScheme()); + $message = \sprintf('The "%s" scheme is not supported', $dsn->getScheme()); if ($name && $supported) { - $message .= sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported)); + $message .= \sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported)); } parent::__construct($message.'.'); diff --git a/app/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/app/vendor/symfony/translation/Extractor/AbstractFileExtractor.php index a6198feb0..da4a929f0 100644 --- a/app/vendor/symfony/translation/Extractor/AbstractFileExtractor.php +++ b/app/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -49,7 +49,7 @@ private function toSplFileInfo(string $file): \SplFileInfo protected function isFile(string $file): bool { if (!is_file($file)) { - throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); + throw new InvalidArgumentException(\sprintf('The "%s" file does not exist.', $file)); } return true; diff --git a/app/vendor/symfony/translation/Extractor/PhpAstExtractor.php b/app/vendor/symfony/translation/Extractor/PhpAstExtractor.php index 06fc77de3..a5375f480 100644 --- a/app/vendor/symfony/translation/Extractor/PhpAstExtractor.php +++ b/app/vendor/symfony/translation/Extractor/PhpAstExtractor.php @@ -36,7 +36,7 @@ public function __construct( private string $prefix = '', ) { if (!class_exists(ParserFactory::class)) { - throw new \LogicException(sprintf('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser".', static::class)); + throw new \LogicException(\sprintf('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser".', static::class)); } $this->parser = (new ParserFactory())->createForHostVersion(); @@ -77,7 +77,7 @@ protected function canBeExtracted(string $file): bool protected function extractFromDirectory(array|string $resource): iterable|Finder { if (!class_exists(Finder::class)) { - throw new \LogicException(sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class)); + throw new \LogicException(\sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class)); } return (new Finder())->files()->name('*.php')->in($resource); diff --git a/app/vendor/symfony/translation/Formatter/IntlFormatter.php b/app/vendor/symfony/translation/Formatter/IntlFormatter.php index e62de253f..87cb00733 100644 --- a/app/vendor/symfony/translation/Formatter/IntlFormatter.php +++ b/app/vendor/symfony/translation/Formatter/IntlFormatter.php @@ -37,7 +37,7 @@ public function formatIntl(string $message, string $locale, array $parameters = try { $this->cache[$locale][$message] = $formatter = new \MessageFormatter($locale, $message); } catch (\IntlException $e) { - throw new InvalidArgumentException(sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e); + throw new InvalidArgumentException(\sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e); } } @@ -49,7 +49,7 @@ public function formatIntl(string $message, string $locale, array $parameters = } if (false === $message = $formatter->format($parameters)) { - throw new InvalidArgumentException(sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage()); + throw new InvalidArgumentException(\sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage()); } return $message; diff --git a/app/vendor/symfony/translation/Loader/CsvFileLoader.php b/app/vendor/symfony/translation/Loader/CsvFileLoader.php index 1cc17f6b3..9b610f656 100644 --- a/app/vendor/symfony/translation/Loader/CsvFileLoader.php +++ b/app/vendor/symfony/translation/Loader/CsvFileLoader.php @@ -22,6 +22,9 @@ class CsvFileLoader extends FileLoader { private string $delimiter = ';'; private string $enclosure = '"'; + /** + * @deprecated since Symfony 7.2, to be removed in 8.0 + */ private string $escape = ''; protected function loadResource(string $resource): array @@ -31,7 +34,7 @@ protected function loadResource(string $resource): array try { $file = new \SplFileObject($resource, 'rb'); } catch (\RuntimeException $e) { - throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e); + throw new NotFoundResourceException(\sprintf('Error opening file "%s".', $resource), 0, $e); } $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY); @@ -57,6 +60,10 @@ public function setCsvControl(string $delimiter = ';', string $enclosure = '"', { $this->delimiter = $delimiter; $this->enclosure = $enclosure; + if ('' !== $escape) { + trigger_deprecation('symfony/translation', '7.2', 'The "escape" parameter of the "%s" method is deprecated. It will be removed in 8.0.', __METHOD__); + } + $this->escape = $escape; } } diff --git a/app/vendor/symfony/translation/Loader/FileLoader.php b/app/vendor/symfony/translation/Loader/FileLoader.php index 877c3bbc7..94f6e2022 100644 --- a/app/vendor/symfony/translation/Loader/FileLoader.php +++ b/app/vendor/symfony/translation/Loader/FileLoader.php @@ -24,11 +24,11 @@ abstract class FileLoader extends ArrayLoader public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource)); } if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource)); } $messages = $this->loadResource($resource); @@ -38,7 +38,7 @@ public function load(mixed $resource, string $locale, string $domain = 'messages // not an array if (!\is_array($messages)) { - throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('Unable to load file "%s".', $resource)); } $catalogue = parent::load($messages, $locale, $domain); diff --git a/app/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/app/vendor/symfony/translation/Loader/IcuDatFileLoader.php index 76e4e7f02..1af864303 100644 --- a/app/vendor/symfony/translation/Loader/IcuDatFileLoader.php +++ b/app/vendor/symfony/translation/Loader/IcuDatFileLoader.php @@ -26,11 +26,11 @@ class IcuDatFileLoader extends IcuResFileLoader public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource.'.dat')) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource)); } if (!file_exists($resource.'.dat')) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource)); } try { @@ -40,7 +40,7 @@ public function load(mixed $resource, string $locale, string $domain = 'messages } if (!$rb) { - throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource)); + throw new InvalidResourceException(\sprintf('Cannot load resource "%s".', $resource)); } elseif (intl_is_failure($rb->getErrorCode())) { throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); } diff --git a/app/vendor/symfony/translation/Loader/IcuResFileLoader.php b/app/vendor/symfony/translation/Loader/IcuResFileLoader.php index 949dd9792..8ada43dca 100644 --- a/app/vendor/symfony/translation/Loader/IcuResFileLoader.php +++ b/app/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -26,11 +26,11 @@ class IcuResFileLoader implements LoaderInterface public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource)); } if (!is_dir($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource)); } try { @@ -40,7 +40,7 @@ public function load(mixed $resource, string $locale, string $domain = 'messages } if (!$rb) { - throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource)); + throw new InvalidResourceException(\sprintf('Cannot load resource "%s".', $resource)); } elseif (intl_is_failure($rb->getErrorCode())) { throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); } diff --git a/app/vendor/symfony/translation/Loader/QtFileLoader.php b/app/vendor/symfony/translation/Loader/QtFileLoader.php index ad1f9f90a..c9554bf55 100644 --- a/app/vendor/symfony/translation/Loader/QtFileLoader.php +++ b/app/vendor/symfony/translation/Loader/QtFileLoader.php @@ -32,17 +32,17 @@ public function load(mixed $resource, string $locale, string $domain = 'messages } if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource)); } if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource)); } try { $dom = XmlUtils::loadFile($resource); } catch (\InvalidArgumentException $e) { - throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); + throw new InvalidResourceException(\sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); } $internalErrors = libxml_use_internal_errors(true); diff --git a/app/vendor/symfony/translation/Loader/XliffFileLoader.php b/app/vendor/symfony/translation/Loader/XliffFileLoader.php index c3a276cfb..e76245dac 100644 --- a/app/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/app/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -36,15 +36,15 @@ public function load(mixed $resource, string $locale, string $domain = 'messages if (!$this->isXmlString($resource)) { if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource)); } if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource)); } if (!is_file($resource)) { - throw new InvalidResourceException(sprintf('This is neither a file nor an XLIFF string "%s".', $resource)); + throw new InvalidResourceException(\sprintf('This is neither a file nor an XLIFF string "%s".', $resource)); } } @@ -55,11 +55,11 @@ public function load(mixed $resource, string $locale, string $domain = 'messages $dom = XmlUtils::loadFile($resource); } } catch (\InvalidArgumentException|XmlParsingException|InvalidXmlException $e) { - throw new InvalidResourceException(sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e); + throw new InvalidResourceException(\sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e); } if ($errors = XliffUtils::validateSchema($dom)) { - throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors)); + throw new InvalidResourceException(\sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors)); } $catalogue = new MessageCatalogue($locale); @@ -172,6 +172,13 @@ private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, s $catalogue->set((string) $source, $target, $domain); $metadata = []; + if ($segment->attributes()) { + $metadata['segment-attributes'] = []; + foreach ($segment->attributes() as $key => $value) { + $metadata['segment-attributes'][$key] = (string) $value; + } + } + if (isset($segment->target) && $segment->target->attributes()) { $metadata['target-attributes'] = []; foreach ($segment->target->attributes() as $key => $value) { diff --git a/app/vendor/symfony/translation/Loader/YamlFileLoader.php b/app/vendor/symfony/translation/Loader/YamlFileLoader.php index 3a155c69e..39d5a0e99 100644 --- a/app/vendor/symfony/translation/Loader/YamlFileLoader.php +++ b/app/vendor/symfony/translation/Loader/YamlFileLoader.php @@ -39,11 +39,11 @@ protected function loadResource(string $resource): array try { $messages = $this->yamlParser->parseFile($resource, Yaml::PARSE_CONSTANT); } catch (ParseException $e) { - throw new InvalidResourceException(sprintf('The file "%s" does not contain valid YAML: ', $resource).$e->getMessage(), 0, $e); + throw new InvalidResourceException(\sprintf('The file "%s" does not contain valid YAML: ', $resource).$e->getMessage(), 0, $e); } if (null !== $messages && !\is_array($messages)) { - throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + throw new InvalidResourceException(\sprintf('Unable to load file "%s".', $resource)); } return $messages ?: []; diff --git a/app/vendor/symfony/translation/LoggingTranslator.php b/app/vendor/symfony/translation/LoggingTranslator.php index 8c9b26463..84020d8a0 100644 --- a/app/vendor/symfony/translation/LoggingTranslator.php +++ b/app/vendor/symfony/translation/LoggingTranslator.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Translation; use Psr\Log\LoggerInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -21,20 +20,10 @@ */ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface { - private TranslatorInterface $translator; - private LoggerInterface $logger; - - /** - * @param TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator The translator must implement TranslatorBagInterface - */ - public function __construct(TranslatorInterface $translator, LoggerInterface $logger) - { - if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator))); - } - - $this->translator = $translator; - $this->logger = $logger; + public function __construct( + private TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator, + private LoggerInterface $logger, + ) { } public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string @@ -53,7 +42,7 @@ public function setLocale(string $locale): void return; } - $this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale)); + $this->logger->debug(\sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale)); } public function getLocale(): string diff --git a/app/vendor/symfony/translation/MessageCatalogue.php b/app/vendor/symfony/translation/MessageCatalogue.php index f0cc6b321..2d229f2dd 100644 --- a/app/vendor/symfony/translation/MessageCatalogue.php +++ b/app/vendor/symfony/translation/MessageCatalogue.php @@ -19,21 +19,19 @@ */ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface, CatalogueMetadataAwareInterface { - private array $messages = []; private array $metadata = []; private array $catalogueMetadata = []; private array $resources = []; - private string $locale; private ?MessageCatalogueInterface $fallbackCatalogue = null; private ?self $parent = null; /** * @param array $messages An array of messages classified by domain */ - public function __construct(string $locale, array $messages = []) - { - $this->locale = $locale; - $this->messages = $messages; + public function __construct( + private string $locale, + private array $messages = [], + ) { } public function getLocale(): string @@ -143,7 +141,7 @@ public function add(array $messages, string $domain = 'messages'): void public function addCatalogue(MessageCatalogueInterface $catalogue): void { if ($catalogue->getLocale() !== $this->locale) { - throw new LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s".', $catalogue->getLocale(), $this->locale)); + throw new LogicException(\sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s".', $catalogue->getLocale(), $this->locale)); } foreach ($catalogue->all() as $domain => $messages) { @@ -175,14 +173,14 @@ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue): void $c = $catalogue; while ($c = $c->getFallbackCatalogue()) { if ($c->getLocale() === $this->getLocale()) { - throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + throw new LogicException(\sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); } } $c = $this; do { if ($c->getLocale() === $catalogue->getLocale()) { - throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + throw new LogicException(\sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); } foreach ($catalogue->getResources() as $resource) { diff --git a/app/vendor/symfony/translation/Provider/FilteringProvider.php b/app/vendor/symfony/translation/Provider/FilteringProvider.php index d4465b9fd..cc11dc3d1 100644 --- a/app/vendor/symfony/translation/Provider/FilteringProvider.php +++ b/app/vendor/symfony/translation/Provider/FilteringProvider.php @@ -21,15 +21,11 @@ */ class FilteringProvider implements ProviderInterface { - private ProviderInterface $provider; - private array $locales; - private array $domains; - - public function __construct(ProviderInterface $provider, array $locales, array $domains = []) - { - $this->provider = $provider; - $this->locales = $locales; - $this->domains = $domains; + public function __construct( + private ProviderInterface $provider, + private array $locales, + private array $domains = [], + ) { } public function __toString(): string diff --git a/app/vendor/symfony/translation/Provider/TranslationProviderCollection.php b/app/vendor/symfony/translation/Provider/TranslationProviderCollection.php index b917415ba..878998fec 100644 --- a/app/vendor/symfony/translation/Provider/TranslationProviderCollection.php +++ b/app/vendor/symfony/translation/Provider/TranslationProviderCollection.php @@ -44,7 +44,7 @@ public function has(string $name): bool public function get(string $name): ProviderInterface { if (!$this->has($name)) { - throw new InvalidArgumentException(sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this)); + throw new InvalidArgumentException(\sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this)); } return $this->providers[$name]; diff --git a/app/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php b/app/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php index 6300c8750..2c8c55159 100644 --- a/app/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php +++ b/app/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php @@ -18,16 +18,13 @@ */ class TranslationProviderCollectionFactory { - private iterable $factories; - private array $enabledLocales; - /** * @param iterable $factories */ - public function __construct(iterable $factories, array $enabledLocales) - { - $this->factories = $factories; - $this->enabledLocales = $enabledLocales; + public function __construct( + private iterable $factories, + private array $enabledLocales, + ) { } public function fromConfig(array $config): TranslationProviderCollection diff --git a/app/vendor/symfony/translation/PseudoLocalizationTranslator.php b/app/vendor/symfony/translation/PseudoLocalizationTranslator.php index f26909f5e..5d56d2cc1 100644 --- a/app/vendor/symfony/translation/PseudoLocalizationTranslator.php +++ b/app/vendor/symfony/translation/PseudoLocalizationTranslator.php @@ -20,7 +20,6 @@ final class PseudoLocalizationTranslator implements TranslatorInterface { private const EXPANSION_CHARACTER = '~'; - private TranslatorInterface $translator; private bool $accents; private float $expansionFactor; private bool $brackets; @@ -64,8 +63,10 @@ final class PseudoLocalizationTranslator implements TranslatorInterface * description: the list of HTML attributes whose values can be altered - it is only useful when the "parse_html" option is set to true * example: if ["title"], and with the "accents" option set to true, "Profile" => "Þŕöƒîļé" - if "title" was not in the "localizable_html_attributes" list, the title attribute data would be left unchanged. */ - public function __construct(TranslatorInterface $translator, array $options = []) - { + public function __construct( + private TranslatorInterface $translator, + array $options = [], + ) { $this->translator = $translator; $this->accents = $options['accents'] ?? true; diff --git a/app/vendor/symfony/translation/Test/AbstractProviderFactoryTestCase.php b/app/vendor/symfony/translation/Test/AbstractProviderFactoryTestCase.php new file mode 100644 index 000000000..75e7dd2d3 --- /dev/null +++ b/app/vendor/symfony/translation/Test/AbstractProviderFactoryTestCase.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Test; + +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Exception\UnsupportedSchemeException; +use Symfony\Component\Translation\Provider\Dsn; +use Symfony\Component\Translation\Provider\ProviderFactoryInterface; + +abstract class AbstractProviderFactoryTestCase extends TestCase +{ + abstract public function createFactory(): ProviderFactoryInterface; + + /** + * @return iterable + */ + abstract public static function supportsProvider(): iterable; + + /** + * @return iterable + */ + abstract public static function createProvider(): iterable; + + /** + * @return iterable + */ + abstract public static function unsupportedSchemeProvider(): iterable; + + /** + * @dataProvider supportsProvider + */ + #[DataProvider('supportsProvider')] + public function testSupports(bool $expected, string $dsn) + { + $factory = $this->createFactory(); + + $this->assertSame($expected, $factory->supports(new Dsn($dsn))); + } + + /** + * @dataProvider createProvider + */ + #[DataProvider('createProvider')] + public function testCreate(string $expected, string $dsn) + { + $factory = $this->createFactory(); + $provider = $factory->create(new Dsn($dsn)); + + $this->assertSame($expected, (string) $provider); + } + + /** + * @dataProvider unsupportedSchemeProvider + */ + #[DataProvider('unsupportedSchemeProvider')] + public function testUnsupportedSchemeException(string $dsn, ?string $message = null) + { + $factory = $this->createFactory(); + + $dsn = new Dsn($dsn); + + $this->expectException(UnsupportedSchemeException::class); + if (null !== $message) { + $this->expectExceptionMessage($message); + } + + $factory->create($dsn); + } +} diff --git a/app/vendor/symfony/translation/Test/IncompleteDsnTestTrait.php b/app/vendor/symfony/translation/Test/IncompleteDsnTestTrait.php new file mode 100644 index 000000000..892f6bf72 --- /dev/null +++ b/app/vendor/symfony/translation/Test/IncompleteDsnTestTrait.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Test; + +use PHPUnit\Framework\Attributes\DataProvider; +use Symfony\Component\Translation\Exception\IncompleteDsnException; +use Symfony\Component\Translation\Provider\Dsn; + +trait IncompleteDsnTestTrait +{ + /** + * @return iterable + */ + abstract public static function incompleteDsnProvider(): iterable; + + /** + * @dataProvider incompleteDsnProvider + */ + #[DataProvider('incompleteDsnProvider')] + public function testIncompleteDsnException(string $dsn, ?string $message = null) + { + $factory = $this->createFactory(); + + $dsn = new Dsn($dsn); + + $this->expectException(IncompleteDsnException::class); + if (null !== $message) { + $this->expectExceptionMessage($message); + } + + $factory->create($dsn); + } +} diff --git a/app/vendor/symfony/translation/Test/ProviderFactoryTestCase.php b/app/vendor/symfony/translation/Test/ProviderFactoryTestCase.php index 95ffcb1e5..e82f32907 100644 --- a/app/vendor/symfony/translation/Test/ProviderFactoryTestCase.php +++ b/app/vendor/symfony/translation/Test/ProviderFactoryTestCase.php @@ -12,15 +12,10 @@ namespace Symfony\Component\Translation\Test; use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\Translation\Dumper\XliffFileDumper; -use Symfony\Component\Translation\Exception\IncompleteDsnException; -use Symfony\Component\Translation\Exception\UnsupportedSchemeException; use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\Provider\Dsn; -use Symfony\Component\Translation\Provider\ProviderFactoryInterface; use Symfony\Component\Translation\TranslatorBagInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; @@ -28,9 +23,13 @@ * A test case to ease testing a translation provider factory. * * @author Mathieu Santostefano + * + * @deprecated since Symfony 7.2, use AbstractProviderFactoryTestCase instead */ -abstract class ProviderFactoryTestCase extends TestCase +abstract class ProviderFactoryTestCase extends AbstractProviderFactoryTestCase { + use IncompleteDsnTestTrait; + protected HttpClientInterface $client; protected LoggerInterface|MockObject $logger; protected string $defaultLocale; @@ -38,20 +37,8 @@ abstract class ProviderFactoryTestCase extends TestCase protected XliffFileDumper|MockObject $xliffFileDumper; protected TranslatorBagInterface|MockObject $translatorBag; - abstract public function createFactory(): ProviderFactoryInterface; - - /** - * @return iterable - */ - abstract public static function supportsProvider(): iterable; - /** - * @return iterable - */ - abstract public static function createProvider(): iterable; - - /** - * @return iterable + * @return iterable */ public static function unsupportedSchemeProvider(): iterable { @@ -59,68 +46,13 @@ public static function unsupportedSchemeProvider(): iterable } /** - * @return iterable + * @return iterable */ public static function incompleteDsnProvider(): iterable { return []; } - /** - * @dataProvider supportsProvider - */ - public function testSupports(bool $expected, string $dsn) - { - $factory = $this->createFactory(); - - $this->assertSame($expected, $factory->supports(new Dsn($dsn))); - } - - /** - * @dataProvider createProvider - */ - public function testCreate(string $expected, string $dsn) - { - $factory = $this->createFactory(); - $provider = $factory->create(new Dsn($dsn)); - - $this->assertSame($expected, (string) $provider); - } - - /** - * @dataProvider unsupportedSchemeProvider - */ - public function testUnsupportedSchemeException(string $dsn, ?string $message = null) - { - $factory = $this->createFactory(); - - $dsn = new Dsn($dsn); - - $this->expectException(UnsupportedSchemeException::class); - if (null !== $message) { - $this->expectExceptionMessage($message); - } - - $factory->create($dsn); - } - - /** - * @dataProvider incompleteDsnProvider - */ - public function testIncompleteDsnException(string $dsn, ?string $message = null) - { - $factory = $this->createFactory(); - - $dsn = new Dsn($dsn); - - $this->expectException(IncompleteDsnException::class); - if (null !== $message) { - $this->expectExceptionMessage($message); - } - - $factory->create($dsn); - } - protected function getClient(): HttpClientInterface { return $this->client ??= new MockHttpClient(); diff --git a/app/vendor/symfony/translation/Test/ProviderTestCase.php b/app/vendor/symfony/translation/Test/ProviderTestCase.php index a8fa0b8bb..7907986cb 100644 --- a/app/vendor/symfony/translation/Test/ProviderTestCase.php +++ b/app/vendor/symfony/translation/Test/ProviderTestCase.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Translation\Test; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; @@ -45,6 +46,7 @@ abstract public static function toStringProvider(): iterable; /** * @dataProvider toStringProvider */ + #[DataProvider('toStringProvider')] public function testToString(ProviderInterface $provider, string $expected) { $this->assertSame($expected, (string) $provider); diff --git a/app/vendor/symfony/translation/TranslatableMessage.php b/app/vendor/symfony/translation/TranslatableMessage.php index c591e68c2..74b77f685 100644 --- a/app/vendor/symfony/translation/TranslatableMessage.php +++ b/app/vendor/symfony/translation/TranslatableMessage.php @@ -19,15 +19,11 @@ */ class TranslatableMessage implements TranslatableInterface { - private string $message; - private array $parameters; - private ?string $domain; - - public function __construct(string $message, array $parameters = [], ?string $domain = null) - { - $this->message = $message; - $this->parameters = $parameters; - $this->domain = $domain; + public function __construct( + private string $message, + private array $parameters = [], + private ?string $domain = null, + ) { } public function __toString(): string diff --git a/app/vendor/symfony/translation/Translator.php b/app/vendor/symfony/translation/Translator.php index 7dad47513..7c0a458e8 100644 --- a/app/vendor/symfony/translation/Translator.php +++ b/app/vendor/symfony/translation/Translator.php @@ -54,12 +54,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA private MessageFormatterInterface $formatter; - private ?string $cacheDir; - - private bool $debug; - - private array $cacheVary; - private ?ConfigCacheFactoryInterface $configCacheFactory; private array $parentLocales; @@ -69,14 +63,16 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA /** * @throws InvalidArgumentException If a locale contains invalid characters */ - public function __construct(string $locale, ?MessageFormatterInterface $formatter = null, ?string $cacheDir = null, bool $debug = false, array $cacheVary = []) - { + public function __construct( + string $locale, + ?MessageFormatterInterface $formatter = null, + private ?string $cacheDir = null, + private bool $debug = false, + private array $cacheVary = [], + ) { $this->setLocale($locale); $this->formatter = $formatter ??= new MessageFormatter(); - $this->cacheDir = $cacheDir; - $this->debug = $debug; - $this->cacheVary = $cacheVary; $this->hasIntlFormatter = $formatter instanceof IntlFormatterInterface; } @@ -272,7 +268,7 @@ private function dumpCatalogue(string $locale, ConfigCacheInterface $cache): voi $this->initializeCatalogue($locale); $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); - $content = sprintf(<<addFallbackCatalogue($catalogue%s); @@ -338,10 +334,10 @@ protected function doLoadCatalogue(string $locale): void foreach ($this->resources[$locale] as $resource) { if (!isset($this->loaders[$resource[0]])) { if (\is_string($resource[1])) { - throw new RuntimeException(sprintf('No loader is registered for the "%s" format when loading the "%s" resource.', $resource[0], $resource[1])); + throw new RuntimeException(\sprintf('No loader is registered for the "%s" format when loading the "%s" resource.', $resource[0], $resource[1])); } - throw new RuntimeException(sprintf('No loader is registered for the "%s" format.', $resource[0])); + throw new RuntimeException(\sprintf('No loader is registered for the "%s" format.', $resource[0])); } $this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2])); } @@ -415,7 +411,7 @@ protected function computeFallbackLocales(string $locale): array protected function assertValidLocale(string $locale): void { if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { - throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); + throw new InvalidArgumentException(\sprintf('Invalid "%s" locale.', $locale)); } } diff --git a/app/vendor/symfony/translation/Util/XliffUtils.php b/app/vendor/symfony/translation/Util/XliffUtils.php index 335c34beb..e76e12284 100644 --- a/app/vendor/symfony/translation/Util/XliffUtils.php +++ b/app/vendor/symfony/translation/Util/XliffUtils.php @@ -41,7 +41,7 @@ public static function getVersionNumber(\DOMDocument $dom): string $namespace = $xliff->attributes->getNamedItem('xmlns'); if ($namespace) { if (0 !== substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34)) { - throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s".', $namespace)); + throw new InvalidArgumentException(\sprintf('Not a valid XLIFF namespace "%s".', $namespace)); } return substr($namespace, 34); @@ -113,7 +113,7 @@ public static function getErrorsAsString(array $xmlErrors): string $errorsAsString = ''; foreach ($xmlErrors as $error) { - $errorsAsString .= sprintf("[%s %s] %s (in %s - line %d, column %d)\n", + $errorsAsString .= \sprintf("[%s %s] %s (in %s - line %d, column %d)\n", \LIBXML_ERR_WARNING === $error['level'] ? 'WARNING' : 'ERROR', $error['code'], $error['message'], @@ -135,7 +135,7 @@ private static function getSchema(string $xliffVersion): string $schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-2.0.xsd'); $xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd'; } else { - throw new InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); + throw new InvalidArgumentException(\sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); } return self::fixXmlLocation($schemaSource, $xmlUri); diff --git a/app/vendor/symfony/translation/Writer/TranslationWriter.php b/app/vendor/symfony/translation/Writer/TranslationWriter.php index 21604ef18..be3f6bf36 100644 --- a/app/vendor/symfony/translation/Writer/TranslationWriter.php +++ b/app/vendor/symfony/translation/Writer/TranslationWriter.php @@ -55,14 +55,14 @@ public function getFormats(): array public function write(MessageCatalogue $catalogue, string $format, array $options = []): void { if (!isset($this->dumpers[$format])) { - throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); + throw new InvalidArgumentException(\sprintf('There is no dumper associated with format "%s".', $format)); } // get the right dumper $dumper = $this->dumpers[$format]; if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) { - throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s".', $options['path'])); + throw new RuntimeException(\sprintf('Translation Writer was not able to create directory "%s".', $options['path'])); } // save diff --git a/app/vendor/symfony/translation/composer.json b/app/vendor/symfony/translation/composer.json index b793e4c98..1db162159 100644 --- a/app/vendor/symfony/translation/composer.json +++ b/app/vendor/symfony/translation/composer.json @@ -18,7 +18,8 @@ "require": { "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.5|^3.0" + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { "nikic/php-parser": "^4.18|^5.0", diff --git a/app/vendor/symfony/var-exporter/CHANGELOG.md b/app/vendor/symfony/var-exporter/CHANGELOG.md index fdca002cb..74333ea7b 100644 --- a/app/vendor/symfony/var-exporter/CHANGELOG.md +++ b/app/vendor/symfony/var-exporter/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +7.2 +--- + + * Allow reinitializing lazy objects with a new initializer + 6.4 --- diff --git a/app/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php b/app/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php index 379a76517..2acecc470 100644 --- a/app/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php +++ b/app/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php @@ -15,6 +15,6 @@ class ClassNotFoundException extends \Exception implements ExceptionInterface { public function __construct(string $class, ?\Throwable $previous = null) { - parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous); + parent::__construct(\sprintf('Class "%s" not found.', $class), 0, $previous); } } diff --git a/app/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/app/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php index b9ba225d8..bc2bcaa20 100644 --- a/app/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php +++ b/app/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php @@ -15,6 +15,6 @@ class NotInstantiableTypeException extends \Exception implements ExceptionInterf { public function __construct(string $type, ?\Throwable $previous = null) { - parent::__construct(sprintf('Type "%s" is not instantiable.', $type), 0, $previous); + parent::__construct(\sprintf('Type "%s" is not instantiable.', $type), 0, $previous); } } diff --git a/app/vendor/symfony/var-exporter/Internal/Exporter.php b/app/vendor/symfony/var-exporter/Internal/Exporter.php index 9f4f59387..6544ae244 100644 --- a/app/vendor/symfony/var-exporter/Internal/Exporter.php +++ b/app/vendor/symfony/var-exporter/Internal/Exporter.php @@ -79,7 +79,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount if ($reflector->hasMethod('__serialize')) { if (!$reflector->getMethod('__serialize')->isPublic()) { - throw new \Error(sprintf('Call to %s method "%s::__serialize()".', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); + throw new \Error(\sprintf('Call to %s method "%s::__serialize()".', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); } if (!\is_array($serializeProperties = $value->__serialize())) { @@ -170,7 +170,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount } if ($sleep) { foreach ($sleep as $n => $v) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), \E_USER_NOTICE); + trigger_error(\sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), \E_USER_NOTICE); } } if (method_exists($class, '__unserialize')) { @@ -223,10 +223,10 @@ public static function export($value, $indent = '') $subIndent = $indent.' '; if (\is_string($value)) { - $code = sprintf("'%s'", addcslashes($value, "'\\")); + $code = \sprintf("'%s'", addcslashes($value, "'\\")); $code = preg_replace_callback("/((?:[\\0\\r\\n]|\u{202A}|\u{202B}|\u{202D}|\u{202E}|\u{2066}|\u{2067}|\u{2068}|\u{202C}|\u{2069})++)(.)/", function ($m) use ($subIndent) { - $m[1] = sprintf('\'."%s".\'', str_replace( + $m[1] = \sprintf('\'."%s".\'', str_replace( ["\0", "\r", "\n", "\u{202A}", "\u{202B}", "\u{202D}", "\u{202E}", "\u{2066}", "\u{2067}", "\u{2068}", "\u{202C}", "\u{2069}", '\n\\'], ['\0', '\r', '\n', '\u{202A}', '\u{202B}', '\u{202D}', '\u{202E}', '\u{2066}', '\u{2067}', '\u{2068}', '\u{202C}', '\u{2069}', '\n"'."\n".$subIndent.'."\\'], $m[1] @@ -284,7 +284,7 @@ public static function export($value, $indent = '') return self::exportHydrator($value, $indent, $subIndent); } - throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', get_debug_type($value))); + throw new \UnexpectedValueException(\sprintf('Cannot export value of type "%s".', get_debug_type($value))); } private static function exportRegistry(Registry $value, string $indent, string $subIndent): string diff --git a/app/vendor/symfony/var-exporter/Internal/Hydrator.php b/app/vendor/symfony/var-exporter/Internal/Hydrator.php index 65fdcd1d5..40923634c 100644 --- a/app/vendor/symfony/var-exporter/Internal/Hydrator.php +++ b/app/vendor/symfony/var-exporter/Internal/Hydrator.php @@ -64,11 +64,11 @@ public static function getHydrator($class) return $baseHydrator; case 'ErrorException': - return $baseHydrator->bindTo(null, new class() extends \ErrorException { + return $baseHydrator->bindTo(null, new class extends \ErrorException { }); case 'TypeError': - return $baseHydrator->bindTo(null, new class() extends \Error { + return $baseHydrator->bindTo(null, new class extends \Error { }); case 'SplObjectStorage': @@ -166,11 +166,11 @@ public static function getSimpleHydrator($class) return $baseHydrator; case 'ErrorException': - return $baseHydrator->bindTo(new \stdClass(), new class() extends \ErrorException { + return $baseHydrator->bindTo(new \stdClass(), new class extends \ErrorException { }); case 'TypeError': - return $baseHydrator->bindTo(new \stdClass(), new class() extends \Error { + return $baseHydrator->bindTo(new \stdClass(), new class extends \Error { }); case 'SplObjectStorage': @@ -260,9 +260,9 @@ public static function getPropertyScopes($class): array continue; } $name = $property->name; + $readonlyScope = null; if (\ReflectionProperty::IS_PRIVATE & $flags) { - $readonlyScope = null; if ($flags & \ReflectionProperty::IS_READONLY) { $readonlyScope = $class; } @@ -270,7 +270,6 @@ public static function getPropertyScopes($class): array continue; } - $readonlyScope = null; if ($flags & \ReflectionProperty::IS_READONLY) { $readonlyScope = $property->class; } diff --git a/app/vendor/symfony/var-exporter/Internal/LazyObjectState.php b/app/vendor/symfony/var-exporter/Internal/LazyObjectState.php index 5fc398e05..30fbff180 100644 --- a/app/vendor/symfony/var-exporter/Internal/LazyObjectState.php +++ b/app/vendor/symfony/var-exporter/Internal/LazyObjectState.php @@ -38,8 +38,8 @@ class LazyObjectState * @param array $skippedProperties */ public function __construct( - public readonly \Closure $initializer, - public readonly array $skippedProperties = [], + public \Closure $initializer, + public array $skippedProperties = [], ) { } diff --git a/app/vendor/symfony/var-exporter/LazyGhostTrait.php b/app/vendor/symfony/var-exporter/LazyGhostTrait.php index fa82cedc4..72a96d424 100644 --- a/app/vendor/symfony/var-exporter/LazyGhostTrait.php +++ b/app/vendor/symfony/var-exporter/LazyGhostTrait.php @@ -27,7 +27,7 @@ trait LazyGhostTrait * Skipped properties should be indexed by their array-cast identifier, see * https://php.net/manual/language.types.array#language.types.array.casting * - * @param (\Closure(static):void $initializer The closure should initialize the object it receives as argument + * @param \Closure(static):void $initializer The closure should initialize the object it receives as argument * @param array|null $skippedProperties An array indexed by the properties to skip, a.k.a. the ones * that the initializer doesn't initialize, if any * @param static|null $instance @@ -51,6 +51,17 @@ public static function createLazyGhost(\Closure $initializer, ?array $skippedPro $instance ??= Registry::$classReflectors[$class]->newInstanceWithoutConstructor(); } + if (isset($instance->lazyObjectState)) { + $instance->lazyObjectState->initializer = $initializer; + $instance->lazyObjectState->skippedProperties = $skippedProperties ??= []; + + if (LazyObjectState::STATUS_UNINITIALIZED_FULL !== $instance->lazyObjectState->status) { + $instance->lazyObjectState->reset($instance); + } + + return $instance; + } + $instance->lazyObjectState = new LazyObjectState($initializer, $skippedProperties ??= []); foreach (Registry::$classResetters[$class] as $reset) { @@ -63,7 +74,7 @@ public static function createLazyGhost(\Closure $initializer, ?array $skippedPro /** * Returns whether the object is initialized. * - * @param $partial Whether partially initialized objects should be considered as initialized + * @param bool $partial Whether partially initialized objects should be considered as initialized */ #[Ignore] public function isLazyObjectInitialized(bool $partial = false): bool @@ -143,7 +154,7 @@ public function &__get($name): mixed if (null === $class) { $frame = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]; - trigger_error(sprintf('Undefined property: %s::$%s in %s on line %s', $this::class, $name, $frame['file'], $frame['line']), \E_USER_NOTICE); + trigger_error(\sprintf('Undefined property: %s::$%s in %s on line %s', $this::class, $name, $frame['file'], $frame['line']), \E_USER_NOTICE); } get_in_scope: @@ -320,7 +331,7 @@ public function __serialize(): array $value = $properties[$k = $name] ?? $properties[$k = "\0*\0$name"] ?? $properties[$k = "\0$class\0$name"] ?? $properties[$k = "\0$scope\0$name"] ?? $k = null; if (null === $k) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $name), \E_USER_NOTICE); + trigger_error(\sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $name), \E_USER_NOTICE); } else { $data[$k] = $value; } diff --git a/app/vendor/symfony/var-exporter/LazyObjectInterface.php b/app/vendor/symfony/var-exporter/LazyObjectInterface.php index 367088459..3422dc6ca 100644 --- a/app/vendor/symfony/var-exporter/LazyObjectInterface.php +++ b/app/vendor/symfony/var-exporter/LazyObjectInterface.php @@ -16,7 +16,7 @@ interface LazyObjectInterface /** * Returns whether the object is initialized. * - * @param $partial Whether partially initialized objects should be considered as initialized + * @param bool $partial Whether partially initialized objects should be considered as initialized */ public function isLazyObjectInitialized(bool $partial = false): bool; diff --git a/app/vendor/symfony/var-exporter/LazyProxyTrait.php b/app/vendor/symfony/var-exporter/LazyProxyTrait.php index 17ba1db98..795e4d77d 100644 --- a/app/vendor/symfony/var-exporter/LazyProxyTrait.php +++ b/app/vendor/symfony/var-exporter/LazyProxyTrait.php @@ -47,6 +47,13 @@ public static function createLazyProxy(\Closure $initializer, ?object $instance $instance ??= Registry::$classReflectors[$class]->newInstanceWithoutConstructor(); } + if (isset($instance->lazyObjectState)) { + $instance->lazyObjectState->initializer = $initializer; + unset($instance->lazyObjectState->realInstance); + + return $instance; + } + $instance->lazyObjectState = new LazyObjectState($initializer); foreach (Registry::$classResetters[$class] as $reset) { @@ -59,7 +66,7 @@ public static function createLazyProxy(\Closure $initializer, ?object $instance /** * Returns whether the object is initialized. * - * @param $partial Whether partially initialized objects should be considered as initialized + * @param bool $partial Whether partially initialized objects should be considered as initialized */ #[Ignore] public function isLazyObjectInitialized(bool $partial = false): bool @@ -125,7 +132,7 @@ public function &__get($name): mixed if (!$parent && null === $class && !\array_key_exists($name, (array) $instance)) { $frame = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]; - trigger_error(sprintf('Undefined property: %s::$%s in %s on line %s', $instance::class, $name, $frame['file'], $frame['line']), \E_USER_NOTICE); + trigger_error(\sprintf('Undefined property: %s::$%s in %s on line %s', $instance::class, $name, $frame['file'], $frame['line']), \E_USER_NOTICE); } get_in_scope: @@ -310,7 +317,7 @@ public function __serialize(): array $value = $properties[$k = $name] ?? $properties[$k = "\0*\0$name"] ?? $properties[$k = "\0$class\0$name"] ?? $properties[$k = "\0$scope\0$name"] ?? $k = null; if (null === $k) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $name), \E_USER_NOTICE); + trigger_error(\sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $name), \E_USER_NOTICE); } else { $data[$k] = $value; } diff --git a/app/vendor/symfony/var-exporter/ProxyHelper.php b/app/vendor/symfony/var-exporter/ProxyHelper.php index 4cf0f65b4..e0cc84f7e 100644 --- a/app/vendor/symfony/var-exporter/ProxyHelper.php +++ b/app/vendor/symfony/var-exporter/ProxyHelper.php @@ -28,19 +28,19 @@ final class ProxyHelper public static function generateLazyGhost(\ReflectionClass $class): string { if (\PHP_VERSION_ID < 80300 && $class->isReadOnly()) { - throw new LogicException(sprintf('Cannot generate lazy ghost with PHP < 8.3: class "%s" is readonly.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost with PHP < 8.3: class "%s" is readonly.', $class->name)); } if ($class->isFinal()) { - throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is final.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: class "%s" is final.', $class->name)); } if ($class->isInterface() || $class->isAbstract()) { - throw new LogicException(sprintf('Cannot generate lazy ghost: "%s" is not a concrete class.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: "%s" is not a concrete class.', $class->name)); } if (\stdClass::class !== $class->name && $class->isInternal()) { - throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is internal.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: class "%s" is internal.', $class->name)); } if ($class->hasMethod('__get') && 'mixed' !== (self::exportType($class->getMethod('__get')) ?? 'mixed')) { - throw new LogicException(sprintf('Cannot generate lazy ghost: return type of method "%s::__get()" should be "mixed".', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: return type of method "%s::__get()" should be "mixed".', $class->name)); } static $traitMethods; @@ -48,14 +48,14 @@ public static function generateLazyGhost(\ReflectionClass $class): string foreach ($traitMethods as $method) { if ($class->hasMethod($method->name) && $class->getMethod($method->name)->isFinal()) { - throw new LogicException(sprintf('Cannot generate lazy ghost: method "%s::%s()" is final.', $class->name, $method->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: method "%s::%s()" is final.', $class->name, $method->name)); } } $parent = $class; while ($parent = $parent->getParentClass()) { if (\stdClass::class !== $parent->name && $parent->isInternal()) { - throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" extends "%s" which is internal.', $class->name, $parent->name)); + throw new LogicException(\sprintf('Cannot generate lazy ghost: class "%s" extends "%s" which is internal.', $class->name, $parent->name)); } } $propertyScopes = self::exportPropertyScopes($class->name); @@ -86,19 +86,19 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); public static function generateLazyProxy(?\ReflectionClass $class, array $interfaces = []): string { if (!class_exists($class?->name ?? \stdClass::class, false)) { - throw new LogicException(sprintf('Cannot generate lazy proxy: "%s" is not a class.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy proxy: "%s" is not a class.', $class->name)); } if ($class?->isFinal()) { - throw new LogicException(sprintf('Cannot generate lazy proxy: class "%s" is final.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy proxy: class "%s" is final.', $class->name)); } if (\PHP_VERSION_ID < 80300 && $class?->isReadOnly()) { - throw new LogicException(sprintf('Cannot generate lazy proxy with PHP < 8.3: class "%s" is readonly.', $class->name)); + throw new LogicException(\sprintf('Cannot generate lazy proxy with PHP < 8.3: class "%s" is readonly.', $class->name)); } $methodReflectors = [$class?->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) ?? []]; foreach ($interfaces as $interface) { if (!$interface->isInterface()) { - throw new LogicException(sprintf('Cannot generate lazy proxy: "%s" is not an interface.', $interface->name)); + throw new LogicException(\sprintf('Cannot generate lazy proxy: "%s" is not an interface.', $interface->name)); } $methodReflectors[] = $interface->getMethods(); } @@ -134,7 +134,7 @@ public static function generateLazyProxy(?\ReflectionClass $class, array $interf } if ($method->isFinal()) { if ($extendsInternalClass || $methodsHaveToBeProxied || method_exists(LazyProxyTrait::class, $method->name)) { - throw new LogicException(sprintf('Cannot generate lazy proxy: method "%s::%s()" is final.', $class->name, $method->name)); + throw new LogicException(\sprintf('Cannot generate lazy proxy: method "%s::%s()" is final.', $class->name, $method->name)); } continue; } @@ -264,7 +264,7 @@ public static function exportSignature(\ReflectionFunctionAbstract $function, bo $args = substr($args, 0, -2); } else { $args = explode(', ', $args, 1 + $byRefIndex); - $args[$byRefIndex] = sprintf('...\array_slice(\func_get_args(), %d)', $byRefIndex); + $args[$byRefIndex] = \sprintf('...\array_slice(\func_get_args(), %d)', $byRefIndex); $args = implode(', ', $args); } @@ -355,9 +355,8 @@ private static function exportPropertyScopes(string $parent): string $propertyScopes = VarExporter::export($propertyScopes); $propertyScopes = str_replace(VarExporter::export($parent), 'parent::class', $propertyScopes); $propertyScopes = preg_replace("/(?|(,)\n( ) |\n |,\n (\]))/", '$1$2', $propertyScopes); - $propertyScopes = str_replace("\n", "\n ", $propertyScopes); - return $propertyScopes; + return str_replace("\n", "\n ", $propertyScopes); } private static function exportDefault(\ReflectionParameter $param, $namespace): string diff --git a/app/vendor/symfony/var-exporter/VarExporter.php b/app/vendor/symfony/var-exporter/VarExporter.php index 22e9b5152..606a9fd5c 100644 --- a/app/vendor/symfony/var-exporter/VarExporter.php +++ b/app/vendor/symfony/var-exporter/VarExporter.php @@ -32,8 +32,8 @@ final class VarExporter /** * Exports a serializable PHP value to PHP code. * - * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise - * @param array &$foundClasses Classes found in the value are added to this list as both keys and values + * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise + * @param array &$foundClasses Classes found in the value are added to this list as both keys and values * * @throws ExceptionInterface When the provided value cannot be serialized */