Переглянути джерело

Make urls in sidebar relative by default. (#4481)

Stas Kuryan 7 роки тому
батько
коміт
e7a7f41234

+ 1 - 1
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -101,7 +101,7 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
                     'label' => !empty($attributes['label']) ? $attributes['label'] : '',
                     'label' => !empty($attributes['label']) ? $attributes['label'] : '',
                     'route' => '',
                     'route' => '',
                     'route_params' => array(),
                     'route_params' => array(),
-                    'route_absolute' => true,
+                    'route_absolute' => false,
                 );
                 );
 
 
                 if (isset($groupDefaults[$resolvedGroupName]['on_top']) && $groupDefaults[$resolvedGroupName]['on_top']
                 if (isset($groupDefaults[$resolvedGroupName]['on_top']) && $groupDefaults[$resolvedGroupName]['on_top']

+ 2 - 2
DependencyInjection/Configuration.php

@@ -180,7 +180,7 @@ class Configuration implements ConfigurationInterface
                                                             'label' => '',
                                                             'label' => '',
                                                             'route' => '',
                                                             'route' => '',
                                                             'route_params' => array(),
                                                             'route_params' => array(),
-                                                            'route_absolute' => true,
+                                                            'route_absolute' => false,
                                                         );
                                                         );
                                                     }
                                                     }
                                                 }
                                                 }
@@ -204,7 +204,7 @@ class Configuration implements ConfigurationInterface
                                                 ->end()
                                                 ->end()
                                                 ->booleanNode('route_absolute')
                                                 ->booleanNode('route_absolute')
                                                     ->info('Whether the generated url should be absolute')
                                                     ->info('Whether the generated url should be absolute')
-                                                    ->defaultTrue()
+                                                    ->defaultFalse()
                                                 ->end()
                                                 ->end()
                                             ->end()
                                             ->end()
                                         ->end()
                                         ->end()

+ 3 - 3
Tests/DependencyInjection/ConfigurationTest.php

@@ -148,7 +148,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
                 'label' => '',
                 'label' => '',
                 'route' => '',
                 'route' => '',
                 'route_params' => array(),
                 'route_params' => array(),
-                'route_absolute' => true,
+                'route_absolute' => false,
                 'roles' => array(),
                 'roles' => array(),
             )
             )
         );
         );
@@ -159,7 +159,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
                 'label' => '',
                 'label' => '',
                 'route' => '',
                 'route' => '',
                 'route_params' => array(),
                 'route_params' => array(),
-                'route_absolute' => true,
+                'route_absolute' => false,
                 'roles' => array(),
                 'roles' => array(),
             )
             )
         );
         );
@@ -182,7 +182,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
                 'route_params' => array(),
                 'route_params' => array(),
                 'admin' => '',
                 'admin' => '',
                 'roles' => array(),
                 'roles' => array(),
-                'route_absolute' => true,
+                'route_absolute' => false,
             )
             )
         );
         );
     }
     }