addDefinitions($filename); } $app = new class() extends Application { protected ContainerInterface $container; public function getContainer(): ContainerInterface { return $this->container; } public function setContainer(ContainerInterface $container) { $this->container = $container; return $this; } }; $app->setContainer($builder->build()); $filename = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'cli', 'middlewares.php' ]); if (file_exists($filename)) { include_once $filename; } return $app;