From 72e50fbe50938cdbd62682d4022b124ee12557ae Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 14 Jul 2026 20:13:20 +0000 Subject: [PATCH] - Added getenvonce() method which was missing --- meta/negundo.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta/negundo.php b/meta/negundo.php index 69438bf..8eed430 100644 --- a/meta/negundo.php +++ b/meta/negundo.php @@ -4,6 +4,16 @@ use Negundo\Client\{ SoftwareConfig, Dump, Task, NegundoMiddleware }; use function DI\{ autowire, create, get, add }; +if (! function_exists('getenvonce')) { + function getenvonce(string $name) : array|string|false + { + $value = getenv($name); + unset($_ENV[$name], $_SERVER[$name]); + putenv($name . "="); + return $value; + } +} + return [ SoftwareConfig::class => create(SoftwareConfig::class)->constructor( serverUrl: getenvonce('NEGUNDO_SERVER'),