Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ce89f6

Browse files
committed
delete '?:' who are used only to increase perf with big regex
1 parent c27b969 commit 0ce89f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getConfigTreeBuilder()
3838
->children()
3939
->booleanNode('toolbar')->defaultFalse()->end()
4040
->booleanNode('intercept_redirects')->defaultFalse()->end()
41-
->scalarNode('excluded_ajax_paths')->defaultValue('^/((?:index|app(_[\w]+)?)\.php/)?_wdt')->end()
41+
->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?)\.php/)?_wdt')->end()
4242
->end()
4343
;
4444

src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public function testConfigTree($options, $results)
3232
public function getDebugModes()
3333
{
3434
return array(
35-
array(array(), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((?:index|app(_[\w]+)?)\.php/)?_wdt')),
36-
array(array('intercept_redirects' => true), array('intercept_redirects' => true, 'toolbar' => false, 'excluded_ajax_paths' => '^/((?:index|app(_[\w]+)?)\.php/)?_wdt')),
37-
array(array('intercept_redirects' => false), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((?:index|app(_[\w]+)?)\.php/)?_wdt')),
35+
array(array(), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')),
36+
array(array('intercept_redirects' => true), array('intercept_redirects' => true, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')),
37+
array(array('intercept_redirects' => false), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')),
3838
array(array('toolbar' => true), array('intercept_redirects' => false, 'toolbar' => true, 'excluded_ajax_paths' => '^/((?:index|app(_[\w]+)?)\.php/)?_wdt')),
3939
array(array('excluded_ajax_paths' => 'test'), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => 'test')),
4040
);

0 commit comments

Comments
 (0)