Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions htdocs/class/libraries/composer.dist.lock
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,16 @@
},
{
"name": "symfony/yaml",
"version": "v2.8.19",
"version": "v2.8.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "286d84891690b0e2515874717e49360d1c98a703"
"reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/286d84891690b0e2515874717e49360d1c98a703",
"reference": "286d84891690b0e2515874717e49360d1c98a703",
"url": "https://api.github.com/repos/symfony/yaml/zipball/93ccdde79f4b079c7558da4656a3cb1c50c68e02",
"reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -431,7 +431,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-03-20T09:41:44+00:00"
"time": "2017-05-01T14:31:55+00:00"
},
{
"name": "webmozart/assert",
Expand Down Expand Up @@ -515,16 +515,16 @@
},
{
"name": "xoops/xmf",
"version": "V1.2.7",
"version": "V1.2.8",
"source": {
"type": "git",
"url": "https://github.com/XOOPS/xmf.git",
"reference": "243773f553b43f5477ebf1960e313caebb2d4ca5"
"reference": "14929c9b0df5dbb4b800b02bcba5d2243de60e7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/XOOPS/xmf/zipball/243773f553b43f5477ebf1960e313caebb2d4ca5",
"reference": "243773f553b43f5477ebf1960e313caebb2d4ca5",
"url": "https://api.github.com/repos/XOOPS/xmf/zipball/14929c9b0df5dbb4b800b02bcba5d2243de60e7e",
"reference": "14929c9b0df5dbb4b800b02bcba5d2243de60e7e",
"shasum": ""
},
"require": {
Expand All @@ -546,7 +546,7 @@
"GPL-2.0+"
],
"description": "XMF - XOOPS Module Framework",
"time": "2017-04-29T17:59:15+00:00"
"time": "2017-05-08T02:03:10+00:00"
}
],
"packages-dev": [],
Expand Down
24 changes: 12 additions & 12 deletions htdocs/class/libraries/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,23 +479,23 @@
},
{
"name": "symfony/yaml",
"version": "v2.8.19",
"version_normalized": "2.8.19.0",
"version": "v2.8.20",
"version_normalized": "2.8.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "286d84891690b0e2515874717e49360d1c98a703"
"reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/286d84891690b0e2515874717e49360d1c98a703",
"reference": "286d84891690b0e2515874717e49360d1c98a703",
"url": "https://api.github.com/repos/symfony/yaml/zipball/93ccdde79f4b079c7558da4656a3cb1c50c68e02",
"reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"time": "2017-03-20T09:41:44+00:00",
"time": "2017-05-01T14:31:55+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -530,17 +530,17 @@
},
{
"name": "xoops/xmf",
"version": "V1.2.7",
"version_normalized": "1.2.7.0",
"version": "V1.2.8",
"version_normalized": "1.2.8.0",
"source": {
"type": "git",
"url": "https://github.com/XOOPS/xmf.git",
"reference": "243773f553b43f5477ebf1960e313caebb2d4ca5"
"reference": "14929c9b0df5dbb4b800b02bcba5d2243de60e7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/XOOPS/xmf/zipball/243773f553b43f5477ebf1960e313caebb2d4ca5",
"reference": "243773f553b43f5477ebf1960e313caebb2d4ca5",
"url": "https://api.github.com/repos/XOOPS/xmf/zipball/14929c9b0df5dbb4b800b02bcba5d2243de60e7e",
"reference": "14929c9b0df5dbb4b800b02bcba5d2243de60e7e",
"shasum": ""
},
"require": {
Expand All @@ -551,7 +551,7 @@
"symfony/yaml": "2.8.*",
"webmozart/assert": "^1.2"
},
"time": "2017-04-29T17:59:15+00:00",
"time": "2017-05-08T02:03:10+00:00",
"type": "project",
"installation-source": "dist",
"autoload": {
Expand Down
10 changes: 6 additions & 4 deletions htdocs/class/libraries/vendor/symfony/yaml/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ 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.
Expand All @@ -50,7 +52,7 @@ class Escaper
*/
public static function requiresDoubleQuoting($value)
{
return preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value);
return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value);
}

