src/Leevel/Kernel/Bootstrap/LoadOption.php
protected function checkRuntimeEnv(IApp $app): void
    {
        if (!getenv('RUNTIME_ENVIRONMENT')) {
            return;
        }

        $file = '.'.getenv('RUNTIME_ENVIRONMENT');

        // 校验运行时环境，防止测试用例清空非测试库的业务数据
        if (!is_file($fullFile = $app->envPath().'/'.$file)) {
            throw new RuntimeException(sprintf('Env file `%s` was not found.', $fullFile));
        }

        $app->setEnvFile($file);
    }
protected function checkRuntimeEnv(IApp $app): void
    {
        if (!getenv('RUNTIME_ENVIRONMENT')) {
            return;
        }

        $file = '.'.getenv('RUNTIME_ENVIRONMENT');

        // 校验运行时环境，防止测试用例清空非测试库的业务数据
        if (!is_file($fullFile = $app->envPath().'/'.$file)) {
            throw new RuntimeException(sprintf('Env file `%s` was not found.', $fullFile));
        }

        $app->setEnvFile($file);
    }
载入运行时环境变量.

@param \Leevel\Kernel\IApp $appy