8000 Remove node name assertion. · symfony/symfony@7be490f · GitHub
[go: up one dir, main page]

Skip to content

Commit 7be490f

Browse files
committed
Remove node name assertion.
1 parent 34ad646 commit 7be490f

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

src/Symfony/Component/Config/Definition/ArrayNode.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ public function setIgnoreExtraKeys($boolean, $remove = true)
159159
*/
160160
public function setName($name)
161161
{
162-
$this->assertNameIsValid($name);
163-
164162
$this->name = $name;
165163
}
166164

src/Symfony/Component/Config/Definition/BaseNode.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ abstract class BaseNode implements NodeInterface
4747
*/
4848
public function __construct($name, NodeInterface $parent = null, $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
4949
{
50-
$this->pathSeparator = $pathSeparator;
51-
52-
$this->assertNameIsValid($name);
53-
5450
$this->name = $name;
5551
$this->parent = $parent;
52+
$this->pathSeparator = $pathSeparator;
5653
}
5754

5855
public function setAttribute($key, $value)
@@ -356,18 +353,4 @@ abstract protected function mergeValues($leftSide, $rightSide);
356353
* @return mixed The finalized value
357354
*/
358355
abstract protected function finalizeValue($value);
359-
360-
/**
361-
* Assert Given Node name is valid.
362-
*
363-
* @param string $name
364-
*
365-
* @throws \InvalidArgumentException if name contains path separator.
366-
*/
367-
protected function assertNameIsValid($name)
368-
{
369-
if (false !== strpos($name, $this->pathSeparator)) {
370-
throw new \InvalidArgumentException('The name must not contain "'.$this->pathSeparator.'".');
371-
}
372-
}
373356
}

src/Symfony/Component/Config/Definition/VariableNode.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public function setAllowEmptyValue($boolean)
6969
*/
7070
public function setName($name)
7171
{
72-
$this->assertNameIsValid($name);
73-
7472
$this->name = $name;
7573
}
7674

0 commit comments

Comments
 (0)
0