public function createInstance($serviceProviderClass, array $serviceClasses)
    {
        if (!class_exists($serviceProviderClass, false)) {
            if (!$this->serviceProviderLoader->canLoad($serviceProviderClass)) {
                $dependencyGraph = $this->dependencyResolver->execute($serviceClasses);
                $source = $this->serviceProviderGenerator->generate($serviceProviderClass, $dependencyGraph);
                $this->serviceProviderLoader->write($serviceProviderClass, $source);
            }

            $this->serviceProviderLoader->load($serviceProviderClass);
        }

        return new $serviceProviderClass();
    }