You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
// if next line is less indented or equal, then it means that the current value is null
315
315
if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
@@ -457,7 +457,7 @@ private function doParse(string $value, int $flags)
457
457
thrownewParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
458
458
}
459
459
460
-
if (str_contains($line, ': ')) {
460
+
if (false !== strpos($line, ': ')) {
461
461
thrownewParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
462
462
}
463
463
@@ -467,7 +467,7 @@ private function doParse(string $value, int $flags)
467
467
$value .= '';
468
468
}
469
469
470
-
if ('' !== $trimmedLine && str_ends_with($line, '\\')) {
470
+
if ('' !== $trimmedLine && '\\' === substr($line, -1)) {
471
471
$value .= ltrim(substr($line, 0, -1));
472
472
} elseif ('' !== $trimmedLine) {
473
473
$value .= $trimmedLine;
@@ -476,7 +476,7 @@ private function doParse(string $value, int $flags)
476
476
if ('' === $trimmedLine) {
477
477
$previousLineWasNewline = true;
478
478
$previousLineWasTerminatedWithBackslash = false;
479
-
} elseif (str_ends_with($line, '\\')) {
479
+
} elseif ('\\' === substr($line, -1)) {
480
480
$previousLineWasNewline = false;
481
481
$previousLineWasTerminatedWithBackslash = true;
482
482
} else {
@@ -724,7 +724,7 @@ private function moveToPreviousLine(): bool
0 commit comments