Skip to content

Commit

Permalink
set up dependency injection container for setup routes
Browse files Browse the repository at this point in the history
  • Loading branch information
DAcodedBEAT committed Jan 17, 2024
1 parent 1a34416 commit 9b59e16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/setup/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: ../');
Expand All @@ -16,6 +17,9 @@
SystemURLs::init($rootPath, '', __DIR__ . '/../');
SystemConfig::init();

$container = new ContainerBuilder();
$container->compile();
AppFactory::setContainer($container);
$app = AppFactory::create();
$app->setBasePath('/setup');

Expand Down

0 comments on commit 9b59e16

Please sign in to comment.