We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b20a0c commit 1f41f28Copy full SHA for 1f41f28
config/module.config.php
@@ -8,6 +8,15 @@
8
*/
9
namespace DI\ZendFramework2;
10
11
+// compatibility with zend > 2.5
12
+$controllerType = 'ControllerLoader';
13
+if (class_exists('\Zend\Version\Version')) {
14
+ $version = new \Zend\Version\Version();
15
+ if ($version::compareVersion('2.5.0') <= 0) {
16
+ $controllerType = 'ControllerManager';
17
+ }
18
+}
19
+
20
return [
21
'controllers' => [
22
'invokables' => [
@@ -21,7 +30,7 @@
30
),
31
23
32
'factories' => [
24
- 'ControllerLoader' => __NAMESPACE__ . '\\Service\\ControllerLoaderFactory',
33
+ $controllerType => __NAMESPACE__ . '\\Service\\ControllerLoaderFactory',
25
34
'DiCache' => __NAMESPACE__ . '\\Service\\CacheFactory',
26
35
],
27
36
0 commit comments