/**
Expand Down Expand Up @@ -82,7 +84,7 @@ public static function requiresSingleQuoting($value)

// Determines if the PHP value contains any single characters that would
// cause it to require single quoting in YAML.
return preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` ]/x', $value);
return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` ]/x', $value);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ class ParseException extends RuntimeException
/**
* Constructor.
*
* @param string $message The error message
* @param int $parsedLine The line where the error occurred
* @param int $snippet The snippet of code near the problem
* @param string $parsedFile The file name where the error occurred
* @param \Exception $previous The previous exception
* @param string $message The error message
* @param int $parsedLine The line where the error occurred
* @param string|null $snippet The snippet of code near the problem
* @param string|null $parsedFile The file name where the error occurred
* @param \Exception|null $previous The previous exception
*/
public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null)
{
Expand Down
14 changes: 7 additions & 7 deletions htdocs/class/libraries/vendor/symfony/yaml/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ private static function dumpArray($value, $exceptionOnInvalidType, $objectSuppor
/**
* Parses a YAML scalar.
*
* @param string $scalar
* @param string $delimiters
* @param array $stringDelimiters
* @param int &$i
* @param bool $evaluate
* @param array $references
* @param string $scalar
* @param string[] $delimiters
* @param string[] $stringDelimiters
* @param int &$i
* @param bool $evaluate
* @param array $references
*
* @return string
*
Expand Down Expand Up @@ -453,7 +453,7 @@ private static function parseMapping($mapping, &$i = 0, $references = array())
* @param string $scalar
* @param array $references
*
* @return string A YAML string
* @return mixed The evaluated YAML string
*
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
*/
Expand Down
54 changes: 40 additions & 14 deletions htdocs/class/libraries/vendor/symfony/yaml/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,57 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
if (false === preg_match('//u', $value)) {
throw new ParseException('The YAML value does not appear to be valid UTF-8.');
}

$this->refs = array();

$mbEncoding = null;
$e = null;
$data = null;

if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('UTF-8');
}

try {
$data = $this->doParse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap);
} catch (\Exception $e) {
} catch (\Throwable $e) {
}

if (null !== $mbEncoding) {
mb_internal_encoding($mbEncoding);
}

$this->lines = array();
$this->currentLine = '';
$this->refs = array();
$this->skippedLineNumbers = array();
$this->locallySkippedLineNumbers = array();

if (null !== $e) {
throw $e;
}

return $data;
}

private function doParse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false)
{
$this->currentLineNb = -1;
$this->currentLine = '';
$value = $this->cleanup($value);
$this->lines = explode("\n", $value);
$this->locallySkippedLineNumbers = array();

if (null === $this->totalNumberOfLines) {
$this->totalNumberOfLines = count($this->lines);
}

if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('UTF-8');
}

$data = array();
$context = null;
$allowOverwrite = false;

while ($this->moveToNextLine()) {
if ($this->isCurrentLineEmpty()) {
continue;
Expand Down Expand Up @@ -246,21 +280,13 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
throw $e;
}

if (isset($mbEncoding)) {
mb_internal_encoding($mbEncoding);
}

return $value;
}

throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
}
}

if (isset($mbEncoding)) {
mb_internal_encoding($mbEncoding);
}

if ($objectForMap && !is_object($data) && 'mapping' === $context) {
$object = new \stdClass();

Expand Down Expand Up @@ -289,7 +315,7 @@ private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupp
$parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers);
$parser->refs = &$this->refs;

return $parser->parse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap);
return $parser->doParse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap);
}

/**
Expand Down
31 changes: 23 additions & 8 deletions htdocs/class/libraries/vendor/symfony/yaml/Tests/InlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,27 +193,42 @@ public function testParseUnquotedAsteriskFollowedByAComment()

/**
* @group legacy
* @dataProvider getReservedIndicators
* @expectedDeprecation Not quoting the scalar "@foo " starting with "@" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
public function testParseUnquotedScalarStartingWithReservedAtIndicator()
{
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
Inline::parse('{ foo: @foo }');
}

public function getReservedIndicators()
/**
* @group legacy
* @expectedDeprecation Not quoting the scalar "`foo " starting with "`" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithReservedBacktickIndicator()
{
Inline::parse('{ foo: `foo }');
}

/**
* @group legacy
* @expectedDeprecation Not quoting the scalar "|foo " starting with "|" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithLiteralStyleIndicator()
{
return array(array('@'), array('`'));
Inline::parse('{ foo: |foo }');
}

/**
* @group legacy
* @dataProvider getScalarIndicators
* @expectedDeprecation Not quoting the scalar ">foo " starting with ">" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
public function testParseUnquotedScalarStartingWithFoldedStyleIndicator()
{
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
Inline::parse('{ foo: >foo }');
}

public function getScalarIndicators()
Expand Down
21 changes: 21 additions & 0 deletions htdocs/class/libraries/vendor/symfony/yaml/Tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,27 @@ public function testCanParseVeryLongValue()

$this->assertEquals($trickyVal, $arrayFromYaml);
}

/**
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
* @expectedExceptionMessage Reference "foo" does not exist at line 2
*/
public function testParserCleansUpReferencesBetweenRuns()
{
$yaml = <<<YAML
foo: &foo
baz: foobar
bar:
<<: *foo
YAML;
$this->parser->parse($yaml);

$yaml = <<<YAML
bar:
<<: *foo
YAML;
$this->parser->parse($yaml);
}
}

class B
Expand Down
2 changes: 2 additions & 0 deletions htdocs/class/libraries/vendor/symfony/yaml/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down