|
4 | 4 |
|
5 | 5 | namespace DoctrineModule; |
6 | 6 |
|
7 | | -use Composer\InstalledVersions; |
8 | | -use Composer\Semver\VersionParser; |
9 | | -use Doctrine\Common\Cache as DoctrineCache; |
10 | 7 | use DoctrineModule\Cache\LaminasStorageCache; |
11 | 8 | use Laminas\Authentication\Storage\Session as LaminasSessionStorage; |
12 | 9 | use Laminas\Cache\Storage\Adapter\Memory; |
@@ -148,67 +145,12 @@ public function getCachesConfig(): array |
148 | 145 | } |
149 | 146 |
|
150 | 147 | /** |
151 | | - * Use doctrine/cache config, when doctrine/cache:^1.0 is installed, and use laminas/laminas-cache, |
152 | | - * when doctrine/cache:^2.0 is installed, as the latter does not include any cache adapters anymore |
| 148 | + * Use laminas/laminas-cache, as doctrine/cache ^2.0 does not include any cache adapters anymore |
153 | 149 | * |
154 | 150 | * @return array<non-empty-string,array{class:class-string,instance?:string,namespace?:string,directory?:string}> |
155 | 151 | */ |
156 | 152 | private function getDoctrineCacheConfig(): array |
157 | 153 | { |
158 | | - if (InstalledVersions::satisfies(new VersionParser(), 'doctrine/cache', '^1.0')) { |
159 | | - return [ |
160 | | - 'apc' => [ |
161 | | - 'class' => DoctrineCache\ApcCache::class, |
162 | | - 'namespace' => 'DoctrineModule', |
163 | | - ], |
164 | | - 'apcu' => [ |
165 | | - 'class' => DoctrineCache\ApcuCache::class, |
166 | | - 'namespace' => 'DoctrineModule', |
167 | | - ], |
168 | | - 'array' => [ |
169 | | - 'class' => DoctrineCache\ArrayCache::class, |
170 | | - 'namespace' => 'DoctrineModule', |
171 | | - ], |
172 | | - 'filesystem' => [ |
173 | | - 'class' => DoctrineCache\FilesystemCache::class, |
174 | | - 'directory' => 'data/DoctrineModule/cache', |
175 | | - 'namespace' => 'DoctrineModule', |
176 | | - ], |
177 | | - 'memcache' => [ |
178 | | - 'class' => DoctrineCache\MemcacheCache::class, |
179 | | - 'instance' => 'my_memcache_alias', |
180 | | - 'namespace' => 'DoctrineModule', |
181 | | - ], |
182 | | - 'memcached' => [ |
183 | | - 'class' => DoctrineCache\MemcachedCache::class, |
184 | | - 'instance' => 'my_memcached_alias', |
185 | | - 'namespace' => 'DoctrineModule', |
186 | | - ], |
187 | | - 'predis' => [ |
188 | | - 'class' => DoctrineCache\PredisCache::class, |
189 | | - 'instance' => 'my_predis_alias', |
190 | | - 'namespace' => 'DoctrineModule', |
191 | | - ], |
192 | | - 'redis' => [ |
193 | | - 'class' => DoctrineCache\RedisCache::class, |
194 | | - 'instance' => 'my_redis_alias', |
195 | | - 'namespace' => 'DoctrineModule', |
196 | | - ], |
197 | | - 'wincache' => [ |
198 | | - 'class' => DoctrineCache\WinCacheCache::class, |
199 | | - 'namespace' => 'DoctrineModule', |
200 | | - ], |
201 | | - 'xcache' => [ |
202 | | - 'class' => DoctrineCache\XcacheCache::class, |
203 | | - 'namespace' => 'DoctrineModule', |
204 | | - ], |
205 | | - 'zenddata' => [ |
206 | | - 'class' => DoctrineCache\ZendDataCache::class, |
207 | | - 'namespace' => 'DoctrineModule', |
208 | | - ], |
209 | | - ]; |
210 | | - } |
211 | | - |
212 | 154 | return [ |
213 | 155 | 'apcu' => [ |
214 | 156 | 'class' => LaminasStorageCache::class, |
|
0 commit comments