Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Yaml\Exception;
|
|||
* Exception class thrown when an error occurs during dumping.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class DumpException extends RuntimeException
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Yaml\Exception;
|
|||
* Exception interface for all exceptions thrown by the component.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface ExceptionInterface
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Yaml\Exception;
|
|||
* Exception class thrown when an error occurs during parsing.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ParseException extends RuntimeException
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\Yaml\Exception;
|
|||
* Exception class thrown when an error occurs during parsing.
|
||||
*
|
||||
* @author Romain Neutron <imprec@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
||||
{
|
||||
|
|
4
vendor/symfony/yaml/Inline.php
vendored
4
vendor/symfony/yaml/Inline.php
vendored
|
@ -224,8 +224,8 @@ class Inline
|
|||
$i += strlen($output);
|
||||
|
||||
// remove comments
|
||||
if (false !== $strpos = strpos($output, ' #')) {
|
||||
$output = rtrim(substr($output, 0, $strpos));
|
||||
if (preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) {
|
||||
$output = substr($output, 0, $match[0][1]);
|
||||
}
|
||||
} elseif (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) {
|
||||
$output = $match[1];
|
||||
|
|
40
vendor/symfony/yaml/Parser.php
vendored
40
vendor/symfony/yaml/Parser.php
vendored
|
@ -20,7 +20,9 @@ use Symfony\Component\Yaml\Exception\ParseException;
|
|||
*/
|
||||
class Parser
|
||||
{
|
||||
const FOLDED_SCALAR_PATTERN = '(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?';
|
||||
const BLOCK_SCALAR_HEADER_PATTERN = '(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?';
|
||||
// BC - wrongly named
|
||||
const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN;
|
||||
|
||||
private $offset = 0;
|
||||
private $lines = array();
|
||||
|
@ -373,8 +375,8 @@ class Parser
|
|||
|
||||
$isItUnindentedCollection = $this->isStringUnIndentedCollectionItem($this->currentLine);
|
||||
|
||||
// Comments must not be removed inside a string block (ie. after a line ending with "|")
|
||||
$removeCommentsPattern = '~'.self::FOLDED_SCALAR_PATTERN.'$~';
|
||||
// Comments must not be removed inside a block scalar
|
||||
$removeCommentsPattern = '~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~';
|
||||
$removeComments = !preg_match($removeCommentsPattern, $this->currentLine);
|
||||
|
||||
while ($this->moveToNextLine()) {
|
||||
|
@ -464,10 +466,10 @@ class Parser
|
|||
return $this->refs[$value];
|
||||
}
|
||||
|
||||
if (preg_match('/^'.self::FOLDED_SCALAR_PATTERN.'$/', $value, $matches)) {
|
||||
if (preg_match('/^'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) {
|
||||
$modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
|
||||
|
||||
return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
|
||||
return $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -481,15 +483,15 @@ class Parser
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses a folded scalar.
|
||||
* Parses a block scalar.
|
||||
*
|
||||
* @param string $separator The separator that was used to begin this folded scalar (| or >)
|
||||
* @param string $indicator The indicator that was used to begin this folded scalar (+ or -)
|
||||
* @param int $indentation The indentation that was used to begin this folded scalar
|
||||
* @param string $style The style indicator that was used to begin this block scalar (| or >)
|
||||
* @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -)
|
||||
* @param int $indentation The indentation indicator that was used to begin this block scalar
|
||||
*
|
||||
* @return string The text value
|
||||
*/
|
||||
private function parseFoldedScalar($separator, $indicator = '', $indentation = 0)
|
||||
private function parseBlockScalar($style, $chomping = '', $indentation = 0)
|
||||
{
|
||||
$notEOF = $this->moveToNextLine();
|
||||
if (!$notEOF) {
|
||||
|
@ -544,17 +546,23 @@ class Parser
|
|||
$this->moveToPreviousLine();
|
||||
}
|
||||
|
||||
// replace all non-trailing single newlines with spaces in folded blocks
|
||||
if ('>' === $separator) {
|
||||
// folded style
|
||||
if ('>' === $style) {
|
||||
// folded lines
|
||||
// replace all non-leading/non-trailing single newlines with spaces
|
||||
preg_match('/(\n*)$/', $text, $matches);
|
||||
$text = preg_replace('/(?<!\n)\n(?!\n)/', ' ', rtrim($text, "\n"));
|
||||
$text = preg_replace('/(?<!\n|^)\n(?!\n)/', ' ', rtrim($text, "\n"));
|
||||
$text .= $matches[1];
|
||||
|
||||
// empty separation lines
|
||||
// remove one newline from each group of non-leading/non-trailing newlines
|
||||
$text = preg_replace('/[^\n]\n+\K\n(?=[^\n])/', '', $text);
|
||||
}
|
||||
|
||||
// deal with trailing newlines as indicated
|
||||
if ('' === $indicator) {
|
||||
// deal with trailing newlines
|
||||
if ('' === $chomping) {
|
||||
$text = preg_replace('/\n+$/', "\n", $text);
|
||||
} elseif ('-' === $indicator) {
|
||||
} elseif ('-' === $chomping) {
|
||||
$text = preg_replace('/\n+$/', '', $text);
|
||||
}
|
||||
|
||||
|
|
6
vendor/symfony/yaml/Yaml.php
vendored
6
vendor/symfony/yaml/Yaml.php
vendored
|
@ -17,8 +17,6 @@ use Symfony\Component\Yaml\Exception\ParseException;
|
|||
* Yaml offers convenience methods to load and dump YAML.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Yaml
|
||||
{
|
||||
|
@ -48,8 +46,6 @@ class Yaml
|
|||
* @return array The YAML converted to a PHP array
|
||||
*
|
||||
* @throws ParseException If the YAML is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false)
|
||||
{
|
||||
|
@ -92,8 +88,6 @@ class Yaml
|
|||
* @param bool $objectSupport true if object support is enabled, false otherwise
|
||||
*
|
||||
* @return string A YAML string representing the original PHP array
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
|
||||
{
|
||||
|
|
3
vendor/symfony/yaml/composer.json
vendored
3
vendor/symfony/yaml/composer.json
vendored
|
@ -18,9 +18,6 @@
|
|||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\Yaml\\": "" }
|
||||
},
|
||||
|
|
Reference in a new issue