File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ class Configuration implements ConfigurationInterface
26
26
*/
27
27
public function getConfigTreeBuilder ()
28
28
{
29
- $ treeBuilder = new TreeBuilder ('florianv_swap ' );
30
-
31
- if (method_exists ($ treeBuilder , 'getRootNode ' )) {
29
+ if (method_exists (TreeBuilder::class, 'getRootNode ' )) {
30
+ $ treeBuilder = new TreeBuilder ('florianv_swap ' );
32
31
$ rootNode = $ treeBuilder ->getRootNode ();
33
32
} else {
33
+ $ treeBuilder = new TreeBuilder ();
34
34
$ rootNode = $ treeBuilder ->root ('florianv_swap ' );
35
35
}
36
36
@@ -199,15 +199,17 @@ public function getConfigTreeBuilder()
199
199
return $ treeBuilder ;
200
200
}
201
201
202
+
202
203
private function createSimpleProviderNode ($ name )
203
204
{
204
- $ treeBuilder = new TreeBuilder ($ name );
205
-
206
- if (method_exists ($ treeBuilder , 'getRootNode ' )) {
205
+ if (method_exists (TreeBuilder::class, 'getRootNode ' )) {
206
+ $ treeBuilder = new TreeBuilder ($ name );
207
207
$ node = $ treeBuilder ->getRootNode ();
208
208
} else {
209
+ $ treeBuilder = new TreeBuilder ();
209
210
$ node = $ treeBuilder ->root ($ name );
210
211
}
212
+
211
213
$ node
212
214
->children ()
213
215
->integerNode ('priority ' )->defaultValue (0 )->end ()
Original file line number Diff line number Diff line change 15
15
use Swap \Builder ;
16
16
use Swap \Swap ;
17
17
use Symfony \Component \Cache \Adapter ;
18
- use Symfony \Component \Cache \Traits \ ApcuTrait ;
18
+ use Symfony \Component \Cache \Adapter \ ApcuAdapter ;
19
19
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
20
20
use Symfony \Component \DependencyInjection \ContainerBuilder ;
21
21
use Symfony \Component \DependencyInjection \Definition ;
@@ -123,7 +123,7 @@ public function testArrayCache()
123
123
124
124
public function testApcuCache ()
125
125
{
126
- if (!ApcuTrait ::isSupported ()) {
126
+ if (!ApcuAdapter ::isSupported ()) {
127
127
$ this ->markTestSkipped ('APCU is not enabled ' );
128
128
}
129
129
@@ -160,6 +160,7 @@ private function buildContainer(array $providers = ['fixer' => ['access_key' =>
160
160
*
161
161
* @param $class
162
162
* @param $config
163
+ * @throws \Exception
163
164
*/
164
165
private function assertCache ($ class , $ config )
165
166
{
Original file line number Diff line number Diff line change 17
17
},
18
18
"require" : {
19
19
"php" : " ^5.6|^7.0" ,
20
- "symfony/framework-bundle" : " ~3.0 || ~4 .0" ,
20
+ "symfony/framework-bundle" : " ~3.0|~4.0|~5 .0" ,
21
21
"florianv/swap" : " ^4.0"
22
22
},
23
23
"require-dev" : {
24
24
"php-http/guzzle6-adapter" : " ^1.0" ,
25
25
"php-http/message" : " ^1.7" ,
26
- "symfony/cache" : " ~3.0|~4.0" ,
26
+ "symfony/cache" : " ~3.0|~4.0|~5.0 " ,
27
27
"phpunit/phpunit" : " ~5.0" ,
28
28
"nyholm/psr7" : " ^1.1"
29
29
},
You can’t perform that action at this time.
0 commit comments