Skip to content

Commit 4921b8c

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: Remove comment about AppVeyor in `phpunit` [Webhook][RemoteEvent] fix SendgridPayloadConverter category support Update old Appveyor skip conditions sync the Dutch translation file with changes from the 7.2 branch [Yaml] fix inline notation with inline comment fix(property-info): make sure that SerializerExtractor returns null for invalid class metadata [RemoteEvent][Webhook] fix SendgridRequestParser & SendgridPayloadConverter in case of missing sg_message_id fix_50486 - memory leak
2 parents ff52a85 + bf598c9 commit 4921b8c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ private function lexInlineStructure(int &$cursor, string $closingTag, bool $cons
12011201
$value .= $this->currentLine[$cursor];
12021202
++$cursor;
12031203

1204-
if ($consumeUntilEol && isset($this->currentLine[$cursor]) && (strspn($this->currentLine, ' ', $cursor) + $cursor) < strlen($this->currentLine)) {
1204+
if ($consumeUntilEol && isset($this->currentLine[$cursor]) && ($whitespaces = strspn($this->currentLine, ' ', $cursor) + $cursor) < strlen($this->currentLine) && '#' !== $this->currentLine[$whitespaces]) {
12051205
throw new ParseException(sprintf('Unexpected token "%s".', trim(substr($this->currentLine, $cursor))));
12061206
}
12071207

Tests/ParserTest.php

+13
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,19 @@ public static function inlineNotationSpanningMultipleLinesProvider(): array
21582158
<<<YAML
21592159
map: {key: "value", a: "b"}
21602160
param: "some"
2161+
YAML
2162+
],
2163+
'mixed mapping with inline notation on one line with a comment' => [
2164+
[
2165+
'map' => [
2166+
'key' => 'value',
2167+
'a' => 'b',
2168+
],
2169+
'param' => 'some',
2170+
],
2171+
<<<YAML
2172+
map: {key: "value", a: "b"} # comment
2173+
param: "some"
21612174
YAML
21622175
],
21632176
'mixed mapping with compact inline notation on one line' => [

0 commit comments

Comments
 (0)