From c516945f1d539a498678d05ba37b4d4ca3f7db04 Mon Sep 17 00:00:00 2001 From: MaximHarder <19776684+MaximHarder@users.noreply.github.com> Date: Tue, 15 Sep 2026 12:42:39 +0000 Subject: [PATCH] chore(deps): composer update --- upload/api/composer.lock | 118 +- upload/api/vendor/composer/installed.json | 118 +- upload/api/vendor/composer/installed.php | 52 +- .../api/vendor/monolog/monolog/CHANGELOG.md | 29 + .../api/vendor/monolog/monolog/composer.json | 4 +- .../Monolog/Attribute/WithMonologChannel.php | 5 +- .../monolog/src/Monolog/ErrorHandler.php | 70 +- .../Formatter/GelfMessageFormatter.php | 6 +- .../src/Monolog/Formatter/JsonFormatter.php | 10 +- .../Monolog/Formatter/NormalizerFormatter.php | 57 +- .../Monolog/Formatter/RedactingFormatter.php | 373 +++++ .../Formatter/WrappingFormatterInterface.php | 28 + .../Handler/AbstractProcessingHandler.php | 2 +- .../Monolog/Handler/BrowserConsoleHandler.php | 10 +- .../Monolog/Handler/DeduplicationHandler.php | 12 +- .../src/Monolog/Handler/ElasticaHandler.php | 3 +- .../Monolog/Handler/ElasticsearchHandler.php | 3 +- .../src/Monolog/Handler/ErrorLogHandler.php | 1 - .../src/Monolog/Handler/FlowdockHandler.php | 2 +- .../src/Monolog/Handler/FrankenPhpHandler.php | 100 ++ .../src/Monolog/Handler/LogMonsterHandler.php | 192 +++ .../Monolog/Handler/RotatingFileHandler.php | 167 ++- .../src/Monolog/Handler/StreamHandler.php | 39 +- .../Monolog/Handler/SyslogUdp/UdpSocket.php | 14 +- .../src/Monolog/Handler/SyslogUdpHandler.php | 13 +- .../Monolog/Handler/TelegramBotHandler.php | 182 ++- .../monolog/monolog/src/Monolog/Logger.php | 74 +- .../Processor/IntrospectionProcessor.php | 4 +- .../monolog/monolog/src/Monolog/Utils.php | 72 +- .../Internal/PrintableNewAnonClassNode.php | 4 +- .../Lexer/TokenEmulator/VoidCastEmulator.php | 4 +- .../lib/PhpParser/Node/ArgPlaceholder.php | 34 + .../lib/PhpParser/Node/Expr/CallLike.php | 42 +- .../lib/PhpParser/Node/Expr/FuncCall.php | 4 +- .../lib/PhpParser/Node/Expr/MethodCall.php | 5 +- .../lib/PhpParser/Node/Expr/New_.php | 5 +- .../Node/Expr/NullsafeMethodCall.php | 5 +- .../lib/PhpParser/Node/Expr/StaticCall.php | 5 +- .../lib/PhpParser/Node/Scalar/Float_.php | 9 +- .../lib/PhpParser/Node/Scalar/String_.php | 5 +- .../php-parser/lib/PhpParser/Parser/Php7.php | 1316 +++++++++-------- .../php-parser/lib/PhpParser/Parser/Php8.php | 1308 ++++++++-------- .../lib/PhpParser/ParserAbstract.php | 4 +- .../lib/PhpParser/PrettyPrinter/Standard.php | 4 + .../lib/PhpParser/PrettyPrinterAbstract.php | 28 +- .../src/Type/ExplicitType.php | 4 +- .../type-info-extras/src/TypeFactoryTrait.php | 9 +- .../src/TypeResolver/ResolverExtrasTrait.php | 4 +- .../src/TypeResolver/StringTypeResolver.php | 2 +- upload/api/vendor/slim/slim/CHANGELOG.md | 15 +- .../Error/Renderers/JsonErrorRenderer.php | 6 +- .../Slim/Factory/Psr17/NyholmPsr17Factory.php | 11 + .../slim/slim/Slim/Handlers/ErrorHandler.php | 7 +- .../slim/Slim/Routing/FastRouteDispatcher.php | 15 +- .../slim/slim/Slim/Routing/RoutingResults.php | 19 +- .../symfony/console/Attribute/Argument.php | 4 + .../symfony/console/Attribute/Option.php | 4 + .../Exception/InvalidArgumentException.php | 8 + .../Exception/InvalidOptionException.php | 8 + .../symfony/console/Helper/OutputWrapper.php | 5 +- .../symfony/console/Helper/QuestionHelper.php | 4 +- .../symfony/console/Question/Question.php | 8 +- .../symfony/console/Resources/completion.bash | 48 +- .../symfony/console/Resources/completion.fish | 9 +- .../symfony/console/Resources/completion.zsh | 34 +- upload/api/vendor/symfony/finder/Finder.php | 8 +- .../api/vendor/symfony/finder/Gitignore.php | 33 +- .../ExcludeDirectoryFilterIterator.php | 5 +- .../Iterator/VcsIgnoredFilterIterator.php | 16 +- .../symfony/string/AbstractUnicodeString.php | 9 +- .../api/vendor/symfony/string/ByteString.php | 6 +- .../string/Inflector/EnglishInflector.php | 13 +- .../api/vendor/zircote/swagger-php/AGENTS.md | 9 +- .../zircote/swagger-php/CONTRIBUTING.md | 22 + .../api/vendor/zircote/swagger-php/ROADMAP.md | 3 +- .../vendor/zircote/swagger-php/composer.json | 10 +- .../zircote/swagger-php/phpstan.neon.dist | 6 + .../api/vendor/zircote/swagger-php/rector.php | 26 +- .../src/Annotations/AbstractAnnotation.php | 7 +- .../src/Annotations/AdditionalProperties.php | 14 - .../src/Annotations/Components.php | 20 + .../swagger-php/src/Annotations/Examples.php | 41 +- .../swagger-php/src/Annotations/Header.php | 80 +- .../swagger-php/src/Annotations/Info.php | 21 + .../swagger-php/src/Annotations/Items.php | 14 - .../src/Annotations/JsonContent.php | 10 + .../src/Annotations/JsonSchemaTrait.php | 86 ++ .../swagger-php/src/Annotations/MediaType.php | 2 + .../swagger-php/src/Annotations/Parameter.php | 1 + .../swagger-php/src/Annotations/Property.php | 2 +- .../swagger-php/src/Annotations/Schema.php | 76 +- .../src/Annotations/SecurityScheme.php | 16 +- .../src/Annotations/XmlContent.php | 10 + .../zircote/swagger-php/src/Assembler.php | 9 + .../Assembler/AbstractAttributeTranslator.php | 13 + .../Assembler/DefaultAttributeTranslator.php | 7 + .../OptionalPropertyAttributeTranslator.php | 13 + .../src/Attributes/AdditionalProperties.php | 25 +- .../swagger-php/src/Attributes/Header.php | 18 +- .../swagger-php/src/Attributes/Info.php | 2 + .../swagger-php/src/Attributes/Items.php | 45 +- .../src/Attributes/JsonContent.php | 20 + .../swagger-php/src/Attributes/Property.php | 25 +- .../swagger-php/src/Attributes/Schema.php | 25 +- .../swagger-php/src/Attributes/XmlContent.php | 20 + .../swagger-php/src/Augmenter/Cleanup.php | 76 +- .../src/Augmenter/EnumDescriptions.php | 13 +- .../swagger-php/src/Augmenter/Enums.php | 8 +- .../src/Augmenter/Inheritance/Operations.php | 2 + .../src/Augmenter/Inheritance/Schemas.php | 58 +- .../swagger-php/src/Augmenter/Names.php | 47 +- .../src/Augmenter/OperationIds.php | 8 +- .../swagger-php/src/Augmenter/PathFilter.php | 7 +- .../swagger-php/src/Augmenter/Refs.php | 30 +- .../swagger-php/src/Augmenter/Tags.php | 12 +- .../zircote/swagger-php/src/Builder.php | 7 +- .../src/Compiler/OpenApi30Compiler.php | 12 +- .../src/Compiler/OpenApi31Compiler.php | 406 ++++- .../src/Compiler/OpenApi32Compiler.php | 3 + .../zircote/swagger-php/src/Context.php | 2 +- .../src/Contracts/AttributeInterface.php | 3 + .../AttributeTranslatorInterface.php | 6 +- .../zircote/swagger-php/src/HybridBridge.php | 346 +++-- .../{Utils => Loggers}/CollectingLogger.php | 2 +- .../src/Processors/MergeJsonContent.php | 6 +- .../src/Processors/MergeXmlContent.php | 6 +- .../src/Spec/AbstractAttribute.php | 3 + .../zircote/swagger-php/src/Spec/Example.php | 6 +- .../zircote/swagger-php/src/Spec/Flow.php | 2 +- .../src/Spec/Flow/AuthorizationCode.php | 2 +- .../src/Spec/Flow/ClientCredentials.php | 2 +- .../swagger-php/src/Spec/Flow/Implicit.php | 2 +- .../swagger-php/src/Spec/Flow/Password.php | 2 +- .../zircote/swagger-php/src/Spec/Header.php | 2 +- .../zircote/swagger-php/src/Spec/Link.php | 4 +- .../swagger-php/src/Spec/MediaType/Json.php | 2 +- .../swagger-php/src/Spec/MediaType/Xml.php | 2 +- .../zircote/swagger-php/src/Spec/OpenApi.php | 3 - .../zircote/swagger-php/src/Spec/Property.php | 4 + .../zircote/swagger-php/src/Spec/Response.php | 7 + .../zircote/swagger-php/src/Spec/Schema.php | 12 +- .../zircote/swagger-php/src/Spec/Server.php | 2 +- .../swagger-php/src/Spec/ServerVariable.php | 4 +- .../zircote/swagger-php/src/Specification.php | 6 +- .../src/Specification/ComponentIndex.php | 46 +- .../src/Specification/ComponentName.php | 66 + .../Walker.php} | 13 +- .../src/Type/AbstractTypeResolver.php | 1 - .../src/Type/LegacyTypeResolver.php | 3 +- .../swagger-php/src/Type/TypeMapper.php | 99 ++ .../swagger-php/src/Type/TypeResolver.php | 22 +- .../swagger-php/src/TypeResolverInterface.php | 2 +- .../src/Utils/AttributeFactory.php | 106 +- .../zircote/swagger-php/src/Utils/Config.php | 45 + .../swagger-php/src/Utils/JsonPointer.php | 48 + .../swagger-php/src/Utils/Pipeline.php | 38 +- .../swagger-php/src/Utils/TypeMapper.php | 95 +- .../swagger-php/src/Utils/TypedList.php | 12 +- 158 files changed, 5119 insertions(+), 2158 deletions(-) create mode 100644 upload/api/vendor/monolog/monolog/src/Monolog/Formatter/RedactingFormatter.php create mode 100644 upload/api/vendor/monolog/monolog/src/Monolog/Formatter/WrappingFormatterInterface.php create mode 100644 upload/api/vendor/monolog/monolog/src/Monolog/Handler/FrankenPhpHandler.php create mode 100644 upload/api/vendor/monolog/monolog/src/Monolog/Handler/LogMonsterHandler.php create mode 100644 upload/api/vendor/nikic/php-parser/lib/PhpParser/Node/ArgPlaceholder.php rename upload/api/vendor/zircote/swagger-php/src/{Utils => Loggers}/CollectingLogger.php (96%) create mode 100644 upload/api/vendor/zircote/swagger-php/src/Specification/ComponentName.php rename upload/api/vendor/zircote/swagger-php/src/{Utils/SpecificationWalker.php => Specification/Walker.php} (86%) create mode 100644 upload/api/vendor/zircote/swagger-php/src/Type/TypeMapper.php create mode 100644 upload/api/vendor/zircote/swagger-php/src/Utils/Config.php create mode 100644 upload/api/vendor/zircote/swagger-php/src/Utils/JsonPointer.php diff --git a/upload/api/composer.lock b/upload/api/composer.lock index f1b0f52c..fda8627c 100644 --- a/upload/api/composer.lock +++ b/upload/api/composer.lock @@ -603,16 +603,16 @@ }, { "name": "monolog/monolog", - "version": "3.11.0", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "147f303310f06334f03f409e49d7ad1e275ff05a" + "reference": "72c534fc0ab181ef52d92a68382318631e301608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/147f303310f06334f03f409e49d7ad1e275ff05a", - "reference": "147f303310f06334f03f409e49d7ad1e275ff05a", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/72c534fc0ab181ef52d92a68382318631e301608", + "reference": "72c534fc0ab181ef52d92a68382318631e301608", "shasum": "" }, "require": { @@ -638,6 +638,7 @@ "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", + "psr/clock": "^1.0", "rollbar/rollbar": "^4.0", "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", @@ -656,6 +657,7 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -690,7 +692,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.11.0" + "source": "https://github.com/Seldaek/monolog/tree/3.12.0" }, "funding": [ { @@ -702,7 +704,7 @@ "type": "tidelift" } ], - "time": "2026-09-02T12:39:56+00:00" + "time": "2026-09-09T08:34:20+00:00" }, { "name": "nikic/fast-route", @@ -756,16 +758,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.8.0", + "version": "v5.9.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9e33da9553fe7786f0962b35f4e4ecf01be89def", + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def", "shasum": "" }, "require": { @@ -807,9 +809,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.9.0" }, - "time": "2026-07-04T14:30:18+00:00" + "time": "2026-09-13T18:51:52+00:00" }, { "name": "paragonie/random_compat", @@ -1460,16 +1462,16 @@ }, { "name": "radebatz/type-info-extras", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/DerManoMann/type-info-extras.git", - "reference": "95a524a74a61648b44e355cb33d38db4b17ef5ce" + "reference": "519056728bcd4b4bd883c3ee5d78774d0384e757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DerManoMann/type-info-extras/zipball/95a524a74a61648b44e355cb33d38db4b17ef5ce", - "reference": "95a524a74a61648b44e355cb33d38db4b17ef5ce", + "url": "https://api.github.com/repos/DerManoMann/type-info-extras/zipball/519056728bcd4b4bd883c3ee5d78774d0384e757", + "reference": "519056728bcd4b4bd883c3ee5d78774d0384e757", "shasum": "" }, "require": { @@ -1516,9 +1518,9 @@ ], "support": { "issues": "https://github.com/DerManoMann/type-info-extras/issues", - "source": "https://github.com/DerManoMann/type-info-extras/tree/1.0.7" + "source": "https://github.com/DerManoMann/type-info-extras/tree/1.0.8" }, - "time": "2026-03-06T22:40:29+00:00" + "time": "2026-09-08T08:46:24+00:00" }, { "name": "ralouphie/getallheaders", @@ -1761,16 +1763,16 @@ }, { "name": "symfony/console", - "version": "v7.4.18", + "version": "v7.4.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "23d6f88a29f6d0eac45bd77d70307adf83ba7ab0" + "reference": "3a1973458b153f566a8d7499bc06ece323d60063" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/23d6f88a29f6d0eac45bd77d70307adf83ba7ab0", - "reference": "23d6f88a29f6d0eac45bd77d70307adf83ba7ab0", + "url": "https://api.github.com/repos/symfony/console/zipball/3a1973458b153f566a8d7499bc06ece323d60063", + "reference": "3a1973458b153f566a8d7499bc06ece323d60063", "shasum": "" }, "require": { @@ -1835,7 +1837,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.18" + "source": "https://github.com/symfony/console/tree/v7.4.19" }, "funding": [ { @@ -1855,7 +1857,7 @@ "type": "tidelift" } ], - "time": "2026-08-25T14:18:37+00:00" + "time": "2026-09-13T10:38:41+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1930,16 +1932,16 @@ }, { "name": "symfony/finder", - "version": "v7.4.17", + "version": "v7.4.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6" + "reference": "1b900bc6ae5ba60c5eee69c11ba44566190576fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", - "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", + "url": "https://api.github.com/repos/symfony/finder/zipball/1b900bc6ae5ba60c5eee69c11ba44566190576fe", + "reference": "1b900bc6ae5ba60c5eee69c11ba44566190576fe", "shasum": "" }, "require": { @@ -1974,7 +1976,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.17" + "source": "https://github.com/symfony/finder/tree/v7.4.19" }, "funding": [ { @@ -1994,7 +1996,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T12:09:28+00:00" + "time": "2026-09-10T19:14:10+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2420,16 +2422,16 @@ }, { "name": "symfony/string", - "version": "v7.4.15", + "version": "v7.4.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e394af32256bf9e7bf80849d95e589167c10097b" + "reference": "02731ce2bd26514bec9efc0baef2cd0b0cf67f46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e394af32256bf9e7bf80849d95e589167c10097b", - "reference": "e394af32256bf9e7bf80849d95e589167c10097b", + "url": "https://api.github.com/repos/symfony/string/zipball/02731ce2bd26514bec9efc0baef2cd0b0cf67f46", + "reference": "02731ce2bd26514bec9efc0baef2cd0b0cf67f46", "shasum": "" }, "require": { @@ -2487,7 +2489,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.15" + "source": "https://github.com/symfony/string/tree/v7.4.19" }, "funding": [ { @@ -2507,7 +2509,7 @@ "type": "tidelift" } ], - "time": "2026-07-28T07:33:02+00:00" + "time": "2026-09-11T14:46:58+00:00" }, { "name": "symfony/type-info", @@ -2670,16 +2672,16 @@ }, { "name": "zircote/swagger-php", - "version": "6.7.1", + "version": "6.9.0", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "fc4c4288623406cd1b4679409cd6aefdbd774827" + "reference": "839d6b65c06737e4243635d6f81cbbe13022aa5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/fc4c4288623406cd1b4679409cd6aefdbd774827", - "reference": "fc4c4288623406cd1b4679409cd6aefdbd774827", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/839d6b65c06737e4243635d6f81cbbe13022aa5a", + "reference": "839d6b65c06737e4243635d6f81cbbe13022aa5a", "shasum": "" }, "require": { @@ -2698,10 +2700,10 @@ }, "require-dev": { "doctrine/annotations": "^2.0", - "friendsofphp/php-cs-fixer": "^3.62", - "phpstan/phpstan": "^2.2", + "friendsofphp/php-cs-fixer": "3.95.23", + "phpstan/phpstan": "2.2.12", "phpunit/phpunit": "^11.5 || >=12.5.22", - "rector/rector": "^2.3" + "rector/rector": "2.6.5" }, "bin": [ "bin/openapi" @@ -2747,7 +2749,7 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/6.7.1" + "source": "https://github.com/zircote/swagger-php/tree/6.9.0" }, "funding": [ { @@ -2755,22 +2757,22 @@ "type": "github" } ], - "time": "2026-08-30T07:08:23+00:00" + "time": "2026-09-13T22:58:11+00:00" } ], "packages-dev": [ { "name": "guzzlehttp/guzzle", - "version": "8.1.0", + "version": "8.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "2cdae51a4a02c3fe2c38d42e25a7bb952e27b768" + "reference": "93939470950a9b11e2e84204166ef5e048c55fe4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/2cdae51a4a02c3fe2c38d42e25a7bb952e27b768", - "reference": "2cdae51a4a02c3fe2c38d42e25a7bb952e27b768", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93939470950a9b11e2e84204166ef5e048c55fe4", + "reference": "93939470950a9b11e2e84204166ef5e048c55fe4", "shasum": "" }, "require": { @@ -2790,7 +2792,7 @@ "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "guzzle/client-integration-tests": "4.0.1", - "guzzlehttp/test-server": "^1.0", + "guzzlehttp/test-server": "^1.0.1", "php-http/message-factory": "^1.1", "phpunit/phpunit": "^9.6.34", "psr/log": "^1.1 || ^2.0 || ^3.0" @@ -2867,7 +2869,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/8.1.0" + "source": "https://github.com/guzzle/guzzle/tree/8.2.0" }, "funding": [ { @@ -2883,7 +2885,7 @@ "type": "tidelift" } ], - "time": "2026-08-24T11:07:02+00:00" + "time": "2026-09-06T13:55:09+00:00" }, { "name": "guzzlehttp/promises", @@ -3612,16 +3614,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.34", + "version": "12.5.35", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f" + "reference": "345ac22e42cb14cdc7aa8428655d8bb8c82a4aab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f", - "reference": "6cbff63d670de92cb1cb3d2ff9f40327e9da9c7f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/345ac22e42cb14cdc7aa8428655d8bb8c82a4aab", + "reference": "345ac22e42cb14cdc7aa8428655d8bb8c82a4aab", "shasum": "" }, "require": { @@ -3690,7 +3692,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.34" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.35" }, "funding": [ { @@ -3698,7 +3700,7 @@ "type": "other" } ], - "time": "2026-08-27T08:38:28+00:00" + "time": "2026-09-09T04:48:50+00:00" }, { "name": "psr/http-client", diff --git a/upload/api/vendor/composer/installed.json b/upload/api/vendor/composer/installed.json index 50c1bec5..fc82d6f3 100644 --- a/upload/api/vendor/composer/installed.json +++ b/upload/api/vendor/composer/installed.json @@ -621,17 +621,17 @@ }, { "name": "monolog/monolog", - "version": "3.10.0", - "version_normalized": "3.10.0.0", + "version": "3.12.0", + "version_normalized": "3.12.0.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" + "reference": "72c534fc0ab181ef52d92a68382318631e301608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/72c534fc0ab181ef52d92a68382318631e301608", + "reference": "72c534fc0ab181ef52d92a68382318631e301608", "shasum": "" }, "require": { @@ -657,6 +657,7 @@ "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", + "psr/clock": "^1.0", "rollbar/rollbar": "^4.0", "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", @@ -675,10 +676,11 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, - "time": "2026-01-02T08:56:05+00:00", + "time": "2026-09-09T08:34:20+00:00", "type": "library", "extra": { "branch-alias": { @@ -711,7 +713,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.10.0" + "source": "https://github.com/Seldaek/monolog/tree/3.12.0" }, "funding": [ { @@ -780,17 +782,17 @@ }, { "name": "nikic/php-parser", - "version": "v5.8.0", - "version_normalized": "5.8.0.0", + "version": "v5.9.0", + "version_normalized": "5.9.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9e33da9553fe7786f0962b35f4e4ecf01be89def", + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def", "shasum": "" }, "require": { @@ -802,7 +804,7 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^9.0" }, - "time": "2026-07-04T14:30:18+00:00", + "time": "2026-09-13T18:51:52+00:00", "bin": [ "bin/php-parse" ], @@ -834,7 +836,7 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.9.0" }, "install-path": "../nikic/php-parser" }, @@ -1523,17 +1525,17 @@ }, { "name": "radebatz/type-info-extras", - "version": "1.0.7", - "version_normalized": "1.0.7.0", + "version": "1.0.8", + "version_normalized": "1.0.8.0", "source": { "type": "git", "url": "https://github.com/DerManoMann/type-info-extras.git", - "reference": "95a524a74a61648b44e355cb33d38db4b17ef5ce" + "reference": "519056728bcd4b4bd883c3ee5d78774d0384e757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DerManoMann/type-info-extras/zipball/95a524a74a61648b44e355cb33d38db4b17ef5ce", - "reference": "95a524a74a61648b44e355cb33d38db4b17ef5ce", + "url": "https://api.github.com/repos/DerManoMann/type-info-extras/zipball/519056728bcd4b4bd883c3ee5d78774d0384e757", + "reference": "519056728bcd4b4bd883c3ee5d78774d0384e757", "shasum": "" }, "require": { @@ -1546,7 +1548,7 @@ "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^11.0" }, - "time": "2026-03-06T22:40:29+00:00", + "time": "2026-09-08T08:46:24+00:00", "type": "library", "extra": { "branch-alias": { @@ -1582,7 +1584,7 @@ ], "support": { "issues": "https://github.com/DerManoMann/type-info-extras/issues", - "source": "https://github.com/DerManoMann/type-info-extras/tree/1.0.7" + "source": "https://github.com/DerManoMann/type-info-extras/tree/1.0.8" }, "install-path": "../radebatz/type-info-extras" }, @@ -1717,17 +1719,17 @@ }, { "name": "slim/slim", - "version": "4.15.2", - "version_normalized": "4.15.2.0", + "version": "4.15.3", + "version_normalized": "4.15.3.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "e12cb05ca2a14e8f459d019e87a31dc915b80470" + "reference": "3675bf6baac66b07032575b7bef4200b60b7974b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/e12cb05ca2a14e8f459d019e87a31dc915b80470", - "reference": "e12cb05ca2a14e8f459d019e87a31dc915b80470", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/3675bf6baac66b07032575b7bef4200b60b7974b", + "reference": "3675bf6baac66b07032575b7bef4200b60b7974b", "shasum": "" }, "require": { @@ -1765,7 +1767,7 @@ "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." }, - "time": "2026-05-22T08:00:12+00:00", + "time": "2026-09-01T17:11:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1836,17 +1838,17 @@ }, { "name": "symfony/console", - "version": "v7.4.18", - "version_normalized": "7.4.18.0", + "version": "v7.4.19", + "version_normalized": "7.4.19.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "23d6f88a29f6d0eac45bd77d70307adf83ba7ab0" + "reference": "3a1973458b153f566a8d7499bc06ece323d60063" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/23d6f88a29f6d0eac45bd77d70307adf83ba7ab0", - "reference": "23d6f88a29f6d0eac45bd77d70307adf83ba7ab0", + "url": "https://api.github.com/repos/symfony/console/zipball/3a1973458b153f566a8d7499bc06ece323d60063", + "reference": "3a1973458b153f566a8d7499bc06ece323d60063", "shasum": "" }, "require": { @@ -1879,7 +1881,7 @@ "symfony/stopwatch": "^6.4|^7.0|^8.0", "symfony/var-dumper": "^6.4|^7.0|^8.0" }, - "time": "2026-08-25T14:18:37+00:00", + "time": "2026-09-13T10:38:41+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1913,7 +1915,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.18" + "source": "https://github.com/symfony/console/tree/v7.4.19" }, "funding": [ { @@ -2011,17 +2013,17 @@ }, { "name": "symfony/finder", - "version": "v7.4.17", - "version_normalized": "7.4.17.0", + "version": "v7.4.19", + "version_normalized": "7.4.19.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6" + "reference": "1b900bc6ae5ba60c5eee69c11ba44566190576fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", - "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", + "url": "https://api.github.com/repos/symfony/finder/zipball/1b900bc6ae5ba60c5eee69c11ba44566190576fe", + "reference": "1b900bc6ae5ba60c5eee69c11ba44566190576fe", "shasum": "" }, "require": { @@ -2030,7 +2032,7 @@ "require-dev": { "symfony/filesystem": "^6.4|^7.0|^8.0" }, - "time": "2026-08-21T12:09:28+00:00", + "time": "2026-09-10T19:14:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2058,7 +2060,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.17" + "source": "https://github.com/symfony/finder/tree/v7.4.19" }, "funding": [ { @@ -2519,17 +2521,17 @@ }, { "name": "symfony/string", - "version": "v7.4.15", - "version_normalized": "7.4.15.0", + "version": "v7.4.19", + "version_normalized": "7.4.19.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e394af32256bf9e7bf80849d95e589167c10097b" + "reference": "02731ce2bd26514bec9efc0baef2cd0b0cf67f46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e394af32256bf9e7bf80849d95e589167c10097b", - "reference": "e394af32256bf9e7bf80849d95e589167c10097b", + "url": "https://api.github.com/repos/symfony/string/zipball/02731ce2bd26514bec9efc0baef2cd0b0cf67f46", + "reference": "02731ce2bd26514bec9efc0baef2cd0b0cf67f46", "shasum": "" }, "require": { @@ -2550,7 +2552,7 @@ "symfony/translation-contracts": "^2.5|^3.0", "symfony/var-exporter": "^6.4|^7.0|^8.0" }, - "time": "2026-07-28T07:33:02+00:00", + "time": "2026-09-11T14:46:58+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2589,7 +2591,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.15" + "source": "https://github.com/symfony/string/tree/v7.4.19" }, "funding": [ { @@ -2778,17 +2780,17 @@ }, { "name": "zircote/swagger-php", - "version": "6.7.1", - "version_normalized": "6.7.1.0", + "version": "6.9.0", + "version_normalized": "6.9.0.0", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "fc4c4288623406cd1b4679409cd6aefdbd774827" + "reference": "839d6b65c06737e4243635d6f81cbbe13022aa5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/fc4c4288623406cd1b4679409cd6aefdbd774827", - "reference": "fc4c4288623406cd1b4679409cd6aefdbd774827", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/839d6b65c06737e4243635d6f81cbbe13022aa5a", + "reference": "839d6b65c06737e4243635d6f81cbbe13022aa5a", "shasum": "" }, "require": { @@ -2807,12 +2809,12 @@ }, "require-dev": { "doctrine/annotations": "^2.0", - "friendsofphp/php-cs-fixer": "^3.62", - "phpstan/phpstan": "^2.2", + "friendsofphp/php-cs-fixer": "3.95.23", + "phpstan/phpstan": "2.2.12", "phpunit/phpunit": "^11.5 || >=12.5.22", - "rector/rector": "^2.3" + "rector/rector": "2.6.5" }, - "time": "2026-08-30T07:08:23+00:00", + "time": "2026-09-13T22:58:11+00:00", "bin": [ "bin/openapi" ], @@ -2858,7 +2860,7 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/6.7.1" + "source": "https://github.com/zircote/swagger-php/tree/6.9.0" }, "funding": [ { diff --git a/upload/api/vendor/composer/installed.php b/upload/api/vendor/composer/installed.php index 4cf5d0b6..02ecf786 100644 --- a/upload/api/vendor/composer/installed.php +++ b/upload/api/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'devcraftclub/dle-api', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '1f5ef6d9a7670911fdceaf45258405c2122dd6b2', + 'reference' => 'df679e997fb055ef2c162dea47e34cddae091a9b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,7 +22,7 @@ 'devcraftclub/dle-api' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '1f5ef6d9a7670911fdceaf45258405c2122dd6b2', + 'reference' => 'df679e997fb055ef2c162dea47e34cddae091a9b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -104,9 +104,9 @@ ), ), 'monolog/monolog' => array( - 'pretty_version' => '3.10.0', - 'version' => '3.10.0.0', - 'reference' => 'b321dd6749f0bf7189444158a3ce785cc16d69b0', + 'pretty_version' => '3.12.0', + 'version' => '3.12.0.0', + 'reference' => '72c534fc0ab181ef52d92a68382318631e301608', 'type' => 'library', 'install_path' => __DIR__ . '/../monolog/monolog', 'aliases' => array(), @@ -122,9 +122,9 @@ 'dev_requirement' => false, ), 'nikic/php-parser' => array( - 'pretty_version' => 'v5.8.0', - 'version' => '5.8.0.0', - 'reference' => '044a6a392ff8ad0d61f14370a5fbbd0a0107152f', + 'pretty_version' => 'v5.9.0', + 'version' => '5.9.0.0', + 'reference' => '9e33da9553fe7786f0962b35f4e4ecf01be89def', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), @@ -270,9 +270,9 @@ ), ), 'radebatz/type-info-extras' => array( - 'pretty_version' => '1.0.7', - 'version' => '1.0.7.0', - 'reference' => '95a524a74a61648b44e355cb33d38db4b17ef5ce', + 'pretty_version' => '1.0.8', + 'version' => '1.0.8.0', + 'reference' => '519056728bcd4b4bd883c3ee5d78774d0384e757', 'type' => 'library', 'install_path' => __DIR__ . '/../radebatz/type-info-extras', 'aliases' => array(), @@ -297,18 +297,18 @@ 'dev_requirement' => false, ), 'slim/slim' => array( - 'pretty_version' => '4.15.2', - 'version' => '4.15.2.0', - 'reference' => 'e12cb05ca2a14e8f459d019e87a31dc915b80470', + 'pretty_version' => '4.15.3', + 'version' => '4.15.3.0', + 'reference' => '3675bf6baac66b07032575b7bef4200b60b7974b', 'type' => 'library', 'install_path' => __DIR__ . '/../slim/slim', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/console' => array( - 'pretty_version' => 'v7.4.18', - 'version' => '7.4.18.0', - 'reference' => '23d6f88a29f6d0eac45bd77d70307adf83ba7ab0', + 'pretty_version' => 'v7.4.19', + 'version' => '7.4.19.0', + 'reference' => '3a1973458b153f566a8d7499bc06ece323d60063', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), @@ -324,9 +324,9 @@ 'dev_requirement' => false, ), 'symfony/finder' => array( - 'pretty_version' => 'v7.4.17', - 'version' => '7.4.17.0', - 'reference' => '5ce28827081f6d1f0c32eaf3882750f19cb5bbe6', + 'pretty_version' => 'v7.4.19', + 'version' => '7.4.19.0', + 'reference' => '1b900bc6ae5ba60c5eee69c11ba44566190576fe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), @@ -378,9 +378,9 @@ 'dev_requirement' => false, ), 'symfony/string' => array( - 'pretty_version' => 'v7.4.15', - 'version' => '7.4.15.0', - 'reference' => 'e394af32256bf9e7bf80849d95e589167c10097b', + 'pretty_version' => 'v7.4.19', + 'version' => '7.4.19.0', + 'reference' => '02731ce2bd26514bec9efc0baef2cd0b0cf67f46', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), @@ -405,9 +405,9 @@ 'dev_requirement' => false, ), 'zircote/swagger-php' => array( - 'pretty_version' => '6.7.1', - 'version' => '6.7.1.0', - 'reference' => 'fc4c4288623406cd1b4679409cd6aefdbd774827', + 'pretty_version' => '6.9.0', + 'version' => '6.9.0.0', + 'reference' => '839d6b65c06737e4243635d6f81cbbe13022aa5a', 'type' => 'library', 'install_path' => __DIR__ . '/../zircote/swagger-php', 'aliases' => array(), diff --git a/upload/api/vendor/monolog/monolog/CHANGELOG.md b/upload/api/vendor/monolog/monolog/CHANGELOG.md index 2c89f9d1..a94f2ff2 100644 --- a/upload/api/vendor/monolog/monolog/CHANGELOG.md +++ b/upload/api/vendor/monolog/monolog/CHANGELOG.md @@ -1,3 +1,32 @@ +### 3.12.0 (2026-09-09) + + * Added support for reading the timestamp of new records from a PSR-20 clock, via a new `$clock` constructor param and `Logger::setClock()` (#2065) + * Added support for `#[WithMonologChannel]` on constructor/method parameters, so a channel can be bound to a single argument instead of the whole class (#2068) + * Fixed `TelegramBotHandler` breaking HTML markup when truncating or splitting long messages, open tags are now closed at the end of a chunk and reopened in the next one (#2066) + * Fixed `RedactingFormatter` not redacting secrets nested inside array values of sensitive keys (#2067) + +### 3.11.0 (2026-09-02) + + * Security: Fixed potential XSS in `BrowserConsoleHandler` when logging user provided content + * Added `RedactingFormatter` to automatically redact sensitive data from records, based on key names, `#[SensitiveParameter]` constructor params and/or regex patterns (#2041) + * Added `FrankenPhpHandler` to log records via FrankenPHP's frankenphp_log() function (#2056) + * Added `LogMonsterHandler` which complains if the code did not log enough records before the process/request ends, like a dead man's switch for logs (#2039) + * Added `FILE_PER_HOUR` rotation mode to `RotatingFileHandler` (#2040) + * Added `ErrorHandler::captureStackTraces()` to attach the stack trace of PHP errors to the records it generates (#2060) + * Added `NormalizerFormatter::setMaxTraceLength()` to limit how many stack trace frames are included when normalizing exceptions (#2015) + * Added extension points to `TelegramBotHandler` to change the API URL (e.g. for a self-hosted Bot API server) and to send extra curl headers (#2029) + * Added ability to override `IntrospectionProcessor`'s `SKIP_FUNCTIONS` in subclasses (#2050) + * Added `$maxLength` param to `SyslogUdpHandler`/`UdpSocket` to keep datagrams below the path MTU, as fragmented UDP packets are often dropped (#2049) + * Fixed `StreamHandler` truncating writes on non-blocking streams, it now loops until the whole record is written (#2016) + * Fixed stack trace frames without file/line being skipped, they are now reported as `internal[function]` entries so traces are not truncated or empty (#2061) + * Fixed `RotatingFileHandler` cleanup not finding files behind stream wrappers (e.g. private://) as glob() cannot see through those (#2058) + * Fixed `RotatingFileHandler` not using the configured timezone when computing the next rotation time (#2022) + * Fixed scalars being replaced by the "Over N levels deep" message instead of being output when the max normalization depth is reached (#2042) + * Fixed `DeduplicationHandler` failing with an undefined array key error when the store file is written to concurrently (#2020) + * Fixed `TelegramBotHandler` swallowing errors when the API returns a non-JSON response (#2030) + * Fixed `AbstractProcessingHandler::handle()` reading `$bubble` directly instead of calling `getBubble()`, so overrides of it were ignored (#2031) + * Fixed warning on PHP 8.5 when `ErrorHandler` sets the HTTP response code and a status line was already registered (#2027) + ### 3.10.0 (2026-01-02) * Added automatic directory cleanup in RotatingFileHandler (#2000) diff --git a/upload/api/vendor/monolog/monolog/composer.json b/upload/api/vendor/monolog/monolog/composer.json index b0fb2d7a..a547ea06 100644 --- a/upload/api/vendor/monolog/monolog/composer.json +++ b/upload/api/vendor/monolog/monolog/composer.json @@ -32,6 +32,7 @@ "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", + "psr/clock": "^1.0", "rollbar/rollbar": "^4.0", "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", @@ -51,7 +52,8 @@ "ext-mbstring": "Allow to work properly with unicode symbols", "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-openssl": "Required to send log messages using SSL" + "ext-openssl": "Required to send log messages using SSL", + "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records" }, "autoload": { "psr-4": {"Monolog\\": "src/Monolog"} diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php b/upload/api/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php index 862e05b3..0feb213e 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php @@ -12,14 +12,15 @@ namespace Monolog\Attribute; /** - * A reusable attribute to help configure a class as expecting a given logger channel. + * A reusable attribute to help configure a class, or one of its constructor/method arguments, + * as expecting a given logger channel. * * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. * * Using it with the Monolog library only has no effect at all: wiring the logger instance into * other classes is not managed by Monolog. */ -#[\Attribute(\Attribute::TARGET_CLASS)] +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PARAMETER)] final class WithMonologChannel { public function __construct( diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/upload/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php index 805f2dfd..c10f7be6 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -41,6 +41,9 @@ class ErrorHandler private bool $hasFatalErrorHandler = false; + /** @var int bitmask of E_* constants to capture stack traces for, 0 to disable */ + private int $captureStackTraceTypes = 0; + private string $fatalLevel = LogLevel::ALERT; private string|null $reservedMemory = null; @@ -139,6 +142,30 @@ public function registerFatalHandler($level = null, int $reservedMemorySize = 20 return $this; } + /** + * Attaches an ErrorException carrying the stack trace of the error to the log record's context + * + * PHP does not report where a warning/notice/deprecation came from, so without this the records + * only point at the line which raised the error, and not at its caller. Formatters rendering + * stack traces (e.g. LineFormatter::includeStacktraces) then show the full call site. + * + * This is off by default because context.exception makes errors look like exceptions to the + * handlers which treat that key specially, e.g. NewRelicHandler reports them via + * newrelic_notice_error and RollbarHandler as exception occurrences, and because formatters + * extending NormalizerFormatter then include the whole trace in every record. Narrowing + * $errorTypes is wise if you log a lot of errors: E_DEPRECATED in particular can be very + * frequent in legacy code while rarely being worth a stack trace. + * + * @param int $errorTypes bitmask of E_* constants to capture stack traces for + * @return $this + */ + public function captureStackTraces(bool $capture = true, int $errorTypes = E_ALL): self + { + $this->captureStackTraceTypes = $capture ? $errorTypes : 0; + + return $this; + } + /** * @return array */ @@ -195,7 +222,8 @@ private function handleException(\Throwable $e): never } if (!headers_sent() && \in_array(strtolower((string) \ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { - http_response_code(500); + // PHP 8.5+ warns if header('HTTP/...') already staged a status line, which is undetectable from userland + @http_response_code(500); } exit(255); @@ -207,13 +235,23 @@ private function handleError(int $code, string $message, string $file = '', int return false; } + $isFatal = $this->hasFatalErrorHandler && \in_array($code, self::FATAL_ERRORS, true); + + $trace = null; + if ($isFatal || 0 !== ($this->captureStackTraceTypes & $code)) { + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + array_shift($trace); // Exclude handleError from trace + } + // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries - if (!$this->hasFatalErrorHandler || !\in_array($code, self::FATAL_ERRORS, true)) { + if (!$isFatal) { $level = $this->errorLevelMap[$code] ?? LogLevel::CRITICAL; - $this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]); + $context = ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]; + if (null !== $trace) { + $context['exception'] = self::createErrorException($code, $message, $file, $line, $trace); + } + $this->logger->log($level, self::codeToString($code).': '.$message, $context); } else { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - array_shift($trace); // Exclude handleError from trace $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; } @@ -240,11 +278,17 @@ public function handleFatalError(): void $lastError = error_get_last(); } if (\is_array($lastError) && \in_array($lastError['type'], self::FATAL_ERRORS, true)) { + // PHP 8.5+ reports a trace for fatal errors which never reach the error handler (OOM, timeouts) $trace = $lastError['trace'] ?? null; + $context = ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace]; + if (\is_array($trace)) { + /** @var list> $trace */ + $context['exception'] = self::createErrorException($lastError['type'], $lastError['message'], $lastError['file'], $lastError['line'], $trace); + } $this->logger->log( $this->fatalLevel, 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] + $context ); if ($this->logger instanceof Logger) { @@ -255,6 +299,20 @@ public function handleFatalError(): void } } + /** + * @param list> $trace + */ + private static function createErrorException(int $code, string $message, string $file, int $line, array $trace): \ErrorException + { + $e = new \ErrorException($message, 0, $code, $file, $line); + + // Exception::getTrace() is final, so overwriting the private property is the only way to + // report the real call site instead of ErrorHandler's own frame + (new \ReflectionProperty(\Exception::class, 'trace'))->setValue($e, $trace); + + return $e; + } + private static function codeToString(int $code): string { return match ($code) { diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php index bf8ed241..4774bde0 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -87,11 +87,11 @@ public function __construct(?string $systemName = null, ?string $extraPrefix = n public function format(LogRecord $record): Message { $context = $extra = []; - if (isset($record->context)) { + if ($record->context !== []) { /** @var array|bool|float|int|string|null> $context */ $context = parent::normalize($record->context); } - if (isset($record->extra)) { + if ($record->extra !== []) { /** @var array|bool|float|int|string|null> $extra */ $extra = parent::normalize($record->extra); } @@ -110,7 +110,7 @@ public function format(LogRecord $record): Message $message->setShortMessage(Utils::substr($record->message, 0, $this->maxLength)); } - if (isset($record->channel)) { + if ($record->channel !== '') { $message->setAdditional('facility', $record->channel); } diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php index fa11d0ef..c9281a42 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -160,6 +160,10 @@ protected function formatBatchNewlines(array $records): string */ protected function normalize(mixed $data, int $depth = 0): mixed { + if (is_null($data) || is_scalar($data)) { + return $data; + } + if ($depth > $this->maxNormalizeDepth) { return 'Over '.$this->maxNormalizeDepth.' levels deep, aborting normalization'; } @@ -209,11 +213,7 @@ protected function normalize(mixed $data, int $depth = 0): mixed return $data; } - if (\is_resource($data)) { - return parent::normalize($data); - } - - return $data; + return parent::normalize($data); } /** diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index 60da29cf..7fc6de46 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -28,6 +28,7 @@ class NormalizerFormatter implements FormatterInterface protected string $dateFormat; protected int $maxNormalizeDepth = 9; protected int $maxNormalizeItemCount = 1000; + protected ?int $maxTraceLength = null; private int $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS; @@ -122,6 +123,24 @@ public function setMaxNormalizeItemCount(int $maxNormalizeItemCount): self return $this; } + /** + * The maximum number of stack trace frames to include + */ + public function getMaxTraceLength(): ?int + { + return $this->maxTraceLength; + } + + /** + * @return $this + */ + public function setMaxTraceLength(?int $maxTraceLength): self + { + $this->maxTraceLength = $maxTraceLength; + + return $this; + } + /** * Enables `json_encode` pretty print. * @@ -174,10 +193,6 @@ protected function normalizeRecord(LogRecord $record): array */ protected function normalize(mixed $data, int $depth = 0): mixed { - if ($depth > $this->maxNormalizeDepth) { - return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - } - if (null === $data || \is_scalar($data)) { if (\is_float($data)) { if (is_infinite($data)) { @@ -191,6 +206,10 @@ protected function normalize(mixed $data, int $depth = 0): mixed return $data; } + if ($depth > $this->maxNormalizeDepth) { + return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + } + if (\is_array($data)) { $normalized = []; @@ -290,14 +309,36 @@ protected function normalizeException(Throwable $e, int $depth = 0) } } - $trace = $e->getTrace(); + $trace = array_slice($e->getTrace(), 0, $this->maxTraceLength); foreach ($trace as $frame) { - if (isset($frame['file'], $frame['line'])) { + if (isset($frame['file'])) { $file = $frame['file']; if ($this->basePath !== '') { - $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); + $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file) ?? $file; + } + $data['trace'][] = $file.':'.($frame['line'] ?? 0); + } else { + // Frames called by the engine itself have no file/line: shutdown functions, + // callbacks run by internal functions, destructors. Skipping them made traces + // look shorter than they were, and entirely empty for fatal errors caught in a + // shutdown function, so they are reported by name instead. + $call = $frame['function']; + // since PHP 8.4 a closure is named after its declaring scope, which already + // includes the class, so prefixing it again would just repeat it + if (isset($frame['class']) && !str_starts_with($call, '{closure:')) { + // before 8.4 the name is \{closure}, and the class has the namespace + $call = str_ends_with($call, '\{closure}') ? '{closure}' : $call; + $call = Utils::getClassName($frame['class']).($frame['type'] ?? '::').$call; + } + // anonymous classes carry their declaration site after a NUL byte, which truncates + // syslog lines and is not valid JSON; PHP 8.4 embeds it in closure names too + $call = preg_replace('{@anonymous\x00.*?\$[0-9a-f]++(?=::|$)}s', '@anonymous', $call) ?? $call; + if ($this->basePath !== '') { + // closure names embed the file they were declared in since PHP 8.4, so the + // pattern cannot be anchored; limit it or a recurring base path is stripped twice + $call = preg_replace('{'.preg_quote($this->basePath).'}', '', $call, 1) ?? $call; } - $data['trace'][] = $file.':'.$frame['line']; + $data['trace'][] = 'internal['.$call.']:0'; } } diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/RedactingFormatter.php b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/RedactingFormatter.php new file mode 100644 index 00000000..d97a66a1 --- /dev/null +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/RedactingFormatter.php @@ -0,0 +1,373 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; +use Monolog\Utils; + +/** + * Wraps another formatter to redact sensitive data from log records. + * + * It works in three passes so that it can mask secrets wherever they end up: + * + * - Before delegating, it masks the value of any context/extra key whose name + * matches one of the configured sensitive keys (case-insensitive, recursive). + * - After delegating, it removes those same secret values from the wrapped + * formatter's output, which catches the copies masking the record cannot + * reach, e.g. a secret interpolated into the message by the + * PsrLogMessageProcessor or embedded in an exception message. + * - Last, it runs the configured regex patterns over the output, which catches + * secrets that only became strings once the inner formatter normalized + * objects (e.g. tokens buried in an exception stack trace). If a pattern + * cannot be applied, the record is dropped instead of emitted unredacted. + * + * On top of the sensitive keys, secrets are also read from the properties of the + * objects in the record matching a constructor parameter marked + * #[SensitiveParameter]. Those can only be handled by the output pass, as the + * objects carrying them cannot be modified. This is the one part that reflects on + * every logged object, so it can be turned off with $redactSensitiveParameters. + * + * Only string and array output can be swept, so wrapping a formatter which returns + * objects (e.g. the ElasticaFormatter) leaves you with the key masking alone. + * + * Because it is a formatter rather than a processor, it is guaranteed to run + * after every processor (both Logger- and Handler-level), so it always sees the + * final record with all data at hand. + * + * @author Jordi Boggiano + */ +final class RedactingFormatter implements WrappingFormatterInterface +{ + /** + * Matches long token-like words (30+ alphanumerics, optionally prefixed like api_key_), + * which are very likely to be secrets/tokens. Provided as an opt-in pattern as it may + * cause collateral damage on legitimate long strings (hashes, UUIDs, base64, ...). + */ + public const TOKEN_PATTERN = '{\b(?:[a-z]+_)*[a-zA-Z0-9]{30,}\b}'; + + /** + * How deep to walk the record and the output, mirrors NormalizerFormatter's default + */ + private const MAX_DEPTH = 9; + + /** @var list Lowercased sensitive keys */ + private array $sensitiveKeys; + + /** @var list */ + private array $patterns; + + /** @var array> */ + private array $sensitiveProperties = []; + + /** + * @param FormatterInterface $formatter The formatter to wrap and whose output gets redacted + * @param list $sensitiveKeys Exact context/extra keys whose values to mask (case-insensitive) + * @param list $patterns PCRE patterns to mask in the formatted output (e.g. self::TOKEN_PATTERN) + * @param string $mask Replacement token + * @param bool $redactSensitiveParameters Whether to also read secrets off the properties matching a + * #[SensitiveParameter] constructor parameter, which requires + * walking and reflecting on every object in the record + * @param int $minSecretLength Minimum length a secret must have to be removed from the + * output, to avoid short values like "pass" redacting + * unrelated data + * + * @throws \InvalidArgumentException If a pattern is not a valid PCRE regex + */ + public function __construct( + private readonly FormatterInterface $formatter, + array $sensitiveKeys = ['password', 'passwd', 'pwd', 'secret', 'token', 'api_key', 'apikey', 'authorization', 'auth', 'cookie'], + array $patterns = [], + private readonly string $mask = '[REDACTED]', + private readonly bool $redactSensitiveParameters = true, + private readonly int $minSecretLength = 5, + ) { + $this->sensitiveKeys = array_values(array_map('strtolower', $sensitiveKeys)); + + foreach ($patterns as $pattern) { + if (@preg_match($pattern, '') === false) { + throw new \InvalidArgumentException(sprintf('Invalid redaction pattern provided to RedactingFormatter: %s', var_export($pattern, true))); + } + } + $this->patterns = array_values($patterns); + } + + public function getWrappedFormatter(): FormatterInterface + { + return $this->formatter; + } + + public function format(LogRecord $record) + { + // secrets must be collected before the keys get masked, as masking loses the values + $secrets = $this->collectSecrets([$record]); + + return $this->sweep($this->formatter->format($this->redactRecord($record)), $secrets); + } + + public function formatBatch(array $records) + { + $secrets = $this->collectSecrets($records); + + foreach ($records as $key => $record) { + $records[$key] = $this->redactRecord($record); + } + + return $this->sweep($this->formatter->formatBatch($records), $secrets); + } + + private function redactRecord(LogRecord $record): LogRecord + { + return $record->with( + context: $this->redactKeys($record->context), + extra: $this->redactKeys($record->extra), + ); + } + + /** + * @param array $data + * @return array + */ + private function redactKeys(array $data, int $depth = 0): array + { + // context comes from userland and can hold a self-referencing array + if ($depth > self::MAX_DEPTH) { + return $data; + } + + foreach ($data as $key => $value) { + if (\is_string($key) && \in_array(strtolower($key), $this->sensitiveKeys, true)) { + $data[$key] = $this->mask; + } elseif (\is_array($value)) { + $data[$key] = $this->redactKeys($value, $depth + 1); + } + } + + return $data; + } + + /** + * Gathers the secret values present in the given records, longest first + * + * @param iterable $records + * @return list + */ + private function collectSecrets(iterable $records): array + { + $secrets = []; + $seen = []; + foreach ($records as $record) { + $this->collect($record->context, $secrets, $seen, 0); + $this->collect($record->extra, $secrets, $seen, 0); + } + + if ([] === $secrets) { + return []; + } + + // a secret containing quotes/backslashes/newlines shows up escaped in json output, + // so both forms have to be looked for + $escapedSecrets = []; + foreach ($secrets as $secret) { + $escaped = substr(Utils::jsonEncode($secret, null, true), 1, -1); + if ($escaped !== $secret && $escaped !== '') { + $escapedSecrets[] = $escaped; + } + } + + $secrets = array_values(array_unique(array_merge($secrets, $escapedSecrets))); + // longest first, so that overlapping secrets do not leave fragments behind + usort($secrets, static fn (string $a, string $b) => \strlen($b) <=> \strlen($a)); + + return $secrets; + } + + /** + * @param list $secrets + * @param array $seen Ids of the objects visited so far, to survive cyclic graphs + */ + private function collect(mixed $data, array &$secrets, array &$seen, int $depth): void + { + if ($depth > self::MAX_DEPTH) { + return; + } + + if (\is_array($data)) { + foreach ($data as $key => $value) { + if (\is_string($key) && \in_array(strtolower($key), $this->sensitiveKeys, true)) { + // the value is masked in the record, but a nested array's leaves can still + // leak elsewhere (e.g. json-encoded by PsrLogMessageProcessor) + $this->collectSensitiveValue($value, $secrets, $depth + 1); + + continue; + } + + $this->collect($value, $secrets, $seen, $depth + 1); + } + + return; + } + + // the array walk above is essentially free, reflecting on objects is not + if (!\is_object($data) || !$this->redactSensitiveParameters) { + return; + } + + $id = spl_object_id($data); + if (isset($seen[$id])) { + return; + } + $seen[$id] = true; + + foreach ($this->getSensitiveProperties($data) as $property) { + if ($property->isInitialized($data)) { + $this->addSecret($property->getValue($data), $secrets); + } + } + + // public properties only, matching what formatters get to see, but enough to reach + // objects nested inside this one + foreach (get_object_vars($data) as $value) { + $this->collect($value, $secrets, $seen, $depth + 1); + } + } + + /** + * Collects every string leaf nested inside a value under a sensitive key. + * + * @param list $secrets + */ + private function collectSensitiveValue(mixed $value, array &$secrets, int $depth): void + { + if ($depth > self::MAX_DEPTH) { + return; + } + + if (\is_array($value)) { + foreach ($value as $item) { + $this->collectSensitiveValue($item, $secrets, $depth + 1); + } + + return; + } + + $this->addSecret($value, $secrets); + } + + /** + * Reflects the properties of an object matching a #[SensitiveParameter] constructor parameter + * + * Non-public properties are included as they can still leak through __toString(), and the + * result is cached per class as reflecting on every logged object would be far too costly. + * + * @return array + */ + private function getSensitiveProperties(object $data): array + { + $class = $data::class; + if (isset($this->sensitiveProperties[$class])) { + return $this->sensitiveProperties[$class]; + } + + $names = Utils::getSensitiveParameterNames($class); + + // PHP 8.2+ wraps the arguments it hides from stack traces in a SensitiveParameterValue, + // whose own constructor parameter is not marked. Matched by name and read as a property + // so that it does not matter whether symfony/polyfill-php82 is installed on PHP 8.1: + // naming the class makes PHPStan report either the @internal getValue() the polyfill + // inherits, or a missing class when it is absent. + if ('SensitiveParameterValue' === $class) { + $names['value'] = true; + } + + $properties = []; + foreach ($names as $name => $_) { + // walking up is required as a private property of a parent class is not + // reachable through the child's ReflectionClass + for ($reflection = new \ReflectionClass($class); false !== $reflection; $reflection = $reflection->getParentClass()) { + if ($reflection->hasProperty($name)) { + $properties[$name] = $reflection->getProperty($name); + + break; + } + } + } + + return $this->sensitiveProperties[$class] = $properties; + } + + /** + * @param list $secrets + */ + private function addSecret(mixed $value, array &$secrets): void + { + // a Stringable secret ends up in the output as its string form, so that is what + // has to be looked for + if ($value instanceof \Stringable) { + try { + $value = $value->__toString(); + } catch (\Throwable) { + return; + } + } + + // ints/floats are left out on purpose, sweeping a digit run out of the output + // would silently corrupt unrelated data + if (\is_string($value) && $value !== '' && \strlen($value) >= $this->minSecretLength) { + $secrets[] = $value; + } + } + + /** + * Removes the collected secrets and applies the configured patterns to the formatter output, + * recursing into arrays to support formatters that do not return a string (e.g. MongoDBFormatter). + * + * @param list $secrets + */ + private function sweep(mixed $formatted, array $secrets, int $depth = 0): mixed + { + if ([] === $this->patterns && [] === $secrets) { + return $formatted; + } + + // deeper than any formatter will render anyway, and a custom one may well + // hand back a self-referencing array + if ($depth > self::MAX_DEPTH) { + return $formatted; + } + + if (\is_string($formatted)) { + if ([] !== $secrets) { + $formatted = str_replace($secrets, $this->mask, $formatted); + } + if ([] !== $this->patterns) { + $replaced = preg_replace($this->patterns, $this->mask, $formatted); + if (null === $replaced) { + // the patterns could not be applied so the output cannot be trusted, drop it + // entirely. Neither the patterns (which may embed a secret themselves) nor the + // mask are reported, preg_last_error_msg() is one of a fixed set of PCRE strings + return '[RedactingFormatter dropped this record, pattern redaction failed with "'.preg_last_error_msg().'"]'; + } + $formatted = $replaced; + } + + return $formatted; + } + + if (\is_array($formatted)) { + foreach ($formatted as $key => $value) { + $formatted[$key] = $this->sweep($value, $secrets, $depth + 1); + } + } + + return $formatted; + } +} diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/WrappingFormatterInterface.php b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/WrappingFormatterInterface.php new file mode 100644 index 00000000..02a6b885 --- /dev/null +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Formatter/WrappingFormatterInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Interface for formatters decorating another formatter + * + * Handlers which only accept one specific formatter can use Utils::unwrapFormatter() + * to see through the decoration and accept a wrapped instance of that formatter. + * + * @author Jordi Boggiano + */ +interface WrappingFormatterInterface extends FormatterInterface +{ + /** + * Returns the formatter this one delegates the actual formatting to + */ + public function getWrappedFormatter(): FormatterInterface; +} diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/upload/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php index de13a76b..78bec3e6 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -43,7 +43,7 @@ public function handle(LogRecord $record): bool $this->write($record); - return false === $this->bubble; + return !$this->getBubble(); } /** diff --git a/upload/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/upload/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php index 788d7d06..6d8656b9 100644 --- a/upload/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ b/upload/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -262,10 +262,7 @@ private static function dump(string $title, array $dict): array } $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); foreach ($dict as $key => $value) { - $value = json_encode($value); - if (false === $value) { - $value = self::quote(''); - } + $value = Utils::jsonEncode($value, Utils::DEFAULT_JSON_FLAGS | JSON_HEX_TAG); $script[] = self::call('log', self::quote('%s: %o'), self::quote((string) $key), $value); } @@ -274,7 +271,10 @@ private static function dump(string $title, array $dict): array private static function quote(string $arg): string { - return '"' . addcslashes($arg, "\"\n\\") . '"'; + // JSON_HEX_TAG keeps a literal < out of the output, so that a log message cannot break out + // of the surrounding or