diff --git a/composer.lock b/composer.lock index 3159851c3..02c5ee3b6 100644 --- a/composer.lock +++ b/composer.lock @@ -2015,16 +2015,16 @@ "packages-dev": [ { "name": "phpstan/phpstan", - "version": "1.11.1", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b" + "reference": "0d5d4294a70deb7547db655c47685d680e39cfec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b", - "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d5d4294a70deb7547db655c47685d680e39cfec", + "reference": "0d5d4294a70deb7547db655c47685d680e39cfec", "shasum": "" }, "require": { @@ -2069,7 +2069,7 @@ "type": "github" } ], - "time": "2024-05-15T08:00:59+00:00" + "time": "2024-05-24T13:23:04+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -2221,16 +2221,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "51183fefbaf4713aa81eddbd273dc59dd5e5ff71" + "reference": "d530cfebba55763732bc2421f79d2576d9d7942f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/51183fefbaf4713aa81eddbd273dc59dd5e5ff71", - "reference": "51183fefbaf4713aa81eddbd273dc59dd5e5ff71", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d530cfebba55763732bc2421f79d2576d9d7942f", + "reference": "d530cfebba55763732bc2421f79d2576d9d7942f", "shasum": "" }, "require": { @@ -2287,9 +2287,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.4.0" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.4.1" }, - "time": "2024-04-20T06:38:35+00:00" + "time": "2024-05-24T14:00:29+00:00" }, { "name": "symfony/phpunit-bridge", diff --git a/src/Composer/Json/JsonFormatter.php b/src/Composer/Json/JsonFormatter.php index 006365675..417067241 100644 --- a/src/Composer/Json/JsonFormatter.php +++ b/src/Composer/Json/JsonFormatter.php @@ -67,7 +67,7 @@ class JsonFormatter if ($unescapeUnicode && function_exists('mb_convert_encoding')) { // https://stackoverflow.com/questions/2934563/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-cha - $buffer = Preg::replaceCallback('/(\\\\+)u([0-9a-f]{4})/i', static function ($match) { + $buffer = Preg::replaceCallback('/(\\\\+)u([0-9a-f]{4})/i', static function ($match): string { assert(is_string($match[1])); assert(is_string($match[2])); $l = strlen($match[1]); @@ -77,7 +77,7 @@ class JsonFormatter // 0xD800..0xDFFF denotes UTF-16 surrogate pair which won't be unescaped // see https://github.com/composer/composer/issues/7510 if (0xD800 <= $code && 0xDFFF >= $code) { - return $match[0]; + return (string) $match[0]; } return str_repeat('\\', $l - 1) . mb_convert_encoding( @@ -87,7 +87,7 @@ class JsonFormatter ); } - return $match[0]; + return (string) $match[0]; }, $buffer); }