From 9b59e16cffa91f57b3c82e22fb65c36e6b978f73 Mon Sep 17 00:00:00 2001 From: Arun Philip Date: Tue, 16 Jan 2024 21:30:19 -0500 Subject: [PATCH] set up dependency injection container for setup routes --- src/setup/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/setup/index.php b/src/setup/index.php index aeb43a24b5..7759007c07 100644 --- a/src/setup/index.php +++ b/src/setup/index.php @@ -4,6 +4,7 @@ use ChurchCRM\dto\SystemURLs; use ChurchCRM\Slim\Middleware\VersionMiddleware; use Slim\Factory\AppFactory; +use Symfony\Component\DependencyInjection\ContainerBuilder; if (file_exists('../Include/Config.php')) { header('Location: ../'); @@ -16,6 +17,9 @@ SystemURLs::init($rootPath, '', __DIR__ . '/../'); SystemConfig::init(); +$container = new ContainerBuilder(); +$container->compile(); +AppFactory::setContainer($container); $app = AppFactory::create(); $app->setBasePath('/setup');