update v1.0.6
This commit is contained in:
4
vendor/symfony/yaml/Escaper.php
vendored
4
vendor/symfony/yaml/Escaper.php
vendored
@@ -33,13 +33,13 @@ class Escaper
|
||||
"\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f",
|
||||
"\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
|
||||
"\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
|
||||
"\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",);
|
||||
"\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9");
|
||||
private static $escaped = array('\\\\', '\\"', '\\\\', '\\"',
|
||||
'\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
|
||||
'\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
|
||||
'\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
|
||||
'\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
|
||||
'\\N', '\\_', '\\L', '\\P',);
|
||||
'\\N', '\\_', '\\L', '\\P');
|
||||
|
||||
/**
|
||||
* Determines if a PHP value would require double quoting in YAML.
|
||||
|
12
vendor/symfony/yaml/Inline.php
vendored
12
vendor/symfony/yaml/Inline.php
vendored
@@ -105,7 +105,7 @@ class Inline
|
||||
return 'null';
|
||||
case is_object($value):
|
||||
if ($objectSupport) {
|
||||
return '!!php/object:'.serialize($value);
|
||||
return '!php/object:'.serialize($value);
|
||||
}
|
||||
|
||||
if ($exceptionOnInvalidType) {
|
||||
@@ -476,6 +476,16 @@ class Inline
|
||||
return (string) substr($scalar, 5);
|
||||
case 0 === strpos($scalar, '! '):
|
||||
return (int) self::parseScalar(substr($scalar, 2));
|
||||
case 0 === strpos($scalar, '!php/object:'):
|
||||
if (self::$objectSupport) {
|
||||
return unserialize(substr($scalar, 12));
|
||||
}
|
||||
|
||||
if (self::$exceptionOnInvalidType) {
|
||||
throw new ParseException('Object support when parsing a YAML file has been disabled.');
|
||||
}
|
||||
|
||||
return;
|
||||
case 0 === strpos($scalar, '!!php/object:'):
|
||||
if (self::$objectSupport) {
|
||||
return unserialize(substr($scalar, 13));
|
||||
|
2
vendor/symfony/yaml/LICENSE
vendored
2
vendor/symfony/yaml/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2004-2015 Fabien Potencier
|
||||
Copyright (c) 2004-2016 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
37
vendor/symfony/yaml/Parser.php
vendored
37
vendor/symfony/yaml/Parser.php
vendored
@@ -238,10 +238,6 @@ class Parser
|
||||
if ($isRef) {
|
||||
$this->refs[$isRef] = $data[$key];
|
||||
}
|
||||
|
||||
if ($objectForMap && !is_object($data)) {
|
||||
$data = (object) $data;
|
||||
}
|
||||
} else {
|
||||
// multiple documents are not supported
|
||||
if ('---' === $this->currentLine) {
|
||||
@@ -305,6 +301,10 @@ class Parser
|
||||
mb_internal_encoding($mbEncoding);
|
||||
}
|
||||
|
||||
if ($objectForMap && !is_object($data)) {
|
||||
$data = (object) $data;
|
||||
}
|
||||
|
||||
return empty($data) ? null : $data;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,11 @@ class Parser
|
||||
private function getNextEmbedBlock($indentation = null, $inSequence = false)
|
||||
{
|
||||
$oldLineIndentation = $this->getCurrentLineIndentation();
|
||||
$insideBlockScalar = $this->isBlockScalarHeader();
|
||||
$blockScalarIndentations = array();
|
||||
|
||||
if ($this->isBlockScalarHeader()) {
|
||||
$blockScalarIndentations[] = $this->getCurrentLineIndentation();
|
||||
}
|
||||
|
||||
if (!$this->moveToNextLine()) {
|
||||
return;
|
||||
@@ -378,8 +382,8 @@ class Parser
|
||||
|
||||
$isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
|
||||
|
||||
if (!$insideBlockScalar) {
|
||||
$insideBlockScalar = $this->isBlockScalarHeader();
|
||||
if (empty($blockScalarIndentations) && $this->isBlockScalarHeader()) {
|
||||
$blockScalarIndentations[] = $this->getCurrentLineIndentation();
|
||||
}
|
||||
|
||||
$previousLineIndentation = $this->getCurrentLineIndentation();
|
||||
@@ -387,8 +391,17 @@ class Parser
|
||||
while ($this->moveToNextLine()) {
|
||||
$indent = $this->getCurrentLineIndentation();
|
||||
|
||||
if (!$insideBlockScalar && $indent === $previousLineIndentation) {
|
||||
$insideBlockScalar = $this->isBlockScalarHeader();
|
||||
// terminate all block scalars that are more indented than the current line
|
||||
if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && trim($this->currentLine) !== '') {
|
||||
foreach ($blockScalarIndentations as $key => $blockScalarIndentation) {
|
||||
if ($blockScalarIndentation >= $this->getCurrentLineIndentation()) {
|
||||
unset($blockScalarIndentations[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($blockScalarIndentations) && !$this->isCurrentLineComment() && $this->isBlockScalarHeader()) {
|
||||
$blockScalarIndentations[] = $this->getCurrentLineIndentation();
|
||||
}
|
||||
|
||||
$previousLineIndentation = $indent;
|
||||
@@ -404,7 +417,7 @@ class Parser
|
||||
}
|
||||
|
||||
// we ignore "comment" lines only when we are not inside a scalar block
|
||||
if (!$insideBlockScalar && $this->isCurrentLineComment()) {
|
||||
if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -569,7 +582,7 @@ class Parser
|
||||
$previousLineIndented = false;
|
||||
$previousLineBlank = false;
|
||||
|
||||
for ($i = 0; $i < count($blockLines); $i++) {
|
||||
for ($i = 0; $i < count($blockLines); ++$i) {
|
||||
if ('' === $blockLines[$i]) {
|
||||
$text .= "\n";
|
||||
$previousLineIndented = false;
|
||||
@@ -664,7 +677,7 @@ class Parser
|
||||
//checking explicitly the first char of the trim is faster than loops or strpos
|
||||
$ltrimmedLine = ltrim($this->currentLine, ' ');
|
||||
|
||||
return $ltrimmedLine[0] === '#';
|
||||
return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#';
|
||||
}
|
||||
|
||||
/**
|
||||
|
14
vendor/symfony/yaml/Tests/DumperTest.php
vendored
14
vendor/symfony/yaml/Tests/DumperTest.php
vendored
@@ -54,7 +54,7 @@ class DumperTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->dumper->setIndentation(7);
|
||||
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
'': bar
|
||||
foo: '#bar'
|
||||
'foo''bar': { }
|
||||
@@ -103,13 +103,13 @@ EOF;
|
||||
|
||||
public function testInlineLevel()
|
||||
{
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
{ '': bar, foo: '#bar', 'foo''bar': { }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } }
|
||||
EOF;
|
||||
$this->assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument');
|
||||
$this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument');
|
||||
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
'': bar
|
||||
foo: '#bar'
|
||||
'foo''bar': { }
|
||||
@@ -119,7 +119,7 @@ foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } }
|
||||
EOF;
|
||||
$this->assertEquals($expected, $this->dumper->dump($this->array, 1), '->dump() takes an inline level argument');
|
||||
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
'': bar
|
||||
foo: '#bar'
|
||||
'foo''bar': { }
|
||||
@@ -134,7 +134,7 @@ foobar:
|
||||
EOF;
|
||||
$this->assertEquals($expected, $this->dumper->dump($this->array, 2), '->dump() takes an inline level argument');
|
||||
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
'': bar
|
||||
foo: '#bar'
|
||||
'foo''bar': { }
|
||||
@@ -153,7 +153,7 @@ foobar:
|
||||
EOF;
|
||||
$this->assertEquals($expected, $this->dumper->dump($this->array, 3), '->dump() takes an inline level argument');
|
||||
|
||||
$expected = <<<EOF
|
||||
$expected = <<<'EOF'
|
||||
'': bar
|
||||
foo: '#bar'
|
||||
'foo''bar': { }
|
||||
@@ -180,7 +180,7 @@ EOF;
|
||||
{
|
||||
$dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true);
|
||||
|
||||
$this->assertEquals('{ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
|
||||
$this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
|
||||
}
|
||||
|
||||
public function testObjectSupportDisabledButNoExceptions()
|
||||
|
@@ -515,7 +515,7 @@ yaml: |
|
||||
php: |
|
||||
array(
|
||||
'canonical' => 12345,
|
||||
'decimal' => 12345,
|
||||
'decimal' => 12345.0,
|
||||
'octal' => 014,
|
||||
'hexadecimal' => 0xC
|
||||
)
|
||||
@@ -1538,7 +1538,7 @@ yaml: |
|
||||
php: |
|
||||
array(
|
||||
'canonical' => 12345,
|
||||
'decimal' => 12345,
|
||||
'decimal' => 12345.0,
|
||||
'octal' => 12,
|
||||
'hexadecimal' => 12
|
||||
)
|
||||
|
@@ -182,8 +182,8 @@ php: |
|
||||
array(
|
||||
'zero' => 0,
|
||||
'simple' => 12,
|
||||
'one-thousand' => 1000,
|
||||
'negative one-thousand' => -1000
|
||||
'one-thousand' => 1000.0,
|
||||
'negative one-thousand' => -1000.0
|
||||
)
|
||||
---
|
||||
test: Integers as Map Keys
|
||||
|
138
vendor/symfony/yaml/Tests/ParserTest.php
vendored
138
vendor/symfony/yaml/Tests/ParserTest.php
vendored
@@ -90,7 +90,7 @@ class ParserTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testEndOfTheDocumentMarker()
|
||||
{
|
||||
$yaml = <<<EOF
|
||||
$yaml = <<<'EOF'
|
||||
--- %YAML:1.0
|
||||
foo
|
||||
...
|
||||
@@ -426,15 +426,19 @@ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
|
||||
bar: 1
|
||||
EOF;
|
||||
$this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects');
|
||||
}
|
||||
|
||||
public function testObjectSupportDisabledButNoExceptions()
|
||||
{
|
||||
$input = <<<EOF
|
||||
foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}
|
||||
foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";}
|
||||
bar: 1
|
||||
EOF;
|
||||
$this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects');
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidDumpedObjectProvider
|
||||
*/
|
||||
public function testObjectSupportDisabledButNoExceptions($input)
|
||||
{
|
||||
$this->assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects');
|
||||
}
|
||||
|
||||
@@ -460,12 +464,39 @@ EOF;
|
||||
$this->assertEquals('cat', $result->fiz);
|
||||
}
|
||||
|
||||
public function testObjectForMapIsAppliedAfterParsing()
|
||||
{
|
||||
$expected = new \stdClass();
|
||||
$expected->foo = 'bar';
|
||||
$expected->baz = 'foobar';
|
||||
|
||||
$this->assertEquals($expected, $this->parser->parse("foo: bar\nbaz: foobar", false, false, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidDumpedObjectProvider
|
||||
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
|
||||
*/
|
||||
public function testObjectsSupportDisabledWithExceptions()
|
||||
public function testObjectsSupportDisabledWithExceptions($yaml)
|
||||
{
|
||||
$this->parser->parse('foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}', true, false);
|
||||
$this->parser->parse($yaml, true, false);
|
||||
}
|
||||
|
||||
public function invalidDumpedObjectProvider()
|
||||
{
|
||||
$yamlTag = <<<EOF
|
||||
foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}
|
||||
bar: 1
|
||||
EOF;
|
||||
$localTag = <<<EOF
|
||||
foo: !php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}
|
||||
bar: 1
|
||||
EOF;
|
||||
|
||||
return array(
|
||||
'yaml-tag' => array($yamlTag),
|
||||
'local-tag' => array($localTag),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,7 +526,7 @@ EOF;
|
||||
*/
|
||||
public function testUnindentedCollectionException()
|
||||
{
|
||||
$yaml = <<<EOF
|
||||
$yaml = <<<'EOF'
|
||||
|
||||
collection:
|
||||
-item1
|
||||
@@ -512,7 +543,7 @@ EOF;
|
||||
*/
|
||||
public function testShortcutKeyUnindentedCollectionException()
|
||||
{
|
||||
$yaml = <<<EOF
|
||||
$yaml = <<<'EOF'
|
||||
|
||||
collection:
|
||||
- key: foo
|
||||
@@ -529,7 +560,7 @@ EOF;
|
||||
*/
|
||||
public function testMultipleDocumentsNotSupportedException()
|
||||
{
|
||||
Yaml::parse(<<<EOL
|
||||
Yaml::parse(<<<'EOL'
|
||||
# Ranking of 1998 home runs
|
||||
---
|
||||
- Mark McGwire
|
||||
@@ -549,7 +580,7 @@ EOL
|
||||
*/
|
||||
public function testSequenceInAMapping()
|
||||
{
|
||||
Yaml::parse(<<<EOF
|
||||
Yaml::parse(<<<'EOF'
|
||||
yaml:
|
||||
hash: me
|
||||
- array stuff
|
||||
@@ -562,7 +593,7 @@ EOF
|
||||
*/
|
||||
public function testMappingInASequence()
|
||||
{
|
||||
Yaml::parse(<<<EOF
|
||||
Yaml::parse(<<<'EOF'
|
||||
yaml:
|
||||
- array stuff
|
||||
hash: me
|
||||
@@ -629,7 +660,7 @@ EOD;
|
||||
|
||||
public function testEmptyValue()
|
||||
{
|
||||
$input = <<<EOF
|
||||
$input = <<<'EOF'
|
||||
hash:
|
||||
EOF;
|
||||
|
||||
@@ -647,7 +678,7 @@ EOF;
|
||||
'class' => 'Bar',
|
||||
),
|
||||
),
|
||||
), Yaml::parse(<<<EOF
|
||||
), Yaml::parse(<<<'EOF'
|
||||
# comment 1
|
||||
services:
|
||||
# comment 2
|
||||
@@ -664,7 +695,7 @@ EOF
|
||||
|
||||
public function testStringBlockWithComments()
|
||||
{
|
||||
$this->assertEquals(array('content' => <<<EOT
|
||||
$this->assertEquals(array('content' => <<<'EOT'
|
||||
# comment 1
|
||||
header
|
||||
|
||||
@@ -675,7 +706,7 @@ header
|
||||
|
||||
footer # comment3
|
||||
EOT
|
||||
), Yaml::parse(<<<EOF
|
||||
), Yaml::parse(<<<'EOF'
|
||||
content: |
|
||||
# comment 1
|
||||
header
|
||||
@@ -692,7 +723,7 @@ EOF
|
||||
|
||||
public function testFoldedStringBlockWithComments()
|
||||
{
|
||||
$this->assertEquals(array(array('content' => <<<EOT
|
||||
$this->assertEquals(array(array('content' => <<<'EOT'
|
||||
# comment 1
|
||||
header
|
||||
|
||||
@@ -703,7 +734,7 @@ header
|
||||
|
||||
footer # comment3
|
||||
EOT
|
||||
)), Yaml::parse(<<<EOF
|
||||
)), Yaml::parse(<<<'EOF'
|
||||
-
|
||||
content: |
|
||||
# comment 1
|
||||
@@ -723,7 +754,7 @@ EOF
|
||||
{
|
||||
$this->assertEquals(array(array(
|
||||
'title' => 'some title',
|
||||
'content' => <<<EOT
|
||||
'content' => <<<'EOT'
|
||||
# comment 1
|
||||
header
|
||||
|
||||
@@ -734,7 +765,7 @@ header
|
||||
|
||||
footer # comment3
|
||||
EOT
|
||||
)), Yaml::parse(<<<EOF
|
||||
)), Yaml::parse(<<<'EOF'
|
||||
-
|
||||
title: some title
|
||||
content: |
|
||||
@@ -763,7 +794,7 @@ EOF
|
||||
'map' => array('key' => 'var-value'),
|
||||
'list_in_map' => array('key' => array('var-value')),
|
||||
'map_in_map' => array('foo' => array('bar' => 'var-value')),
|
||||
), Yaml::parse(<<<EOF
|
||||
), Yaml::parse(<<<'EOF'
|
||||
var: &var var-value
|
||||
scalar: *var
|
||||
list: [ *var ]
|
||||
@@ -779,7 +810,7 @@ EOF
|
||||
|
||||
public function testYamlDirective()
|
||||
{
|
||||
$yaml = <<<EOF
|
||||
$yaml = <<<'EOF'
|
||||
%YAML 1.2
|
||||
---
|
||||
foo: 1
|
||||
@@ -790,7 +821,7 @@ EOF;
|
||||
|
||||
public function testFloatKeys()
|
||||
{
|
||||
$yaml = <<<EOF
|
||||
$yaml = <<<'EOF'
|
||||
foo:
|
||||
1.2: "bar"
|
||||
1.3: "baz"
|
||||
@@ -839,7 +870,9 @@ EOT;
|
||||
|
||||
public function getCommentLikeStringInScalarBlockData()
|
||||
{
|
||||
$yaml1 = <<<EOT
|
||||
$tests = array();
|
||||
|
||||
$yaml = <<<'EOT'
|
||||
pages:
|
||||
-
|
||||
title: some title
|
||||
@@ -854,11 +887,11 @@ pages:
|
||||
|
||||
footer # comment3
|
||||
EOT;
|
||||
$expected1 = array(
|
||||
$expected = array(
|
||||
'pages' => array(
|
||||
array(
|
||||
'title' => 'some title',
|
||||
'content' => <<<EOT
|
||||
'content' => <<<'EOT'
|
||||
# comment 1
|
||||
header
|
||||
|
||||
@@ -873,8 +906,9 @@ EOT
|
||||
),
|
||||
),
|
||||
);
|
||||
$tests[] = array($yaml, $expected);
|
||||
|
||||
$yaml2 = <<<EOT
|
||||
$yaml = <<<'EOT'
|
||||
test: |
|
||||
foo
|
||||
# bar
|
||||
@@ -889,8 +923,8 @@ collection:
|
||||
# bar
|
||||
baz
|
||||
EOT;
|
||||
$expected2 = array(
|
||||
'test' => <<<EOT
|
||||
$expected = array(
|
||||
'test' => <<<'EOT'
|
||||
foo
|
||||
# bar
|
||||
baz
|
||||
@@ -899,7 +933,7 @@ EOT
|
||||
,
|
||||
'collection' => array(
|
||||
array(
|
||||
'one' => <<<EOT
|
||||
'one' => <<<'EOT'
|
||||
foo
|
||||
# bar
|
||||
baz
|
||||
@@ -907,7 +941,7 @@ EOT
|
||||
,
|
||||
),
|
||||
array(
|
||||
'two' => <<<EOT
|
||||
'two' => <<<'EOT'
|
||||
foo
|
||||
# bar
|
||||
baz
|
||||
@@ -916,11 +950,47 @@ EOT
|
||||
),
|
||||
),
|
||||
);
|
||||
$tests[] = array($yaml, $expected);
|
||||
|
||||
return array(
|
||||
array($yaml1, $expected1),
|
||||
array($yaml2, $expected2),
|
||||
$yaml = <<<EOT
|
||||
foo:
|
||||
bar:
|
||||
scalar-block: >
|
||||
line1
|
||||
line2>
|
||||
baz:
|
||||
# comment
|
||||
foobar: ~
|
||||
EOT;
|
||||
$expected = array(
|
||||
'foo' => array(
|
||||
'bar' => array(
|
||||
'scalar-block' => 'line1 line2>',
|
||||
),
|
||||
'baz' => array(
|
||||
'foobar' => null,
|
||||
),
|
||||
),
|
||||
);
|
||||
$tests[] = array($yaml, $expected);
|
||||
|
||||
$yaml = <<<'EOT'
|
||||
a:
|
||||
b: hello
|
||||
# c: |
|
||||
# first row
|
||||
# second row
|
||||
d: hello
|
||||
EOT;
|
||||
$expected = array(
|
||||
'a' => array(
|
||||
'b' => 'hello',
|
||||
'd' => 'hello',
|
||||
),
|
||||
);
|
||||
$tests[] = array($yaml, $expected);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks()
|
||||
|
2
vendor/symfony/yaml/Unescaper.php
vendored
2
vendor/symfony/yaml/Unescaper.php
vendored
@@ -26,7 +26,7 @@ class Unescaper
|
||||
/**
|
||||
* Regex fragment that matches an escaped character in a double quoted string.
|
||||
*/
|
||||
const REGEX_ESCAPED_CHARACTER = "\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)";
|
||||
const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)';
|
||||
|
||||
/**
|
||||
* Unescapes a single quoted string.
|
||||
|
7
vendor/symfony/yaml/Yaml.php
vendored
7
vendor/symfony/yaml/Yaml.php
vendored
@@ -21,10 +21,7 @@ use Symfony\Component\Yaml\Exception\ParseException;
|
||||
class Yaml
|
||||
{
|
||||
/**
|
||||
* Parses YAML into a PHP array.
|
||||
*
|
||||
* The parse method, when supplied with a YAML stream (string or file),
|
||||
* will do its best to convert YAML in a file into a PHP array.
|
||||
* Parses YAML into a PHP value.
|
||||
*
|
||||
* Usage:
|
||||
* <code>
|
||||
@@ -37,7 +34,7 @@ class Yaml
|
||||
* @param bool $objectSupport True if object support is enabled, false otherwise
|
||||
* @param bool $objectForMap True if maps should return a stdClass instead of array()
|
||||
*
|
||||
* @return array The YAML converted to a PHP array
|
||||
* @return mixed The YAML converted to a PHP value
|
||||
*
|
||||
* @throws ParseException If the YAML is not valid
|
||||
*/
|
||||
|
Reference in New Issue
Block a user