From cba0caf5e8d23b3dcf77d61da8b86d90f511d343 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 7 Feb 2024 11:11:01 +0100 Subject: [PATCH] NeonAdapter: fixed to string conversion [Closes #307] --- src/DI/Config/Adapters/NeonAdapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DI/Config/Adapters/NeonAdapter.php b/src/DI/Config/Adapters/NeonAdapter.php index 9221e7edf..b71823b6f 100644 --- a/src/DI/Config/Adapters/NeonAdapter.php +++ b/src/DI/Config/Adapters/NeonAdapter.php @@ -211,7 +211,8 @@ private function convertAtSignVisitor(Neon\Node $node) private function deprecatedParametersVisitor(Neon\Node $node) { if (($node instanceof Neon\Node\StringNode || $node instanceof Neon\Node\LiteralNode) - && str_contains((string) $node->value, '%parameters%') + && is_string($node->value) + && str_contains($node->value, '%parameters%') ) { trigger_error('%parameters% is deprecated, use @container::getParameters() (in ' . $this->file . ')', E_USER_DEPRECATED); }