diff --git a/composer.json b/composer.json index 65560a3..27982e3 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": ">=7.2 <8.1", - "nette/di": "^3.0.3", + "nette/di": "^3.0.5", "nette/utils": "^3.0" }, "suggest": { diff --git a/src/Bootstrap/Configurator.php b/src/Bootstrap/Configurator.php index 3317962..36f615f 100644 --- a/src/Bootstrap/Configurator.php +++ b/src/Bootstrap/Configurator.php @@ -293,7 +293,7 @@ public function generateContainer(DI\Compiler $compiler): void } } - $compiler->addConfig(['parameters' => self::escape($this->staticParameters)]); + $compiler->addConfig(['parameters' => DI\Helpers::escape($this->staticParameters)]); $compiler->setDynamicParameterNames(array_keys($this->dynamicParameters)); $builder = $compiler->getContainerBuilder(); @@ -353,20 +353,6 @@ public static function detectDebugMode($list = null): bool } return in_array($addr, $list, true) || in_array("$secret@$addr", $list, true); } - - - /** - * Expand counterpart. - */ - private static function escape($value) - { - if (is_array($value)) { - return array_map([self::class, 'escape'], $value); - } elseif (is_string($value)) { - return str_replace('%', '%%', $value); - } - return $value; - } }