File tree 4 files changed +28
-3
lines changed
4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 4
4
- 5.5
5
5
- 5.6
6
6
- 7.0
7
+ - 7.1
7
8
- hhvm
8
9
9
10
before_script :
Original file line number Diff line number Diff line change @@ -134,6 +134,22 @@ return [
134
134
];
135
135
```
136
136
137
+ ### Enable Memcached cache
138
+
139
+ If you're using Memcached, you should have only one project per memcached instance.
140
+
141
+ ``` php
142
+ return [
143
+ 'phpdi-zf2' => [
144
+ 'cache' => [
145
+ 'adapter' => 'memcached',
146
+ 'host' => 'localhost', // default is localhost
147
+ 'port' => 11211, // default is 11211
148
+ ],
149
+ ]
150
+ ];
151
+ ```
152
+
137
153
## Console commands
138
154
139
155
### Clear definition cache
Original file line number Diff line number Diff line change 13
13
},
14
14
15
15
"require-dev" : {
16
- "zendframework/zendframework" : " ~2.5" ,
17
16
"squizlabs/php_codesniffer" : " ~2.0" ,
18
17
"phpmd/phpmd" : " ~2.0" ,
19
- "phpunit/phpunit" : " ~4.8"
18
+ "phpunit/phpunit" : " ~4.8" ,
19
+ "zendframework/zendframework" : " ^2.5"
20
20
},
21
21
22
22
"autoload" : {
Original file line number Diff line number Diff line change 8
8
*/
9
9
namespace DI \ZendFramework2 ;
10
10
11
+ // compatibility with zend > 2.5
12
+ $ controllerType = 'ControllerLoader ' ;
13
+ if (class_exists ('\Zend\Version\Version ' )) {
14
+ if (\Zend \Version \Version::compareVersion ('2.5.3 ' ) <= 0 ) {
15
+ $ controllerType = 'ControllerManager ' ;
16
+ }
17
+ }
18
+
11
19
return [
12
20
'controllers ' => [
13
21
'invokables ' => [
21
29
),
22
30
23
31
'factories ' => [
24
- ' ControllerLoader ' => __NAMESPACE__ . '\\Service \\ControllerLoaderFactory ' ,
32
+ $ controllerType => __NAMESPACE__ . '\\Service \\ControllerLoaderFactory ' ,
25
33
'DiCache ' => __NAMESPACE__ . '\\Service \\CacheFactory\CacheFactory ' ,
26
34
],
27
35
],
You can’t perform that action at this time.
0 commit comments