8000 Added deprecation notice when defining an indented block after a defi… · symfony/symfony@efc1d35 · GitHub
[go: up one dir, main page]

Skip to content

Commit efc1d35

Browse files
committed
Added deprecation notice when defining an indented block after a definition
1 parent 083d19e commit efc1d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Yaml/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ private function doParse(string $value, int $flags)
382382
throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
383383
}
384384

385-
if ($this->offset >= 1 && preg_match('/:/', $this->currentLine) && $this->isNextLineIndented()) {
385+
if ($this->offset >= 1 && strpos($this->currentLine, ':') && $this->isNextLineIndented()) {
386386
@trigger_error('Support for indented blocks after definition is deprecated since version 4.1. Use same level of indentation to fix this issue.', E_USER_DEPRECATED);
387387
}
388388

0 commit comments

Comments
 (0)
0