diff --git a/src/DI/Config/Adapters/NeonAdapter.php b/src/DI/Config/Adapters/NeonAdapter.php index 804a225a1..48a6e7590 100644 --- a/src/DI/Config/Adapters/NeonAdapter.php +++ b/src/DI/Config/Adapters/NeonAdapter.php @@ -43,7 +43,6 @@ public function load(string $file): array $traverser = new Neon\Traverser; $node = $traverser->traverse($node, $this->removeUnderscoreVisitor(...)); $node = $traverser->traverse($node, $this->convertAtSignVisitor(...)); - $node = $traverser->traverse($node, $this->deprecatedParametersVisitor(...)); return $this->process((array) $node->toValue()); } @@ -192,14 +191,4 @@ private function convertAtSignVisitor(Neon\Node $node) trigger_error("There is no need to escape @ anymore, replace @@ with @ and put string in quotes: '$node->value' (used in $this->file)", E_USER_DEPRECATED); } } - - - private function deprecatedParametersVisitor(Neon\Node $node) - { - if (($node instanceof Neon\Node\StringNode || $node instanceof Neon\Node\LiteralNode) - && str_contains((string) $node->value, '%parameters%') - ) { - trigger_error('%parameters% is deprecated, use @container::getParameters() (in ' . $this->file . ')', E_USER_DEPRECATED); - } - } } diff --git a/src/DI/Helpers.php b/src/DI/Helpers.php index 099669147..4a82ffca1 100644 --- a/src/DI/Helpers.php +++ b/src/DI/Helpers.php @@ -43,12 +43,6 @@ public static function expand(mixed $var, array $params, bool|array $recursive = self::expand($var->arguments, $params, $recursive), ); - } elseif ($var === '%parameters%' && !array_key_exists('parameters', $params)) { - trigger_error('%parameters% is deprecated, use @container::getParameters()', E_USER_DEPRECATED); - return $recursive - ? self::expand($params, $params, $recursive) - : $params; - } elseif (is_string($var)) { $recursive = is_array($recursive) ? $recursive : ($recursive ? [] : null); return self::expandString($var, $params, $recursive);