1
0
Fork 0

Update deps, fix build

pull/12319/head
Jordi Boggiano 2025-02-18 14:49:46 +01:00
parent a73b127dda
commit da63c30330
No known key found for this signature in database
2 changed files with 34 additions and 41 deletions

22
composer.lock generated
View File

@ -84,16 +84,16 @@
}, },
{ {
"name": "composer/class-map-generator", "name": "composer/class-map-generator",
"version": "1.5.0", "version": "1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/class-map-generator.git", "url": "https://github.com/composer/class-map-generator.git",
"reference": "4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915" "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915", "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9",
"reference": "4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915", "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -137,7 +137,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/composer/class-map-generator/issues", "issues": "https://github.com/composer/class-map-generator/issues",
"source": "https://github.com/composer/class-map-generator/tree/1.5.0" "source": "https://github.com/composer/class-map-generator/tree/1.6.0"
}, },
"funding": [ "funding": [
{ {
@ -153,7 +153,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-11-25T16:11:06+00:00" "time": "2025-02-05T10:05:34+00:00"
}, },
{ {
"name": "composer/metadata-minifier", "name": "composer/metadata-minifier",
@ -2020,16 +2020,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.12.16", "version": "1.12.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "e0bb5cb78545aae631220735aa706eac633a6be9" "reference": "fef9f07814a573399229304bb0046affdf558812"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e0bb5cb78545aae631220735aa706eac633a6be9", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/fef9f07814a573399229304bb0046affdf558812",
"reference": "e0bb5cb78545aae631220735aa706eac633a6be9", "reference": "fef9f07814a573399229304bb0046affdf558812",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2074,7 +2074,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-01-21T14:50:05+00:00" "time": "2025-02-13T12:44:44+00:00"
}, },
{ {
"name": "phpstan/phpstan-deprecation-rules", "name": "phpstan/phpstan-deprecation-rules",

View File

@ -288,15 +288,9 @@ class JsonManipulator
return $matches['start'] . $this->format($value, 1) . $matches['end']; return $matches['start'] . $this->format($value, 1) . $matches['end'];
}, $children); }, $children);
} else { } elseif (Preg::isMatch('#^\{(?P<leadingspace>\s*?)(?P<content>\S+.*?)?(?P<trailingspace>\s*)\}$#s', $children, $match)) {
Preg::match('#^{ (?P<leadingspace>\s*?) (?P<content>\S+.*?)? (?P<trailingspace>\s*) }$#sx', $children, $match);
$whitespace = '';
if (!empty($match['trailingspace'])) {
$whitespace = $match['trailingspace']; $whitespace = $match['trailingspace'];
} if (null !== $match['content']) {
if (!empty($match['content'])) {
if ($subName !== null) { if ($subName !== null) {
$value = [$subName => $value]; $value = [$subName => $value];
} }
@ -309,11 +303,7 @@ class JsonManipulator
$children $children
); );
} else { } else {
$whitespace = '';
if (!empty($match['leadingspace'])) {
$whitespace = $match['leadingspace']; $whitespace = $match['leadingspace'];
}
$children = Preg::replace( $children = Preg::replace(
'#^{'.$whitespace.'#', '#^{'.$whitespace.'#',
addcslashes('{' . $whitespace . JsonFile::encode($name).': '.$this->format($value, 1) . ',' . $this->newline . $this->indent . $this->indent, '\\$'), addcslashes('{' . $whitespace . JsonFile::encode($name).': '.$this->format($value, 1) . ',' . $this->newline . $this->indent . $this->indent, '\\$'),
@ -328,6 +318,8 @@ class JsonManipulator
// children present but empty // children present but empty
$children = '{' . $this->newline . $this->indent . $this->indent . JsonFile::encode($name).': '.$this->format($value, 1) . $whitespace . '}'; $children = '{' . $this->newline . $this->indent . $this->indent . JsonFile::encode($name).': '.$this->format($value, 1) . $whitespace . '}';
} }
} else {
throw new \LogicException('Nothing matched above for: '.$children);
} }
$this->contents = Preg::replaceCallback($nodeRegex, static function ($m) use ($children): string { $this->contents = Preg::replaceCallback($nodeRegex, static function ($m) use ($children): string {
@ -411,8 +403,8 @@ class JsonManipulator
// no child data left, $name was the only key in // no child data left, $name was the only key in
unset($match); unset($match);
Preg::match('#^{ \s*? (?P<content>\S+.*?)? (?P<trailingspace>\s*) }$#sx', $childrenClean, $match); if (Preg::isMatch('#^\{\s*?(?P<content>\S+.*?)?(?P<trailingspace>\s*)\}$#s', $childrenClean, $match)) {
if (empty($match['content'])) { if (null === $match['content']) {
$newline = $this->newline; $newline = $this->newline;
$indent = $this->indent; $indent = $this->indent;
@ -432,6 +424,7 @@ class JsonManipulator
return true; return true;
} }
}
$this->contents = Preg::replaceCallback($nodeRegex, function ($matches) use ($name, $subName, $childrenClean): string { $this->contents = Preg::replaceCallback($nodeRegex, function ($matches) use ($name, $subName, $childrenClean): string {
assert(is_string($matches['content'])); assert(is_string($matches['content']));