public function createContainer() : Container
    {
        $containerBuilder = new ContainerBuilder();

        foreach ($this->modules as $module) {
            $this->loadModule($containerBuilder, $module);
        }

        if (!empty($this->config)) {
            $containerBuilder->addDefinitions($this->config);
        }

        $this->configureContainerBuilder($containerBuilder);

        return $containerBuilder->build();
    }