Skip to content

Commit 29fa291

Browse files
committed
Upgrade to PHP-DI 6
1 parent 55f74a3 commit 29fa291

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
},
1818
"require": {
1919
"php": "^7.0",
20-
"php-di/php-di": "^5.4",
21-
"doctrine/cache": "^1.6",
20+
"php-di/php-di": "^6.0",
2221
"mindplay/composer-locator": "^2.1.2"
2322
},
2423
"require-dev": {
2524
"phpunit/phpunit": "^5.7"
26-
}
25+
},
26+
"minimum-stability": "alpha",
27+
"prefer-stable": true
2728
}

src/Kernel.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
namespace DI\Kernel;
44

5-
use ComposerLocator;
6-
use DI\Cache\ArrayCache;
75
use DI\Container;
86
use DI\ContainerBuilder;
9-
use Doctrine\Common\Cache\Cache;
107

118
/**
129
* Application kernel.
@@ -66,11 +63,6 @@ public function createContainer() : Container
6663
{
6764
$containerBuilder = new ContainerBuilder();
6865

69-
$cache = $this->getContainerCache();
70-
if ($cache) {
71-
$containerBuilder->setDefinitionCache($cache);
72-
}
73-
7466
foreach ($this->modules as $module) {
7567
$this->loadModule($containerBuilder, $module);
7668
}
@@ -84,16 +76,6 @@ public function createContainer() : Container
8476
return $containerBuilder->build();
8577
}
8678

87-
/**
88-
* Override this method to configure the cache to use for container definitions.
89-
*
90-
* @return Cache|null
91-
*/
92-
protected function getContainerCache()
93-
{
94-
return new ArrayCache();
95-
}
96-
9779
/**
9880
* Override this method to customize the container builder before it is used.
9981
*/

0 commit comments

Comments
 (0)