Whoever needs this, the following code works
<?php
namespace PHPMaker2025\KOMODO;
use DI\ContainerBuilder;
// Autoload
require_once "../vendor/autoload.php";
// Require files
require_once "../src/constants.php";
require_once "../src/config.php";
require_once "../src/phpfn.php";
require_once "../src/userfn.php";
$containerBuilder = new ContainerBuilder();
$containerBuilder->useAttributes(true);
// Add definitions
$containerBuilder->addDefinitions("../src/definitions.php");
// Dispatch container build event
DispatchEvent(new ContainerBuildEvent($containerBuilder), ContainerBuildEvent::NAME);
// Build PHP-DI container instance
$container = $containerBuilder->build();
$conn = Conn();