make AppKernel refresh on service file change and keep support for debug progress bar

This commit is contained in:
TomasVotruba 2017-12-25 21:41:07 +01:00
parent 6600f8d332
commit 355cc4aded
2 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,8 @@ final class AppKernel extends Kernel
$this->configFile = $configFile;
}
parent::__construct('cli' . sha1($configFile), false);
// debug: true is require to invalidate container on service files change
parent::__construct('cli' . sha1($configFile), true);
}
public function registerContainerConfiguration(LoaderInterface $loader): void

View File

@ -10,6 +10,7 @@ final class ContainerFactory
{
$appKernel = new AppKernel();
$appKernel->boot();
putenv('SHELL_VERBOSITY=1');
return $appKernel->getContainer();
}
@ -18,6 +19,7 @@ final class ContainerFactory
{
$appKernel = new AppKernel($config);
$appKernel->boot();
putenv('SHELL_VERBOSITY=1');
return $appKernel->getContainer();
}