Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 007ae9a

Browse files
committed
Added deprecation notice when defining an indented block after a definition
1 parent c3e82fd commit 007ae9a

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)