Skip to content

Commit 991f478

Browse files
mpdudefabpot
authored andcommitted
[Config] Delegate creation of ConfigCache instances to a factory.
1 parent a1e364c commit 991f478

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Kernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function getBundle($name, $first = true)
252252
}
253253

254254
/**
255-
* {@inheritDoc}
255+
* {@inheritdoc}
256256
*
257257
* @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle
258258
*/
@@ -546,7 +546,7 @@ protected function initializeContainer()
546546
$fresh = false;
547547
}
548548

549-
require_once $cache;
549+
require_once $cache->getPath();
550550

551551
$this->container = new $class();
552552
$this->container->set('kernel', $this);
@@ -695,7 +695,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
695695
$dumper->setProxyDumper(new ProxyDumper());
696696
}
697697

698-
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => (string) $cache));
698+
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath()));
699699
if (!$this->debug) {
700700
$content = static::stripComments($content);
701701
}

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"symfony/phpunit-bridge": "~2.7|~3.0.0",
2727
"symfony/browser-kit": "~2.3|~3.0.0",
2828
"symfony/class-loader": "~2.1|~3.0.0",
29-
"symfony/config": "~2.0,>=2.0.5|~3.0.0",
29+
"symfony/config": "~2.7",
3030
"symfony/console": "~2.3|~3.0.0",
3131
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
3232
"symfony/dependency-injection": "~2.2|~3.0.0",
@@ -40,6 +40,9 @@
4040
"symfony/translation": "~2.0,>=2.0.5|~3.0.0",
4141
"symfony/var-dumper": "~2.6|~3.0.0"
4242
},
43+
"conflict": {
44+
"symfony/config": "<2.7"
45+
},
4346
"suggest": {
4447
"symfony/browser-kit": "",
4548
"symfony/class-loader": "",

0 commit comments

Comments
 (0)