Skip to content

Commit e1718c6

Browse files
committed
Merge branch '3.1' into 3.2
* 3.1: (31 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 [Ldap] Using Ldap stored username instead of form submitted one [Ldap] load users with the good username case [DoctrineBridge] Fixed invalid unique value as composite key [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys [TwigBundle] do not lose already set method calls #20411 fix Yaml parsing for very long quoted strings ...
2 parents 50eadbd + 752bc2a commit e1718c6

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
public static $parsedLineNumber;
2929

Tests/InlineTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,4 +676,14 @@ public function testNotSupportedMissingValue()
676676
{
677677
Inline::parse('{this, is not, supported}');
678678
}
679+
680+
public function testVeryLongQuotedStrings()
681+
{
682+
$longStringWithQuotes = str_repeat("x\r\n\\\"x\"x", 1000);
683+
684+
$yamlString = Inline::dump(array('longStringWithQuotes' => $longStringWithQuotes));
685+
$arrayFromYaml = Inline::parse($yamlString);
686+
687+
$this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']);
688+
}
679689
}

0 commit comments

Comments
 (0)