From a03fa9a886f81538eb4aa5b670d34ced1d0edd82 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 7 Dec 2023 07:51:15 +0100 Subject: [PATCH] 8.6 --- lam-packaging/debian/copyright | 1 + lam/composer.lock | 108 +++++++++++++--- lam/copyright | 1 + .../carbonphp/carbon-doctrine-types/LICENSE | 21 ++++ .../carbonphp/carbon-doctrine-types/README.md | 14 +++ .../carbon-doctrine-types/composer.json | 36 ++++++ .../Carbon/Doctrine/CarbonDoctrineType.php | 9 -- .../Carbon/Doctrine/CarbonImmutableType.php | 7 ++ .../src/Carbon/Doctrine/CarbonType.php | 7 ++ .../Carbon/Doctrine/CarbonTypeConverter.php | 48 ++++--- .../Doctrine/DateTimeDefaultPrecision.php | 9 -- .../Carbon/Doctrine/DateTimeImmutableType.php | 4 - .../src/Carbon/Doctrine/DateTimeType.php | 4 - .../composer/composer/autoload_psr4.php | 1 + .../composer/composer/autoload_static.php | 5 + .../3rdParty/composer/composer/installed.json | 117 ++++++++++++++---- .../3rdParty/composer/composer/installed.php | 35 ++++-- .../composer/firebase/php-jwt/CHANGELOG.md | 7 ++ .../composer/firebase/php-jwt/src/JWT.php | 9 +- .../composer/nesbot/carbon/composer.json | 5 +- .../3rdParty/composer/nesbot/carbon/readme.md | 11 +- .../composer/nesbot/carbon/sponsors.php | 45 +++++-- .../carbon/src/Carbon/CarbonInterface.php | 3 +- .../nesbot/carbon/src/Carbon/CarbonPeriod.php | 23 +++- .../src/Carbon/CarbonPeriodImmutable.php | 7 ++ .../Carbon/Doctrine/CarbonImmutableType.php | 37 ------ .../carbon/src/Carbon/Doctrine/CarbonType.php | 37 ------ .../nesbot/carbon/src/Carbon/Lang/sk.php | 108 +++++++++++++--- .../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 +- .../composer/php-http/discovery/CHANGELOG.md | 4 + .../composer/php-http/discovery/README.md | 2 +- .../src/Strategy/CommonClassesStrategy.php | 7 +- 35 files changed, 515 insertions(+), 248 deletions(-) create mode 100644 lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/LICENSE create mode 100644 lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/README.md create mode 100644 lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/composer.json rename lam/lib/3rdParty/composer/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/CarbonDoctrineType.php (61%) create mode 100644 lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php create mode 100644 lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonType.php rename lam/lib/3rdParty/composer/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/CarbonTypeConverter.php (76%) rename lam/lib/3rdParty/composer/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeDefaultPrecision.php (70%) rename lam/lib/3rdParty/composer/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeImmutableType.php (76%) rename lam/lib/3rdParty/composer/{nesbot/carbon => carbonphp/carbon-doctrine-types}/src/Carbon/Doctrine/DateTimeType.php (63%) delete mode 100644 lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php delete mode 100644 lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php diff --git a/lam-packaging/debian/copyright b/lam-packaging/debian/copyright index 1933ce383..934468d2a 100644 --- a/lam-packaging/debian/copyright +++ b/lam-packaging/debian/copyright @@ -1141,6 +1141,7 @@ main license and authors: lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei lib/3rdParty/composer/brick B Benjamin Morel +lib/3rdParty/composer/carbonphp B 2023 Carbon lib/3rdParty/composer/christian-riesen B Christian Riesen lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano lib/3rdParty/composer/doctrine B Doctrine Project diff --git a/lam/composer.lock b/lam/composer.lock index 22f0a7785..facd7ffb4 100644 --- a/lam/composer.lock +++ b/lam/composer.lock @@ -133,6 +133,75 @@ ], "time": "2021-08-15T20:50:18+00:00" }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/67a77972b9f398ae7068dabacc39c08aeee170d5", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5", + "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.0.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-10-01T14:29:01+00:00" + }, { "name": "christian-riesen/base32", "version": "1.6.0", @@ -610,16 +679,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.9.0", + "version": "v6.10.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "f03270e63eaccf3019ef0f32849c497385774e11" + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11", - "reference": "f03270e63eaccf3019ef0f32849c497385774e11", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", "shasum": "" }, "require": { @@ -667,9 +736,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.9.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" }, - "time": "2023-10-05T00:24:42+00:00" + "time": "2023-12-01T16:26:39+00:00" }, { "name": "guzzlehttp/psr7", @@ -1424,19 +1493,20 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", + "version": "2.72.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -1448,8 +1518,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": "*", @@ -1526,7 +1596,7 @@ "type": "tidelift" } ], - "time": "2023-09-25T11:31:05+00:00" + "time": "2023-11-28T10:13:25+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -1651,16 +1721,16 @@ }, { "name": "php-http/discovery", - "version": "1.19.1", + "version": "1.19.2", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", + "url": "https://api.github.com/repos/php-http/discovery/zipball/61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", "shasum": "" }, "require": { @@ -1723,9 +1793,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.1" + "source": "https://github.com/php-http/discovery/tree/1.19.2" }, - "time": "2023-07-11T07:02:26+00:00" + "time": "2023-11-30T16:49:05+00:00" }, { "name": "phpmailer/phpmailer", diff --git a/lam/copyright b/lam/copyright index be47a6bb7..150f9c374 100644 --- a/lam/copyright +++ b/lam/copyright @@ -1140,6 +1140,7 @@ main license and authors: lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei lib/3rdParty/composer/brick B Benjamin Morel +lib/3rdParty/composer/carbonphp B 2023 Carbon lib/3rdParty/composer/christian-riesen B Christian Riesen lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano lib/3rdParty/composer/doctrine B Doctrine Project diff --git a/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/LICENSE b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/LICENSE new file mode 100644 index 000000000..2ee1671db --- /dev/null +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/README.md b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/README.md new file mode 100644 index 000000000..5a18121b6 --- /dev/null +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/composer.json b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/composer.json new file mode 100644 index 000000000..b5fd8a585 --- /dev/null +++ b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/composer.json @@ -0,0 +1,36 @@ +{ + "name": "carbonphp/carbon-doctrine-types", + "description": "Types to use Carbon in Doctrine", + "type": "library", + "keywords": [ + "date", + "time", + "DateTime", + "Carbon", + "Doctrine" + ], + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "license": "MIT", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "minimum-stability": "dev" +} diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php similarity index 61% rename from lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php rename to lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php index ccc457fcd..8c42dc09b 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php new file mode 100644 index 000000000..747731e4e --- /dev/null +++ b/lam/lib/3rdParty/composer/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; @@ -23,6 +14,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 +30,9 @@ 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 = $fieldDeclaration['precision'] ?? DateTimeDefaultPrecision::get(); $type = parent::getSQLDeclaration($fieldDeclaration, $platform); @@ -90,7 +78,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 +89,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 +102,16 @@ 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)); + } } diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php similarity index 70% rename from lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php rename to lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php index 642fd4135..3a9ff1100 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php similarity index 76% rename from lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php rename to lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php index 499271031..e0212d7ab 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php +++ b/lam/lib/3rdParty/composer/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php @@ -1,9 +1,5 @@ array($vendorDir . '/duosecurity/duo_universal_php/src'), 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), 'Cose\\' => array($vendorDir . '/web-auth/cose-lib/src'), + 'Carbon\\Doctrine\\' => array($vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine'), 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'CBOR\\' => array($vendorDir . '/spomky-labs/cbor-php/src'), 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'), diff --git a/lam/lib/3rdParty/composer/composer/autoload_static.php b/lam/lib/3rdParty/composer/composer/autoload_static.php index 2f9b04520..3b63d7856 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_static.php +++ b/lam/lib/3rdParty/composer/composer/autoload_static.php @@ -218,6 +218,7 @@ class ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5 'C' => array ( 'Cose\\' => 5, + 'Carbon\\Doctrine\\' => 16, 'Carbon\\' => 7, 'CBOR\\' => 5, ), @@ -446,6 +447,10 @@ class ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5 array ( 0 => __DIR__ . '/..' . '/web-auth/cose-lib/src', ), + 'Carbon\\Doctrine\\' => + array ( + 0 => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine', + ), 'Carbon\\' => array ( 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', diff --git a/lam/lib/3rdParty/composer/composer/installed.json b/lam/lib/3rdParty/composer/composer/installed.json index 001a2750c..f378dc2b2 100644 --- a/lam/lib/3rdParty/composer/composer/installed.json +++ b/lam/lib/3rdParty/composer/composer/installed.json @@ -129,6 +129,78 @@ ], "install-path": "../brick/math" }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/67a77972b9f398ae7068dabacc39c08aeee170d5", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5", + "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-10-01T14:29:01+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.0.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": "christian-riesen/base32", "version": "1.6.0", @@ -612,17 +684,17 @@ }, { "name": "firebase/php-jwt", - "version": "v6.9.0", - "version_normalized": "6.9.0.0", + "version": "v6.10.0", + "version_normalized": "6.10.0.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "f03270e63eaccf3019ef0f32849c497385774e11" + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11", - "reference": "f03270e63eaccf3019ef0f32849c497385774e11", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", "shasum": "" }, "require": { @@ -640,7 +712,7 @@ "ext-sodium": "Support EdDSA (Ed25519) signatures", "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" }, - "time": "2023-10-05T00:24:42+00:00", + "time": "2023-12-01T16:26:39+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -672,7 +744,7 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.9.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" }, "install-path": "../firebase/php-jwt" }, @@ -1462,20 +1534,21 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", - "version_normalized": "2.71.0.0", + "version": "2.72.0", + "version_normalized": "2.72.0.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -1487,8 +1560,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": "*", @@ -1499,7 +1572,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": "2023-11-28T10:13:25+00:00", "bin": [ "bin/carbon" ], @@ -1698,17 +1771,17 @@ }, { "name": "php-http/discovery", - "version": "1.19.1", - "version_normalized": "1.19.1.0", + "version": "1.19.2", + "version_normalized": "1.19.2.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", + "url": "https://api.github.com/repos/php-http/discovery/zipball/61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", "shasum": "" }, "require": { @@ -1734,7 +1807,7 @@ "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", "symfony/phpunit-bridge": "^6.2" }, - "time": "2023-07-11T07:02:26+00:00", + "time": "2023-11-30T16:49:05+00:00", "type": "composer-plugin", "extra": { "class": "Http\\Discovery\\Composer\\Plugin", @@ -1773,7 +1846,7 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.1" + "source": "https://github.com/php-http/discovery/tree/1.19.2" }, "install-path": "../php-http/discovery" }, diff --git a/lam/lib/3rdParty/composer/composer/installed.php b/lam/lib/3rdParty/composer/composer/installed.php index 834a37928..63b9c3732 100644 --- a/lam/lib/3rdParty/composer/composer/installed.php +++ b/lam/lib/3rdParty/composer/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '1e73b37aa5fafa8ae7c5ce2433eca2e3d9c46be7', + 'reference' => '92d08dd3e39fe7c213a5d24d3d6ffd2f6df542f4', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '1e73b37aa5fafa8ae7c5ce2433eca2e3d9c46be7', + 'reference' => '92d08dd3e39fe7c213a5d24d3d6ffd2f6df542f4', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), @@ -37,6 +37,15 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'carbonphp/carbon-doctrine-types' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => '67a77972b9f398ae7068dabacc39c08aeee170d5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'christian-riesen/base32' => array( 'pretty_version' => '1.6.0', 'version' => '1.6.0.0', @@ -92,9 +101,9 @@ 'dev_requirement' => false, ), 'firebase/php-jwt' => array( - 'pretty_version' => 'v6.9.0', - 'version' => '6.9.0.0', - 'reference' => 'f03270e63eaccf3019ef0f32849c497385774e11', + 'pretty_version' => 'v6.10.0', + 'version' => '6.10.0.0', + 'reference' => 'a49db6f0a5033aef5143295342f1c95521b075ff', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), @@ -200,9 +209,9 @@ 'dev_requirement' => false, ), 'nesbot/carbon' => array( - 'pretty_version' => '2.71.0', - 'version' => '2.71.0.0', - 'reference' => '98276233188583f2ff845a0f992a235472d9466a', + 'pretty_version' => '2.72.0', + 'version' => '2.72.0.0', + 'reference' => 'a6885fcbad2ec4360b0e200ee0da7d9b7c90786b', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), @@ -239,9 +248,9 @@ ), ), 'php-http/discovery' => array( - 'pretty_version' => '1.19.1', - 'version' => '1.19.1.0', - 'reference' => '57f3de01d32085fea20865f9b16fb0e69347c39e', + 'pretty_version' => '1.19.2', + 'version' => '1.19.2.0', + 'reference' => '61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../php-http/discovery', 'aliases' => array(), @@ -301,8 +310,8 @@ 'psr/http-client-implementation' => array( 'dev_requirement' => false, 'provided' => array( - 0 => '*', - 1 => '1.0', + 0 => '1.0', + 1 => '*', ), ), 'psr/http-factory' => array( diff --git a/lam/lib/3rdParty/composer/firebase/php-jwt/CHANGELOG.md b/lam/lib/3rdParty/composer/firebase/php-jwt/CHANGELOG.md index 4279dfd23..644fa0bea 100644 --- a/lam/lib/3rdParty/composer/firebase/php-jwt/CHANGELOG.md +++ b/lam/lib/3rdParty/composer/firebase/php-jwt/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [6.10.0](https://github.com/firebase/php-jwt/compare/v6.9.0...v6.10.0) (2023-11-28) + + +### Features + +* allow typ header override ([#546](https://github.com/firebase/php-jwt/issues/546)) ([79cb30b](https://github.com/firebase/php-jwt/commit/79cb30b729a22931b2fbd6b53f20629a83031ba9)) + ## [6.9.0](https://github.com/firebase/php-jwt/compare/v6.8.1...v6.9.0) (2023-10-04) diff --git a/lam/lib/3rdParty/composer/firebase/php-jwt/src/JWT.php b/lam/lib/3rdParty/composer/firebase/php-jwt/src/JWT.php index 6efcbb56d..263492068 100644 --- a/lam/lib/3rdParty/composer/firebase/php-jwt/src/JWT.php +++ b/lam/lib/3rdParty/composer/firebase/php-jwt/src/JWT.php @@ -203,13 +203,14 @@ public static function encode( string $keyId = null, array $head = null ): string { - $header = ['typ' => 'JWT', 'alg' => $alg]; + $header = ['typ' => 'JWT']; + if (isset($head) && \is_array($head)) { + $header = \array_merge($header, $head); + } + $header['alg'] = $alg; if ($keyId !== null) { $header['kid'] = $keyId; } - if (isset($head) && \is_array($head)) { - $header = \array_merge($head, $header); - } $segments = []; $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($header)); $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($payload)); diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/composer.json b/lam/lib/3rdParty/composer/nesbot/carbon/composer.json index 756076302..48366b5dd 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/composer.json +++ b/lam/lib/3rdParty/composer/nesbot/carbon/composer.json @@ -42,14 +42,15 @@ "require": { "php": "^7.1.8 || ^8.0", "ext-json": "*", + "carbonphp/carbon-doctrine-types": "*", "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.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": "*", diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/readme.md b/lam/lib/3rdParty/composer/nesbot/carbon/readme.md index b8ec4bf84..380d66fc2 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/readme.md +++ b/lam/lib/3rdParty/composer/nesbot/carbon/readme.md @@ -125,9 +125,13 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Slots City Probukmacher Игровые автоматы +Онлайн казино inkedin -Онлайн казино України -Chudovo +Онлайн казино України +Non-GamStop Bets UK +Chudovo +UK Casino Gap +NZ Casino Deps AzuraCast Triplebyte GitHub Sponsors @@ -137,7 +141,8 @@ Support this project by becoming a sponsor. Your logo will show up here with a l [[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)] - + + [[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)] diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/sponsors.php b/lam/lib/3rdParty/composer/nesbot/carbon/sponsors.php index 4f6d994ee..b98ce64c0 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/sponsors.php +++ b/lam/lib/3rdParty/composer/nesbot/carbon/sponsors.php @@ -13,19 +13,44 @@ require_once __DIR__.'/vendor/autoload.php'; +function getMaxHistoryMonthsByAmount($amount): int +{ + if ($amount >= 50) { + return 6; + } + + if ($amount >= 20) { + return 4; + } + + return 2; +} + 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']); @@ -63,24 +88,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; + $width = min(128, $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']); - return "\n".''. + return "\n".''. ''.$alt.''. ''; }, $list))."\n"; @@ -88,7 +113,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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonInterface.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonInterface.php index d63c4b8af..b90e29817 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonInterface.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriod.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriod.php index 9633d2b8e..b0e7e8b10 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ b/lam/lib/3rdParty/composer/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."); @@ -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); } @@ -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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php index cda0733f5..f0d0ee281 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php deleted file mode 100644 index bf476a77e..000000000 --- a/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php deleted file mode 100644 index 9289d84d3..000000000 --- a/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Lang/sk.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Lang/sk.php index 08af197cf..1c449d74b 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/lam/lib/3rdParty/composer/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,6 +128,24 @@ '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_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], diff --git a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php index 5123d1e74..fde67b36a 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php index c88e49e57..eb8957d4d 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Rounding.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Rounding.php index f98c2a32b..85ff5a711 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Test.php b/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Test.php index ffd01bd4e..f23c72e8f 100644 --- a/lam/lib/3rdParty/composer/nesbot/carbon/src/Carbon/Traits/Test.php +++ b/lam/lib/3rdParty/composer/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/lam/lib/3rdParty/composer/php-http/discovery/CHANGELOG.md b/lam/lib/3rdParty/composer/php-http/discovery/CHANGELOG.md index 169f7f40f..bf14ebfcc 100644 --- a/lam/lib/3rdParty/composer/php-http/discovery/CHANGELOG.md +++ b/lam/lib/3rdParty/composer/php-http/discovery/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.19.2 - 2023-11-30 + +- [#253](https://github.com/php-http/discovery/pull/253) - Symfony 7 dropped the deprecated PHP-HTTP `HttpClient` interface from their HTTP client, do not discover the version 7 client when lookig for the old interface. + ## 1.19.1 - 2023-07-11 - [#250](https://github.com/php-http/discovery/pull/250) - Fix: Buzz client instantiation using deprecated Message Factory Discovery, use PSR-17 factory discovery instead. diff --git a/lam/lib/3rdParty/composer/php-http/discovery/README.md b/lam/lib/3rdParty/composer/php-http/discovery/README.md index ef7e4991b..2b5e8e503 100644 --- a/lam/lib/3rdParty/composer/php-http/discovery/README.md +++ b/lam/lib/3rdParty/composer/php-http/discovery/README.md @@ -2,7 +2,7 @@ [![Latest Version](https://img.shields.io/github/release/php-http/discovery.svg?style=flat-square)](https://github.com/php-http/discovery/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Tests](https://github.com/php-http/discovery/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/php-http/discovery/actions/workflows/ci.yml?query=branch%3Amaster) +[![Tests](https://github.com/php-http/discovery/actions/workflows/ci.yml/badge.svg?branch=1.x)](https://github.com/php-http/discovery/actions/workflows/ci.yml?query=branch%3A1.x) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) [![Quality Score](https://img.shields.io/scrutinizer/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/discovery.svg?style=flat-square)](https://packagist.org/packages/php-http/discovery) diff --git a/lam/lib/3rdParty/composer/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/lam/lib/3rdParty/composer/php-http/discovery/src/Strategy/CommonClassesStrategy.php index ae0b0d842..0fa4240b1 100644 --- a/lam/lib/3rdParty/composer/php-http/discovery/src/Strategy/CommonClassesStrategy.php +++ b/lam/lib/3rdParty/composer/php-http/discovery/src/Strategy/CommonClassesStrategy.php @@ -78,7 +78,7 @@ final class CommonClassesStrategy implements DiscoveryStrategy ['class' => React::class, 'condition' => React::class], ], HttpClient::class => [ - ['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, [self::class, 'isPsr17FactoryInstalled']]], + ['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, [self::class, 'isPsr17FactoryInstalled'], [self::class, 'isSymfonyImplementingHttpClient']]], ['class' => Guzzle7::class, 'condition' => Guzzle7::class], ['class' => Guzzle6::class, 'condition' => Guzzle6::class], ['class' => Guzzle5::class, 'condition' => Guzzle5::class], @@ -158,6 +158,11 @@ public static function isGuzzleImplementingPsr18() return defined('GuzzleHttp\ClientInterface::MAJOR_VERSION'); } + public static function isSymfonyImplementingHttpClient() + { + return is_subclass_of(SymfonyHttplug::class, HttpClient::class); + } + /** * Can be used as a condition. *