Skip to content

Commit 322a8c2

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: 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 [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.7.24 updated VERSION for 2.7.23 update CONTRIBUTORS for 2.7.23 updated CHANGELOG for 2.7.23 [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2 parents dbe61fe + 4f01d1b commit 322a8c2

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
@@ -21,7 +21,7 @@
2121
*/
2222
class Inline
2323
{
24-
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
24+
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')';
2525

2626
private static $exceptionOnInvalidType = false;
2727
private static $objectSupport = false;

Tests/InlineTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,14 @@ public function testNotSupportedMissingValue()
457457
{
458458
Inline::parse('{this, is not, supported}');
459459
}
460+
461+
public function testVeryLongQuotedStrings()
462+
{
463+
$longStringWithQuotes = str_repeat("x\r\n\\\"x\"x", 1000);
464+
465+
$yamlString = Inline::dump(array('longStringWithQuotes' => $longStringWithQuotes));
466+
$arrayFromYaml = Inline::parse($yamlString);
467+
468+
$this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']);
469+
}
460470
}

0 commit comments

Comments
 (0)