removed Kernel::isBooted() method
This commit is contained in:
parent
005c1d9df8
commit
09aeb78634
@ -22,9 +22,6 @@ class InfoDoctrineCommandTest extends TestCase
|
||||
|
||||
$testContainer = $this->createYamlBundleTestContainer();
|
||||
$kernel = $this->getMock('Symfony\Component\HttpKernel\Kernel', array(), array(), '', false);
|
||||
$kernel->expects($this->once())
|
||||
->method('isBooted')
|
||||
->will($this->returnValue( true ));
|
||||
$kernel->expects($this->once())
|
||||
->method('getBundles')
|
||||
->will($this->returnValue(array()));
|
||||
|
@ -48,9 +48,7 @@ abstract class Cache extends BaseCache
|
||||
*/
|
||||
protected function forward(Request $request, $raw = false, Response $entry = null)
|
||||
{
|
||||
if (!$this->kernel->isBooted()) {
|
||||
$this->kernel->boot();
|
||||
}
|
||||
$this->kernel->boot();
|
||||
$this->kernel->getContainer()->set('cache', $this);
|
||||
$this->kernel->getContainer()->set('esi', $this->esi);
|
||||
|
||||
|
@ -37,9 +37,7 @@ class Application extends BaseApplication
|
||||
|
||||
$this->definition->addOption(new InputOption('--shell', '-s', InputOption::VALUE_NONE, 'Launch the shell.'));
|
||||
|
||||
if (!$this->kernel->isBooted()) {
|
||||
$this->kernel->boot();
|
||||
}
|
||||
$this->kernel->boot();
|
||||
|
||||
$this->registerCommands();
|
||||
}
|
||||
|
@ -29,8 +29,9 @@ use Symfony\Component\HttpKernel\ClassCollectionLoader;
|
||||
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
||||
|
||||
/**
|
||||
* The Kernel is the heart of the Symfony system. It manages an environment
|
||||
* that can host bundles.
|
||||
* The Kernel is the heart of the Symfony system.
|
||||
*
|
||||
* It manages an environment made of bundles.
|
||||
*
|
||||
* @author Fabien Potencier <fabien.potencier@symfony-project.org>
|
||||
*/
|
||||
@ -105,16 +106,6 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
|
||||
*/
|
||||
abstract public function registerContainerConfiguration(LoaderInterface $loader);
|
||||
|
||||
/**
|
||||
* Checks whether the current kernel has been booted or not.
|
||||
*
|
||||
* @return Boolean $booted
|
||||
*/
|
||||
public function isBooted()
|
||||
{
|
||||
return $this->booted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Boots the current kernel.
|
||||
*
|
||||
@ -126,7 +117,7 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
|
||||
public function boot()
|
||||
{
|
||||
if (true === $this->booted) {
|
||||
throw new \LogicException('The kernel is already booted.');
|
||||
return;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/bootstrap.php';
|
||||
|
Reference in New Issue
Block a user