diff --git a/src/HandlerResolver.php b/src/HandlerResolver.php index 1c7442e..d6553ba 100644 --- a/src/HandlerResolver.php +++ b/src/HandlerResolver.php @@ -108,12 +108,10 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter )); } - $projectDir = getenv('LAMBDA_TASK_ROOT') ?: null; - // Use the Symfony Runtime component to resolve the closure and get the PSR-11 container $options = $_SERVER['APP_RUNTIME_OPTIONS'] ?? []; - if ($projectDir) { - $options['project_dir'] = $projectDir; + if (! isset($options['project_dir'])) { + $options['project_dir'] = dirname(__DIR__, 4); } $runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? BrefRuntime::class;