Currently calling $configurator->loadContainer() triggers autoloading for all interfaces implemented by generated factories (which because of parameter and return types cause loading their dependencies…)
The solution is to either move implementation of generated factories to different file or to move it to runtime (possible utilizing anonymous classes in PHP 7)
/**
* @return App\Components\MyComponent
*/
public function createService__248()
{
return new class($this) implements App\Components\IMyComponentFactory
{
private $container;
public function __construct(Container_7bc42fd40e $container)
{
$this->container = $container;
}
public function create(): App\Components\MyComponent
{
return new App\Components\MyComponent();
}
};
}
Currently calling
$configurator->loadContainer()triggers autoloading for all interfaces implemented by generated factories (which because of parameter and return types cause loading their dependencies…)The solution is to either move implementation of generated factories to different file or to move it to runtime (possible utilizing anonymous classes in PHP 7)