Skip to content

Commit 752bc2a

Browse files
committed
Merge branch '2.8' into 3.1
* 2.8: (26 commits) fixed CS fixed CS fixed CS fixer config fixed typo Revert "fixed typo" fixed typo fixed CS Avoid setting request attributes from signature arguments in AnnotationClassLoader [DependencyInjection] Add some missing typehints in YamlFileLoader [DependencyInjection] minor: Fix a DocBlock [HttpKernel] Give higher priority to adding request formats [PropertyInfo] Don't try to access a property thru a static method [PropertyInfo] Exclude static methods form properties guessing [FrameworkBundle] Fix third level headers for MarkdownDescriptor [TwigBundle] do not lose already set method calls #20411 fix Yaml parsing for very long quoted strings CS: apply is_null DX: remove invalid inheritdoc bumped Symfony version to 2.8.17 updated VERSION for 2.8.16 ...
2 parents df9f281 + 322a8c2 commit 752bc2a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class Inline
2525
{
26-
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
26+
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')';
2727

2828
private static $exceptionOnInvalidType = false;
2929
private static $objectSupport = false;

Tests/InlineTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,4 +615,14 @@ public function testNotSupportedMissingValue()
615615
{
616616
Inline::parse('{this, is not, supported}');
617617
}
618+
619+
public function testVeryLongQuotedStrings()
620+
{
621+
$longStringWithQuotes = str_repeat("x\r\n\\\"x\"x", 1000);
622+
623+
$yamlString = Inline::dump(array('longStringWithQuotes' => $longStringWithQuotes));
624+
$arrayFromYaml = Inline::parse($yamlString);
625+
626+
$this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']);
627+
}
618628
}

0 commit comments

Comments
 (0)