From 2dfafdfb0962049388873467b74fedce70baeb72 Mon Sep 17 00:00:00 2001 From: Bill Tomczak Date: Thu, 28 Mar 2024 11:48:45 -0700 Subject: [PATCH] Update composer dependencies --- composer.lock | 171 ++++++++++------ .../carbonphp/carbon-doctrine-types/LICENSE | 21 ++ .../carbonphp/carbon-doctrine-types/README.md | 14 ++ .../Carbon/Doctrine/CarbonDoctrineType.php | 9 - .../Carbon/Doctrine/CarbonImmutableType.php | 7 + .../src/Carbon/Doctrine/CarbonType.php | 7 + .../Carbon/Doctrine/CarbonTypeConverter.php | 72 ++++--- .../Doctrine/DateTimeDefaultPrecision.php | 9 - .../Carbon/Doctrine/DateTimeImmutableType.php | 4 - .../src/Carbon/Doctrine/DateTimeType.php | 4 - src/admin/vendor/composer/autoload_psr4.php | 1 + src/admin/vendor/composer/autoload_static.php | 5 + src/admin/vendor/composer/installed.json | 188 ++++++++++++------ src/admin/vendor/composer/installed.php | 55 ++--- src/admin/vendor/composer/platform_check.php | 4 +- src/admin/vendor/nesbot/carbon/readme.md | 45 +++-- src/admin/vendor/nesbot/carbon/sponsors.php | 62 ++++-- .../carbon/src/Carbon/CarbonInterface.php | 3 +- .../nesbot/carbon/src/Carbon/CarbonPeriod.php | 33 ++- .../src/Carbon/CarbonPeriodImmutable.php | 7 + .../Carbon/Doctrine/CarbonImmutableType.php | 37 ---- .../carbon/src/Carbon/Doctrine/CarbonType.php | 37 ---- .../nesbot/carbon/src/Carbon/Lang/hu.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/sk.php | 110 ++++++++-- .../nesbot/carbon/src/Carbon/Lang/uk.php | 2 +- .../src/Carbon/PHPStan/AbstractMacro.php | 8 +- .../src/Carbon/PHPStan/MacroScanner.php | 12 +- .../carbon/src/Carbon/Traits/Rounding.php | 8 +- .../nesbot/carbon/src/Carbon/Traits/Test.php | 3 +- .../carbon/src/Carbon/TranslatorImmutable.php | 2 +- .../translation/Command/XliffLintCommand.php | 4 +- .../TranslationDataCollector.php | 2 +- .../translation/DataCollectorTranslator.php | 4 +- .../translation/Dumper/XliffFileDumper.php | 2 +- .../Exception/IncompleteDsnException.php | 2 +- .../MissingRequiredOptionException.php | 2 +- .../Exception/ProviderException.php | 2 +- .../Exception/UnsupportedSchemeException.php | 2 +- .../Extractor/PhpStringTokenParser.php | 2 +- .../Formatter/MessageFormatter.php | 2 +- .../translation/Loader/IcuResFileLoader.php | 2 +- .../translation/Loader/XliffFileLoader.php | 8 +- .../symfony/translation/LoggingTranslator.php | 4 +- .../symfony/translation/MessageCatalogue.php | 2 +- .../translation/MessageCatalogueInterface.php | 2 +- .../symfony/translation/Provider/Dsn.php | 22 +- .../PseudoLocalizationTranslator.php | 4 +- .../translation/Resources/functions.php | 2 +- .../Test/ProviderFactoryTestCase.php | 4 +- .../translation/TranslatableMessage.php | 4 +- .../vendor/symfony/translation/Translator.php | 8 +- .../symfony/translation/TranslatorBag.php | 2 +- .../translation/TranslatorBagInterface.php | 2 +- 53 files changed, 632 insertions(+), 400 deletions(-) create mode 100644 src/admin/vendor/carbonphp/carbon-doctrine-types/LICENSE create mode 100644 src/admin/vendor/carbonphp/carbon-doctrine-types/README.md rename src/admin/vendor/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/CarbonDoctrineType.php (61%) create mode 100644 src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php create mode 100644 src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonType.php rename src/admin/vendor/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/CarbonTypeConverter.php (63%) rename src/admin/vendor/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeDefaultPrecision.php (70%) rename src/admin/vendor/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeImmutableType.php (76%) rename src/admin/vendor/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeType.php (63%) delete mode 100644 src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php delete mode 100644 src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php diff --git a/composer.lock b/composer.lock index d8d02ae3..e4774233 100644 --- a/composer.lock +++ b/composer.lock @@ -6,6 +6,75 @@ ], "content-hash": "73031d4a805ff89c9d401e18ed10a2ee", "packages": [ + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-12-11T17:09:12+00:00" + }, { "name": "doctrine/inflector", "version": "1.4.4", @@ -516,19 +585,20 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", + "version": "2.72.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -540,8 +610,8 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -618,7 +688,7 @@ "type": "tidelift" } ], - "time": "2023-09-25T11:31:05+00:00" + "time": "2024-01-25T10:35:09+00:00" }, { "name": "pacely/mailchimp-apiv3", @@ -941,16 +1011,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -963,9 +1033,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1008,7 +1075,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -1024,20 +1091,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -1048,9 +1115,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1092,7 +1156,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -1108,20 +1172,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -1135,9 +1199,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1175,7 +1236,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -1191,20 +1252,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -1212,9 +1273,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1251,7 +1309,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -1267,20 +1325,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -1288,9 +1346,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1334,7 +1389,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -1350,20 +1405,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/translation", - "version": "v5.4.31", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f" + "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ba72f72fceddf36f00bd495966b5873f2d17ad8f", - "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f", + "url": "https://api.github.com/repos/symfony/translation/zipball/77d7d1e46f52827585e65e6cd6f52a2542e59c72", + "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72", "shasum": "" }, "require": { @@ -1431,7 +1486,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.31" + "source": "https://github.com/symfony/translation/tree/v5.4.35" }, "funding": [ { @@ -1447,7 +1502,7 @@ "type": "tidelift" } ], - "time": "2023-11-03T16:16:43+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/translation-contracts", diff --git a/src/admin/vendor/carbonphp/carbon-doctrine-types/LICENSE b/src/admin/vendor/carbonphp/carbon-doctrine-types/LICENSE new file mode 100644 index 00000000..2ee1671d --- /dev/null +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Carbon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/admin/vendor/carbonphp/carbon-doctrine-types/README.md b/src/admin/vendor/carbonphp/carbon-doctrine-types/README.md new file mode 100644 index 00000000..5a18121b --- /dev/null +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/README.md @@ -0,0 +1,14 @@ +# carbonphp/carbon-doctrine-types + +Types to use Carbon in Doctrine + +## Documentation + +[Check how to use in the official Carbon documentation](https://carbon.nesbot.com/symfony/) + +This package is an externalization of [src/Carbon/Doctrine](https://github.com/briannesbitt/Carbon/tree/2.71.0/src/Carbon/Doctrine) +from `nestbot/carbon` package. + +Externalization allows to better deal with different versions of dbal. With +version 4.0 of dbal, it no longer sustainable to be compatible with all version +using a single code. diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php similarity index 61% rename from src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php rename to src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php index ccc457fc..8c42dc09 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; diff --git a/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php new file mode 100644 index 00000000..747731e4 --- /dev/null +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php @@ -0,0 +1,7 @@ + - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Carbon\Doctrine; use Carbon\Carbon; use Carbon\CarbonInterface; use DateTimeInterface; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\DB2Platform; +use Doctrine\DBAL\Platforms\OraclePlatform; +use Doctrine\DBAL\Platforms\SqlitePlatform; +use Doctrine\DBAL\Platforms\SQLServerPlatform; use Doctrine\DBAL\Types\ConversionException; use Exception; @@ -23,6 +18,14 @@ */ trait CarbonTypeConverter { + /** + * This property differentiates types installed by carbonphp/carbon-doctrine-types + * from the ones embedded previously in nesbot/carbon source directly. + * + * @readonly + */ + public bool $external = true; + /** * @return class-string */ @@ -31,20 +34,12 @@ protected function getCarbonClassName(): string return Carbon::class; } - /** - * @return string - */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string { - $precision = $fieldDeclaration['precision'] ?: 10; - - if ($fieldDeclaration['secondPrecision'] ?? false) { - $precision = 0; - } - - if ($precision === 10) { - $precision = DateTimeDefaultPrecision::get(); - } + $precision = min( + $fieldDeclaration['precision'] ?? DateTimeDefaultPrecision::get(), + $this->getMaximumPrecision($platform), + ); $type = parent::getSQLDeclaration($fieldDeclaration, $platform); @@ -90,7 +85,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) if (!$date) { throw ConversionException::conversionFailedFormat( $value, - $this->getName(), + $this->getTypeName(), 'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()', $error ); @@ -101,10 +96,8 @@ public function convertToPHPValue($value, AbstractPlatform $platform) /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @return string|null */ - public function convertToDatabaseValue($value, AbstractPlatform $platform) + public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string { if ($value === null) { return $value; @@ -116,8 +109,33 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) throw ConversionException::conversionFailedInvalidType( $value, - $this->getName(), + $this->getTypeName(), ['null', 'DateTime', 'Carbon'] ); } + + private function getTypeName(): string + { + $chunks = explode('\\', static::class); + $type = preg_replace('/Type$/', '', end($chunks)); + + return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $type)); + } + + private function getMaximumPrecision(AbstractPlatform $platform): int + { + if ($platform instanceof DB2Platform) { + return 12; + } + + if ($platform instanceof OraclePlatform) { + return 9; + } + + if ($platform instanceof SQLServerPlatform || $platform instanceof SqlitePlatform) { + return 3; + } + + return 6; + } } diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php similarity index 70% rename from src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php rename to src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php index 642fd413..3a9ff110 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Carbon\Doctrine; class DateTimeDefaultPrecision diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php similarity index 76% rename from src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php rename to src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php index 49927103..e0212d7a 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php +++ b/src/admin/vendor/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php @@ -1,9 +1,5 @@ array($vendorDir . '/guzzlehttp/guzzle/src'), 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), + 'Carbon\\Doctrine\\' => array($vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine'), 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), ); diff --git a/src/admin/vendor/composer/autoload_static.php b/src/admin/vendor/composer/autoload_static.php index 8880065e..a55d5039 100644 --- a/src/admin/vendor/composer/autoload_static.php +++ b/src/admin/vendor/composer/autoload_static.php @@ -60,6 +60,7 @@ class ComposerStaticInit30e37e4406280450bdcfd6fc092dd33b ), 'C' => array ( + 'Carbon\\Doctrine\\' => 16, 'Carbon\\' => 7, ), ); @@ -137,6 +138,10 @@ class ComposerStaticInit30e37e4406280450bdcfd6fc092dd33b array ( 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector', ), + 'Carbon\\Doctrine\\' => + array ( + 0 => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine', + ), 'Carbon\\' => array ( 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', diff --git a/src/admin/vendor/composer/installed.json b/src/admin/vendor/composer/installed.json index 269797d5..c7c01695 100644 --- a/src/admin/vendor/composer/installed.json +++ b/src/admin/vendor/composer/installed.json @@ -1,5 +1,77 @@ { "packages": [ + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "time": "2023-12-11T17:09:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "install-path": "../carbonphp/carbon-doctrine-types" + }, { "name": "doctrine/inflector", "version": "1.4.4", @@ -528,20 +600,21 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", - "version_normalized": "2.71.0.0", + "version": "2.72.3", + "version_normalized": "2.72.3.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -553,8 +626,8 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -565,7 +638,7 @@ "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "time": "2023-09-25T11:31:05+00:00", + "time": "2024-01-25T10:35:09+00:00", "bin": [ "bin/carbon" ], @@ -970,17 +1043,17 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -991,12 +1064,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2023-01-26T09:30:37+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1040,7 +1110,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -1060,17 +1130,17 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -1079,12 +1149,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2023-01-26T09:26:14+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1127,7 +1194,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -1147,17 +1214,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -1169,12 +1236,9 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2023-07-28T09:04:16+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1213,7 +1277,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -1233,28 +1297,25 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2023-01-26T09:26:14+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1292,7 +1353,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -1312,28 +1373,25 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2023-01-26T09:26:14+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1378,7 +1436,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -1398,17 +1456,17 @@ }, { "name": "symfony/translation", - "version": "v5.4.31", - "version_normalized": "5.4.31.0", + "version": "v5.4.35", + "version_normalized": "5.4.35.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f" + "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ba72f72fceddf36f00bd495966b5873f2d17ad8f", - "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f", + "url": "https://api.github.com/repos/symfony/translation/zipball/77d7d1e46f52827585e65e6cd6f52a2542e59c72", + "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72", "shasum": "" }, "require": { @@ -1447,7 +1505,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2023-11-03T16:16:43+00:00", + "time": "2024-01-23T13:51:25+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1478,7 +1536,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.31" + "source": "https://github.com/symfony/translation/tree/v5.4.35" }, "funding": [ { diff --git a/src/admin/vendor/composer/installed.php b/src/admin/vendor/composer/installed.php index 78124bca..b5434a8d 100644 --- a/src/admin/vendor/composer/installed.php +++ b/src/admin/vendor/composer/installed.php @@ -3,13 +3,22 @@ 'name' => 'joomlashack/osdownloads', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '23115fab40c40a756736872b4978c64901d22dae', + 'reference' => '44fe48c629da9878fb9b879e910e49786db379d3', 'type' => 'joomla-component', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), 'dev' => true, ), 'versions' => array( + 'carbonphp/carbon-doctrine-types' => array( + 'pretty_version' => '2.1.0', + 'version' => '2.1.0.0', + 'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb', + 'type' => 'library', + 'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'doctrine/inflector' => array( 'pretty_version' => '1.4.4', 'version' => '1.4.4.0', @@ -67,16 +76,16 @@ 'joomlashack/osdownloads' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '23115fab40c40a756736872b4978c64901d22dae', + 'reference' => '44fe48c629da9878fb9b879e910e49786db379d3', 'type' => 'joomla-component', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), 'dev_requirement' => false, ), 'nesbot/carbon' => array( - 'pretty_version' => '2.71.0', - 'version' => '2.71.0.0', - 'reference' => '98276233188583f2ff845a0f992a235472d9466a', + 'pretty_version' => '2.72.3', + 'version' => '2.72.3.0', + 'reference' => '0c6fd108360c562f6e4fd1dedb8233b423e91c83', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), @@ -155,54 +164,54 @@ 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', + 'reference' => 'a287ed7475f85bf6f61890146edbc932c0fff919', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => '8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', + 'reference' => 'bc45c394692b948b4d383a08d7753968bed9a83d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => '42292d99c55abe617799667f454222c54c60e229', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', + 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => '70f4aebd92afca2f865444d30a4d2151c13c3179', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', + 'reference' => '861391a8da9a04cbad2d232ddd9e4893220d6e25', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => '6caa57379c4aec19c0a12a38b59b26487dcfe4b5', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', + 'reference' => '87b68208d5c1188808dd7839ee1e6c8ec3b02f1b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v5.4.31', - 'version' => '5.4.31.0', - 'reference' => 'ba72f72fceddf36f00bd495966b5873f2d17ad8f', + 'pretty_version' => 'v5.4.35', + 'version' => '5.4.35.0', + 'reference' => '77d7d1e46f52827585e65e6cd6f52a2542e59c72', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), diff --git a/src/admin/vendor/composer/platform_check.php b/src/admin/vendor/composer/platform_check.php index a8b98d5c..580fa960 100644 --- a/src/admin/vendor/composer/platform_check.php +++ b/src/admin/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 70205)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 70400)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/src/admin/vendor/nesbot/carbon/readme.md b/src/admin/vendor/nesbot/carbon/readme.md index b8ec4bf8..3f411770 100644 --- a/src/admin/vendor/nesbot/carbon/readme.md +++ b/src/admin/vendor/nesbot/carbon/readme.md @@ -120,24 +120,43 @@ This project exists thanks to all the people who contribute. Support this project by becoming a sponsor. Your logo will show up here with a link to your website. -CasinoHex Canada -Casino-portugal.pt -Slots City -Probukmacher -Игровые автоматы -inkedin -Онлайн казино України -Chudovo -AzuraCast -Triplebyte -GitHub Sponsors -Salesforce +Онлайн казино +CasinoHex Canada +Probukmacher +Игровые автоматы +Casino-portugal.pt +Slots City +inkedin +Онлайн казино України +OnlineCasinosSpelen +Best non Gamstop sites in the UK +Real Money Pokies +Non GamStop Bookies UK +Онлайн Казино Украины +SSSTwitter +Non-GamStop Bets UK +Chudovo +UK Casino Gap +NZ Casino Deps +NonStopCasino.org +Migliori Siti Non AAMS +UK NonGamStopCasinos +SnapTik +IG Downloader +Proxidize +Blastup +AzuraCast +Triplebyte +GitHub Sponsors +Salesforce [[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)] + - + + [[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)] diff --git a/src/admin/vendor/nesbot/carbon/sponsors.php b/src/admin/vendor/nesbot/carbon/sponsors.php index 4f6d994e..67b21716 100644 --- a/src/admin/vendor/nesbot/carbon/sponsors.php +++ b/src/admin/vendor/nesbot/carbon/sponsors.php @@ -13,19 +13,53 @@ require_once __DIR__.'/vendor/autoload.php'; +function getMaxHistoryMonthsByAmount($amount): int +{ + if ($amount >= 50) { + return 6; + } + + if ($amount >= 20) { + return 4; + } + + return 2; +} + +function getHtmlAttribute($rawValue): string +{ + return str_replace( + ['​', "\r"], + '', + trim(htmlspecialchars((string) $rawValue), "  \n\r\t\v\0"), + ); +} + function getOpenCollectiveSponsors(): string { + $customSponsorImages = [ + // For consistency and equity among sponsors, as of now, we kindly ask our sponsors + // to provide an image having a width/height ratio between 1/1 and 2/1. + // By default, we'll show the member picture from OpenCollective, and will resize it if bigger + // int(OpenCollective.MemberId) => ImageURL + ]; + $members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true); - $sixMonthsAgo = CarbonImmutable::parse('now - 6 months')->format('Y-m-d h:i'); - $list = array_filter($members, static function ($member) use ($sixMonthsAgo) { + $list = array_filter($members, static function ($member): bool { return ($member['lastTransactionAmount'] > 3 || $member['isActive']) && $member['role'] === 'BACKER' && $member['type'] !== 'USER' && - ($member['totalAmountDonated'] > 100 || $member['lastTransactionAt'] > $sixMonthsAgo || $member['isActive'] && $member['lastTransactionAmount'] >= 30); + ( + $member['totalAmountDonated'] > 100 || + $member['lastTransactionAt'] > CarbonImmutable::now() + ->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount'])) + ->format('Y-m-d h:i') || + $member['isActive'] && $member['lastTransactionAmount'] >= 30 + ); }); - $list = array_map(static function (array $member) { + $list = array_map(static function (array $member): array { $createdAt = CarbonImmutable::parse($member['createdAt']); $lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']); @@ -49,7 +83,7 @@ function getOpenCollectiveSponsors(): string if ($monthlyContribution > 29) { $status = 'sponsor'; - } elseif ($monthlyContribution > 3 || $yearlyContribution > 20) { + } elseif ($monthlyContribution > 4.5 || $yearlyContribution > 29) { $status = 'backer'; } elseif ($member['totalAmountDonated'] > 0) { $status = 'helper'; @@ -63,24 +97,24 @@ function getOpenCollectiveSponsors(): string ]); }, $list); - usort($list, static function (array $a, array $b) { + usort($list, static function (array $a, array $b): int { return ($b['monthlyContribution'] <=> $a['monthlyContribution']) ?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']); }); - return implode('', array_map(static function (array $member) { + return implode('', array_map(static function (array $member) use ($customSponsorImages): string { $href = htmlspecialchars($member['website'] ?? $member['profile']); - $src = $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png'); + $src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png'); [$x, $y] = @getimagesize($src) ?: [0, 0]; $validImage = ($x && $y); $src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg'; - $height = 64; - $width = $validImage ? round($x * $height / $y) : $height; + $height = $member['status'] === 'sponsor' ? 64 : 42; + $width = min($height * 2, $validImage ? round($x * $height / $y) : $height); $href .= (strpos($href, '?') === false ? '?' : '&').'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; - $title = htmlspecialchars(($member['description'] ?? null) ?: $member['name']); - $alt = htmlspecialchars($member['name']); + $title = getHtmlAttribute(($member['description'] ?? null) ?: $member['name']); + $alt = getHtmlAttribute($member['name']); - return "\n".''. + return "\n".''. ''.$alt.''. ''; }, $list))."\n"; @@ -88,7 +122,7 @@ function getOpenCollectiveSponsors(): string file_put_contents('readme.md', preg_replace_callback( '/()[\s\S]+()/', - static function (array $match) { + static function (array $match): string { return $match[1].getOpenCollectiveSponsors().$match[2]; }, file_get_contents('readme.md') diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php index d63c4b8a..b90e2981 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php @@ -5125,8 +5125,7 @@ public function weeksInYear($dayOfWeek = null, $dayOfYear = null); * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance * @param Closure(): T $callback * - * @return mixed - * @phpstan-return T + * @return T */ public static function withTestNow($testNow, $callback); diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php index 9633d2b8..d12a9869 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -238,6 +238,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public const END_MAX_ATTEMPTS = 10000; + /** + * Default date class of iteration items. + * + * @var string + */ + protected const DEFAULT_DATE_CLASS = Carbon::class; + /** * The registered macros. * @@ -497,15 +504,16 @@ protected static function parseIso8601($iso) $interval = null; $start = null; $end = null; + $dateClass = static::DEFAULT_DATE_CLASS; foreach (explode('/', $iso) as $key => $part) { if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { $interval = $part; - } elseif ($start === null && $parsed = Carbon::make($part)) { + } elseif ($start === null && $parsed = $dateClass::make($part)) { $start = $part; - } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) { + } elseif ($end === null && $parsed = $dateClass::make(static::addMissingParts($start ?? '', $part))) { $end = $part; } else { throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); @@ -518,7 +526,7 @@ protected static function parseIso8601($iso) } /** - * Add missing parts of the target date from the soure date. + * Add missing parts of the target date from the source date. * * @param string $source * @param string $target @@ -701,7 +709,8 @@ public function __construct(...$arguments) } if ($this->startDate === null) { - $this->setStartDate(Carbon::now()); + $dateClass = $this->dateClass; + $this->setStartDate($dateClass::now()); } if ($this->dateInterval === null) { @@ -1826,7 +1835,9 @@ public function __call($method, $parameters) )(...$parameters)); } - if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + $dateClass = $this->dateClass; + + if ($this->localStrictModeEnabled ?? $dateClass::isStrictModeEnabled()) { throw new UnknownMethodException($method); } @@ -2023,7 +2034,7 @@ public function map(callable $callback) /** * Determines if the instance is equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -2038,7 +2049,7 @@ public function eq($period): bool /** * Determines if the instance is equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -2061,7 +2072,7 @@ public function equalTo($period): bool /** * Determines if the instance is not equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -2076,7 +2087,7 @@ public function ne($period): bool /** * Determines if the instance is not equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -2685,7 +2696,9 @@ private function makeDateTime($value): ?DateTimeInterface !preg_match('/^R\d/', $value) && preg_match('/[a-z\d]/i', $value) ) { - return Carbon::parse($value, $this->tzName); + $dateClass = $this->dateClass; + + return $dateClass::parse($value, $this->tzName); } } diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php index cda0733f..f0d0ee28 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php @@ -13,6 +13,13 @@ class CarbonPeriodImmutable extends CarbonPeriod { + /** + * Default date class of iteration items. + * + * @var string + */ + protected const DEFAULT_DATE_CLASS = CarbonImmutable::class; + /** * Date class of iteration items. * diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php deleted file mode 100644 index bf476a77..00000000 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Doctrine\DBAL\Platforms\AbstractPlatform; - -class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType -{ - /** - * {@inheritdoc} - * - * @return string - */ - public function getName() - { - return 'carbon_immutable'; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function requiresSQLCommentHint(AbstractPlatform $platform) - { - return true; - } -} diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php deleted file mode 100644 index 9289d84d..00000000 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Doctrine\DBAL\Platforms\AbstractPlatform; - -class CarbonType extends DateTimeType implements CarbonDoctrineType -{ - /** - * {@inheritdoc} - * - * @return string - */ - public function getName() - { - return 'carbon'; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function requiresSQLCommentHint(AbstractPlatform $platform) - { - return true; - } -} diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/hu.php index b2d2ac11..b7583eec 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/hu.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/hu.php @@ -82,7 +82,7 @@ 'second_before' => ':count másodperccel', 's_before' => ':count másodperccel', 'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'], - 'months_short' => ['jan.', 'feb.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], + 'months_short' => ['jan.', 'febr.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'], 'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'], 'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'], diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index 08af197c..f9702e96 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -33,33 +33,87 @@ * - Marek Adamický * - AlterwebStudio */ + +use Carbon\CarbonInterface; + +$fromNow = function ($time) { + return 'o '.strtr($time, [ + 'hodina' => 'hodinu', + 'minúta' => 'minútu', + 'sekunda' => 'sekundu', + ]); +}; + +$ago = function ($time) { + $replacements = [ + '/\bhodina\b/' => 'hodinou', + '/\bminúta\b/' => 'minútou', + '/\bsekunda\b/' => 'sekundou', + '/\bdeň\b/u' => 'dňom', + '/\btýždeň\b/u' => 'týždňom', + '/\bmesiac\b/' => 'mesiacom', + '/\brok\b/' => 'rokom', + ]; + + $replacementsPlural = [ + '/\bhodiny\b/' => 'hodinami', + '/\bminúty\b/' => 'minútami', + '/\bsekundy\b/' => 'sekundami', + '/\bdni\b/' => 'dňami', + '/\btýždne\b/' => 'týždňami', + '/\bmesiace\b/' => 'mesiacmi', + '/\broky\b/' => 'rokmi', + ]; + + foreach ($replacements + $replacementsPlural as $pattern => $replacement) { + $time = preg_replace($pattern, $replacement, $time); + } + + return "pred $time"; +}; + return [ - 'year' => 'rok|:count roky|:count rokov', + 'year' => ':count rok|:count roky|:count rokov', + 'a_year' => 'rok|:count roky|:count rokov', 'y' => ':count r', - 'month' => 'mesiac|:count mesiace|:count mesiacov', + 'month' => ':count mesiac|:count mesiace|:count mesiacov', + 'a_month' => 'mesiac|:count mesiace|:count mesiacov', 'm' => ':count m', - 'week' => 'týždeň|:count týždne|:count týždňov', + 'week' => ':count týždeň|:count týždne|:count týždňov', + 'a_week' => 'týždeň|:count týždne|:count týždňov', 'w' => ':count t', - 'day' => 'deň|:count dni|:count dní', + 'day' => ':count deň|:count dni|:count dní', + 'a_day' => 'deň|:count dni|:count dní', 'd' => ':count d', - 'hour' => 'hodinu|:count hodiny|:count hodín', + 'hour' => ':count hodina|:count hodiny|:count hodín', + 'a_hour' => 'hodina|:count hodiny|:count hodín', 'h' => ':count h', - 'minute' => 'minútu|:count minúty|:count minút', + 'minute' => ':count minúta|:count minúty|:count minút', + 'a_minute' => 'minúta|:count minúty|:count minút', 'min' => ':count min', - 'second' => 'sekundu|:count sekundy|:count sekúnd', - 'a_second' => 'pár sekúnd|:count sekundy|:count sekúnd', + 'second' => ':count sekunda|:count sekundy|:count sekúnd', + 'a_second' => 'sekunda|:count sekundy|:count sekúnd', 's' => ':count s', - 'ago' => 'pred :time', - 'from_now' => 'o :time', - 'after' => ':time po', + 'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd', + 'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd', + 'ms' => ':count ms', + 'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'µs' => ':count µs', + + 'ago' => $ago, + 'from_now' => $fromNow, 'before' => ':time pred', - 'year_ago' => 'rokom|:count rokmi|:count rokmi', - 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', - 'week_ago' => 'týždňom|:count týždňami|:count týždňami', - 'day_ago' => 'dňom|:count dňami|:count dňami', - 'hour_ago' => 'hodinou|:count hodinami|:count hodinami', - 'minute_ago' => 'minútou|:count minútami|:count minútami', - 'second_ago' => 'sekundou|:count sekundami|:count sekundami', + 'after' => ':time po', + + 'hour_after' => ':count hodinu|:count hodiny|:count hodín', + 'minute_after' => ':count minútu|:count minúty|:count minút', + 'second_after' => ':count sekundu|:count sekundy|:count sekúnd', + + 'hour_before' => ':count hodinu|:count hodiny|:count hodín', + 'minute_before' => ':count minútu|:count minúty|:count minút', + 'second_before' => ':count sekundu|:count sekundy|:count sekúnd', + 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' a '], @@ -74,8 +128,26 @@ 'LLL' => 'D. M. HH:mm', 'LLLL' => 'dddd D. MMMM YYYY HH:mm', ], + 'calendar' => [ + 'sameDay' => '[dnes o] LT', + 'nextDay' => '[zajtra o] LT', + 'lastDay' => '[včera o] LT', + 'nextWeek' => 'dddd [o] LT', + 'lastWeek' => static function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 1: + case 2: + case 4: + case 5: + return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok + default: + return '[minulá] dddd [o] LT'; + } + }, + 'sameElse' => 'L', + ], 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], - 'weekdays_short' => ['ned', 'pod', 'uto', 'str', 'štv', 'pia', 'sob'], + 'weekdays_short' => ['ned', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'], 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index 1d5ba703..4217d16e 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -55,7 +55,7 @@ */ return [ 'year' => ':count рік|:count роки|:count років', - 'y' => ':countр', + 'y' => ':countр|:countрр|:countрр', 'a_year' => '{1}рік|:count рік|:count роки|:count років', 'month' => ':count місяць|:count місяці|:count місяців', 'm' => ':countм', diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php index 5123d1e7..fde67b36 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -70,11 +70,9 @@ abstract class AbstractMacro implements BuiltinMethodReflection /** * Macro constructor. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName - * @param callable $macro + * @param class-string $className + * @param string $methodName + * @param callable $macro */ public function __construct(string $className, string $methodName, $macro) { diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php index c88e49e5..eb8957d4 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php @@ -36,10 +36,8 @@ public function __construct(ReflectionProvider $reflectionProvider) /** * Return true if the given pair class-method is a Carbon macro. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName + * @param class-string $className + * @param string $methodName * * @return bool */ @@ -61,10 +59,8 @@ public function hasMethod(string $className, string $methodName): bool /** * Return the Macro for a given pair class-method. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName + * @param class-string $className + * @param string $methodName * * @throws ReflectionException * diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php index f98c2a32..85ff5a71 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php @@ -57,7 +57,6 @@ public function roundUnit($unit, $precision = 1, $function = 'round') 'microsecond' => [0, 999999], ]); $factor = 1; - $initialMonth = $this->month; if ($normalizedUnit === 'week') { $normalizedUnit = 'day'; @@ -130,16 +129,13 @@ public function roundUnit($unit, $precision = 1, $function = 'round') $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); /** @var CarbonInterface $result */ - $result = $this->$normalizedUnit($normalizedValue); + $result = $this; foreach ($changes as $unit => $value) { $result = $result->$unit($value); } - return $normalizedUnit === 'month' && $precision <= 1 && abs($result->month - $initialMonth) === 2 - // Re-run the change in case an overflow occurred - ? $result->$normalizedUnit($normalizedValue) - : $result; + return $result->$normalizedUnit($normalizedValue); } /** diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Test.php index ffd01bd4..f23c72e8 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Test.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/Traits/Test.php @@ -124,8 +124,7 @@ public static function setTestNowAndTimezone($testNow = null, $tz = null) * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance * @param Closure(): T $callback * - * @return mixed - * @phpstan-return T + * @return T */ public static function withTestNow($testNow, $callback) { diff --git a/src/admin/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/src/admin/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php index ad36c670..ce6b2f90 100644 --- a/src/admin/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php +++ b/src/admin/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php @@ -66,7 +66,7 @@ public function setTranslations($messages) /** * @codeCoverageIgnore */ - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void { $this->disallowMutation(__METHOD__); diff --git a/src/admin/vendor/symfony/translation/Command/XliffLintCommand.php b/src/admin/vendor/symfony/translation/Command/XliffLintCommand.php index fb2b5f31..0a0bc0ee 100644 --- a/src/admin/vendor/symfony/translation/Command/XliffLintCommand.php +++ b/src/admin/vendor/symfony/translation/Command/XliffLintCommand.php @@ -42,7 +42,7 @@ class XliffLintCommand extends Command private $isReadableProvider; private $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, bool $requireStrictFileNames = true) { parent::__construct($name); @@ -111,7 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output) return $this->display($io, $filesInfo); } - private function validate(string $content, string $file = null): array + private function validate(string $content, ?string $file = null): array { $errors = []; diff --git a/src/admin/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/src/admin/vendor/symfony/translation/DataCollector/TranslationDataCollector.php index 379130a4..12c1d04a 100644 --- a/src/admin/vendor/symfony/translation/DataCollector/TranslationDataCollector.php +++ b/src/admin/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -48,7 +48,7 @@ public function lateCollect() /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { $this->data['locale'] = $this->translator->getLocale(); $this->data['fallback_locales'] = $this->translator->getFallbackLocales(); diff --git a/src/admin/vendor/symfony/translation/DataCollectorTranslator.php b/src/admin/vendor/symfony/translation/DataCollectorTranslator.php index ea5a2dd5..6de5e22a 100644 --- a/src/admin/vendor/symfony/translation/DataCollectorTranslator.php +++ b/src/admin/vendor/symfony/translation/DataCollectorTranslator.php @@ -43,7 +43,7 @@ public function __construct(TranslatorInterface $translator) /** * {@inheritdoc} */ - public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); $this->collectMessage($locale, $domain, $id, $trans, $parameters); @@ -70,7 +70,7 @@ public function getLocale() /** * {@inheritdoc} */ - public function getCatalogue(string $locale = null) + public function getCatalogue(?string $locale = null) { return $this->translator->getCatalogue($locale); } diff --git a/src/admin/vendor/symfony/translation/Dumper/XliffFileDumper.php b/src/admin/vendor/symfony/translation/Dumper/XliffFileDumper.php index f7dbdcdd..a480b3f2 100644 --- a/src/admin/vendor/symfony/translation/Dumper/XliffFileDumper.php +++ b/src/admin/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -196,7 +196,7 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ? return $dom->saveXML(); } - private function hasMetadataArrayInfo(string $key, array $metadata = null): bool + private function hasMetadataArrayInfo(string $key, ?array $metadata = null): bool { return is_iterable($metadata[$key] ?? null); } diff --git a/src/admin/vendor/symfony/translation/Exception/IncompleteDsnException.php b/src/admin/vendor/symfony/translation/Exception/IncompleteDsnException.php index cb0ce027..b304bde0 100644 --- a/src/admin/vendor/symfony/translation/Exception/IncompleteDsnException.php +++ b/src/admin/vendor/symfony/translation/Exception/IncompleteDsnException.php @@ -13,7 +13,7 @@ class IncompleteDsnException extends InvalidArgumentException { - public function __construct(string $message, string $dsn = null, \Throwable $previous = null) + public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null) { if ($dsn) { $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message; diff --git a/src/admin/vendor/symfony/translation/Exception/MissingRequiredOptionException.php b/src/admin/vendor/symfony/translation/Exception/MissingRequiredOptionException.php index 2b5f8080..46152e25 100644 --- a/src/admin/vendor/symfony/translation/Exception/MissingRequiredOptionException.php +++ b/src/admin/vendor/symfony/translation/Exception/MissingRequiredOptionException.php @@ -16,7 +16,7 @@ */ class MissingRequiredOptionException extends IncompleteDsnException { - public function __construct(string $option, string $dsn = null, \Throwable $previous = null) + public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null) { $message = sprintf('The option "%s" is required but missing.', $option); diff --git a/src/admin/vendor/symfony/translation/Exception/ProviderException.php b/src/admin/vendor/symfony/translation/Exception/ProviderException.php index 571920da..8b909fe2 100644 --- a/src/admin/vendor/symfony/translation/Exception/ProviderException.php +++ b/src/admin/vendor/symfony/translation/Exception/ProviderException.php @@ -21,7 +21,7 @@ class ProviderException extends RuntimeException implements ProviderExceptionInt private $response; private $debug; - public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null) + public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null) { $this->response = $response; $this->debug = $response->getInfo('debug') ?? ''; diff --git a/src/admin/vendor/symfony/translation/Exception/UnsupportedSchemeException.php b/src/admin/vendor/symfony/translation/Exception/UnsupportedSchemeException.php index 7fbaa8f0..800c4cdb 100644 --- a/src/admin/vendor/symfony/translation/Exception/UnsupportedSchemeException.php +++ b/src/admin/vendor/symfony/translation/Exception/UnsupportedSchemeException.php @@ -31,7 +31,7 @@ class UnsupportedSchemeException extends LogicException ], ]; - public function __construct(Dsn $dsn, string $name = null, array $supported = []) + public function __construct(Dsn $dsn, ?string $name = null, array $supported = []) { $provider = $dsn->getScheme(); if (false !== $pos = strpos($provider, '+')) { diff --git a/src/admin/vendor/symfony/translation/Extractor/PhpStringTokenParser.php b/src/admin/vendor/symfony/translation/Extractor/PhpStringTokenParser.php index d114cc73..c0699461 100644 --- a/src/admin/vendor/symfony/translation/Extractor/PhpStringTokenParser.php +++ b/src/admin/vendor/symfony/translation/Extractor/PhpStringTokenParser.php @@ -93,7 +93,7 @@ public static function parse(string $str) * * @return string */ - public static function parseEscapeSequences(string $str, string $quote = null) + public static function parseEscapeSequences(string $str, ?string $quote = null) { if (null !== $quote) { $str = str_replace('\\'.$quote, $quote, $str); diff --git a/src/admin/vendor/symfony/translation/Formatter/MessageFormatter.php b/src/admin/vendor/symfony/translation/Formatter/MessageFormatter.php index 04079648..3449a84a 100644 --- a/src/admin/vendor/symfony/translation/Formatter/MessageFormatter.php +++ b/src/admin/vendor/symfony/translation/Formatter/MessageFormatter.php @@ -28,7 +28,7 @@ class MessageFormatter implements MessageFormatterInterface, IntlFormatterInterf /** * @param TranslatorInterface|null $translator An identity translator to use as selector for pluralization */ - public function __construct(TranslatorInterface $translator = null, IntlFormatterInterface $intlFormatter = null) + public function __construct(?TranslatorInterface $translator = null, ?IntlFormatterInterface $intlFormatter = null) { $this->translator = $translator ?? new IdentityTranslator(); $this->intlFormatter = $intlFormatter ?? new IntlFormatter(); diff --git a/src/admin/vendor/symfony/translation/Loader/IcuResFileLoader.php b/src/admin/vendor/symfony/translation/Loader/IcuResFileLoader.php index 6b7834e6..88e13373 100644 --- a/src/admin/vendor/symfony/translation/Loader/IcuResFileLoader.php +++ b/src/admin/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -75,7 +75,7 @@ public function load($resource, string $locale, string $domain = 'messages') * * @return array */ - protected function flatten(\ResourceBundle $rb, array &$messages = [], string $path = null) + protected function flatten(\ResourceBundle $rb, array &$messages = [], ?string $path = null) { foreach ($rb as $key => $value) { $nodePath = $path ? $path.'.'.$key : $key; diff --git a/src/admin/vendor/symfony/translation/Loader/XliffFileLoader.php b/src/admin/vendor/symfony/translation/Loader/XliffFileLoader.php index 5c9794a5..fae07dbe 100644 --- a/src/admin/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/src/admin/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -111,6 +111,10 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s continue; } + if (isset($translation->target) && 'needs-translation' === (string) $translation->target->attributes()['state']) { + continue; + } + $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; // If the xlf file has another encoding specified, try to convert it because // simple_xml will always return utf-8 encoded values @@ -190,7 +194,7 @@ private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, s /** * Convert a UTF8 string to the specified encoding. */ - private function utf8ToCharset(string $content, string $encoding = null): string + private function utf8ToCharset(string $content, ?string $encoding = null): string { if ('UTF-8' !== $encoding && !empty($encoding)) { return mb_convert_encoding($content, $encoding, 'UTF-8'); @@ -199,7 +203,7 @@ private function utf8ToCharset(string $content, string $encoding = null): string return $content; } - private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, string $encoding = null): array + private function parseNotesMetadata(?\SimpleXMLElement $noteElement = null, ?string $encoding = null): array { $notes = []; diff --git a/src/admin/vendor/symfony/translation/LoggingTranslator.php b/src/admin/vendor/symfony/translation/LoggingTranslator.php index 6ccd4828..d0932b66 100644 --- a/src/admin/vendor/symfony/translation/LoggingTranslator.php +++ b/src/admin/vendor/symfony/translation/LoggingTranslator.php @@ -40,7 +40,7 @@ public function __construct(TranslatorInterface $translator, LoggerInterface $lo /** * {@inheritdoc} */ - public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); $this->log($id, $domain, $locale); @@ -73,7 +73,7 @@ public function getLocale() /** * {@inheritdoc} */ - public function getCatalogue(string $locale = null) + public function getCatalogue(?string $locale = null) { return $this->translator->getCatalogue($locale); } diff --git a/src/admin/vendor/symfony/translation/MessageCatalogue.php b/src/admin/vendor/symfony/translation/MessageCatalogue.php index 9da3b7f0..2e00b645 100644 --- a/src/admin/vendor/symfony/translation/MessageCatalogue.php +++ b/src/admin/vendor/symfony/translation/MessageCatalogue.php @@ -63,7 +63,7 @@ public function getDomains() /** * {@inheritdoc} */ - public function all(string $domain = null) + public function all(?string $domain = null) { if (null !== $domain) { // skip messages merge if intl-icu requested explicitly diff --git a/src/admin/vendor/symfony/translation/MessageCatalogueInterface.php b/src/admin/vendor/symfony/translation/MessageCatalogueInterface.php index 965bf008..d532a1e4 100644 --- a/src/admin/vendor/symfony/translation/MessageCatalogueInterface.php +++ b/src/admin/vendor/symfony/translation/MessageCatalogueInterface.php @@ -45,7 +45,7 @@ public function getDomains(); * * @return array */ - public function all(string $domain = null); + public function all(?string $domain = null); /** * Sets a message translation. diff --git a/src/admin/vendor/symfony/translation/Provider/Dsn.php b/src/admin/vendor/symfony/translation/Provider/Dsn.php index 792b8dc1..d29b202d 100644 --- a/src/admin/vendor/symfony/translation/Provider/Dsn.php +++ b/src/admin/vendor/symfony/translation/Provider/Dsn.php @@ -33,25 +33,25 @@ public function __construct(string $dsn) { $this->originalDsn = $dsn; - if (false === $parsedDsn = parse_url($dsn)) { + if (false === $params = parse_url($dsn)) { throw new InvalidArgumentException('The translation provider DSN is invalid.'); } - if (!isset($parsedDsn['scheme'])) { + if (!isset($params['scheme'])) { throw new InvalidArgumentException('The translation provider DSN must contain a scheme.'); } - $this->scheme = $parsedDsn['scheme']; + $this->scheme = $params['scheme']; - if (!isset($parsedDsn['host'])) { + if (!isset($params['host'])) { throw new InvalidArgumentException('The translation provider DSN must contain a host (use "default" by default).'); } - $this->host = $parsedDsn['host']; + $this->host = $params['host']; - $this->user = '' !== ($parsedDsn['user'] ?? '') ? urldecode($parsedDsn['user']) : null; - $this->password = '' !== ($parsedDsn['pass'] ?? '') ? urldecode($parsedDsn['pass']) : null; - $this->port = $parsedDsn['port'] ?? null; - $this->path = $parsedDsn['path'] ?? null; - parse_str($parsedDsn['query'] ?? '', $this->options); + $this->user = '' !== ($params['user'] ?? '') ? rawurldecode($params['user']) : null; + $this->password = '' !== ($params['pass'] ?? '') ? rawurldecode($params['pass']) : null; + $this->port = $params['port'] ?? null; + $this->path = $params['path'] ?? null; + parse_str($params['query'] ?? '', $this->options); } public function getScheme(): string @@ -74,7 +74,7 @@ public function getPassword(): ?string return $this->password; } - public function getPort(int $default = null): ?int + public function getPort(?int $default = null): ?int { return $this->port ?? $default; } diff --git a/src/admin/vendor/symfony/translation/PseudoLocalizationTranslator.php b/src/admin/vendor/symfony/translation/PseudoLocalizationTranslator.php index c769bdad..5396eb54 100644 --- a/src/admin/vendor/symfony/translation/PseudoLocalizationTranslator.php +++ b/src/admin/vendor/symfony/translation/PseudoLocalizationTranslator.php @@ -86,7 +86,7 @@ public function __construct(TranslatorInterface $translator, array $options = [] /** * {@inheritdoc} */ - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string + public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string { $trans = ''; $visibleText = ''; @@ -123,7 +123,7 @@ private function getParts(string $originalTrans): array return [[true, true, $originalTrans]]; } - $html = mb_encode_numericentity($originalTrans, [0x80, 0xFFFF, 0, 0xFFFF], mb_detect_encoding($originalTrans, null, true) ?: 'UTF-8'); + $html = mb_encode_numericentity($originalTrans, [0x80, 0x10FFFF, 0, 0x1FFFFF], mb_detect_encoding($originalTrans, null, true) ?: 'UTF-8'); $useInternalErrors = libxml_use_internal_errors(true); diff --git a/src/admin/vendor/symfony/translation/Resources/functions.php b/src/admin/vendor/symfony/translation/Resources/functions.php index 901d2f87..0d2a037a 100644 --- a/src/admin/vendor/symfony/translation/Resources/functions.php +++ b/src/admin/vendor/symfony/translation/Resources/functions.php @@ -15,7 +15,7 @@ /** * @author Nate Wiebe */ - function t(string $message, array $parameters = [], string $domain = null): TranslatableMessage + function t(string $message, array $parameters = [], ?string $domain = null): TranslatableMessage { return new TranslatableMessage($message, $parameters, $domain); } diff --git a/src/admin/vendor/symfony/translation/Test/ProviderFactoryTestCase.php b/src/admin/vendor/symfony/translation/Test/ProviderFactoryTestCase.php index 5df82ebe..b8438149 100644 --- a/src/admin/vendor/symfony/translation/Test/ProviderFactoryTestCase.php +++ b/src/admin/vendor/symfony/translation/Test/ProviderFactoryTestCase.php @@ -89,7 +89,7 @@ public function testCreate(string $expected, string $dsn) /** * @dataProvider unsupportedSchemeProvider */ - public function testUnsupportedSchemeException(string $dsn, string $message = null) + public function testUnsupportedSchemeException(string $dsn, ?string $message = null) { $factory = $this->createFactory(); @@ -106,7 +106,7 @@ public function testUnsupportedSchemeException(string $dsn, string $message = nu /** * @dataProvider incompleteDsnProvider */ - public function testIncompleteDsnException(string $dsn, string $message = null) + public function testIncompleteDsnException(string $dsn, ?string $message = null) { $factory = $this->createFactory(); diff --git a/src/admin/vendor/symfony/translation/TranslatableMessage.php b/src/admin/vendor/symfony/translation/TranslatableMessage.php index 282d289c..4e53d607 100644 --- a/src/admin/vendor/symfony/translation/TranslatableMessage.php +++ b/src/admin/vendor/symfony/translation/TranslatableMessage.php @@ -23,7 +23,7 @@ class TranslatableMessage implements TranslatableInterface private $parameters; private $domain; - public function __construct(string $message, array $parameters = [], string $domain = null) + public function __construct(string $message, array $parameters = [], ?string $domain = null) { $this->message = $message; $this->parameters = $parameters; @@ -50,7 +50,7 @@ public function getDomain(): ?string return $this->domain; } - public function trans(TranslatorInterface $translator, string $locale = null): string + public function trans(TranslatorInterface $translator, ?string $locale = null): string { return $translator->trans($this->getMessage(), array_map( static function ($parameter) use ($translator, $locale) { diff --git a/src/admin/vendor/symfony/translation/Translator.php b/src/admin/vendor/symfony/translation/Translator.php index dc062609..9270e51d 100644 --- a/src/admin/vendor/symfony/translation/Translator.php +++ b/src/admin/vendor/symfony/translation/Translator.php @@ -89,7 +89,7 @@ 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, ?string $cacheDir = null, bool $debug = false, array $cacheVary = []) { $this->setLocale($locale); @@ -127,7 +127,7 @@ public function addLoader(string $format, LoaderInterface $loader) * * @throws InvalidArgumentException If the locale contains invalid characters */ - public function addResource(string $format, $resource, string $locale, string $domain = null) + public function addResource(string $format, $resource, string $locale, ?string $domain = null) { if (null === $domain) { $domain = 'messages'; @@ -194,7 +194,7 @@ public function getFallbackLocales(): array /** * {@inheritdoc} */ - public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { if (null === $id || '' === $id) { return ''; @@ -229,7 +229,7 @@ public function trans(?string $id, array $parameters = [], string $domain = null /** * {@inheritdoc} */ - public function getCatalogue(string $locale = null) + public function getCatalogue(?string $locale = null) { if (!$locale) { $locale = $this->getLocale(); diff --git a/src/admin/vendor/symfony/translation/TranslatorBag.php b/src/admin/vendor/symfony/translation/TranslatorBag.php index 6a4df3c3..c8ae1a2f 100644 --- a/src/admin/vendor/symfony/translation/TranslatorBag.php +++ b/src/admin/vendor/symfony/translation/TranslatorBag.php @@ -38,7 +38,7 @@ public function addBag(TranslatorBagInterface $bag): void /** * {@inheritdoc} */ - public function getCatalogue(string $locale = null): MessageCatalogueInterface + public function getCatalogue(?string $locale = null): MessageCatalogueInterface { if (null === $locale || !isset($this->catalogues[$locale])) { $this->catalogues[$locale] = new MessageCatalogue($locale); diff --git a/src/admin/vendor/symfony/translation/TranslatorBagInterface.php b/src/admin/vendor/symfony/translation/TranslatorBagInterface.php index 42289773..3fc3bda3 100644 --- a/src/admin/vendor/symfony/translation/TranslatorBagInterface.php +++ b/src/admin/vendor/symfony/translation/TranslatorBagInterface.php @@ -31,5 +31,5 @@ interface TranslatorBagInterface * * @throws InvalidArgumentException If the locale contains invalid characters */ - public function getCatalogue(string $locale = null); + public function getCatalogue(?string $locale = null); }