Skip to content

Commit 492e441

Browse files
committed
Merge branch '2.1' into 2.2
* 2.1: Fix default value handling for multi-value options [HttpKernel] truncate profiler token to 6 chars (see #7665) Disabled APC on Travis for PHP 5.5+ as it is not available [HttpFoundation] do not use server variable PATH_INFO because it is already decoded and thus symfony is fragile to double encoding of the path [Yaml] improved boolean naming ($notEOF -> !$EOF) [Yaml] fixed handling an empty value [Routing][XML Loader] Add a possibility to set a default value to null The /e modifier for preg_replace() is deprecated in PHP 5.5; replace with preg_replace_callback() [HttpFoundation] Fixed bug in key searching for NamespacedAttributeBag [Form] DateTimeToRfc3339Transformer use proper transformation exteption in reverse transformation Update PhpEngine.php [HttpFoundation] getClientIp is fixed. Conflicts: .travis.yml src/Symfony/Component/Routing/Loader/XmlFileLoader.php src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
2 parents ca90656 + 50abee3 commit 492e441

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

DependencyInjection/Compiler/RegisterKernelListenersPass.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ public function process(ContainerBuilder $container)
3333
}
3434

3535
if (!isset($event['method'])) {
36-
$event['method'] = 'on'.preg_replace(array(
37-
'/(?<=\b)[a-z]/ie',
38-
'/[^a-z0-9]/i'
39-
), array('strtoupper("\\0")', ''), $event['event']);
36+
$event['method'] = 'on'.preg_replace_callback(array(
37+
'/(?<=\b)[a-z]/i',
38+
'/[^a-z0-9]/i',
39+
), function ($matches) { return strtoupper($matches[0]); }, $event['event']);
40+
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
4041
}
4142

4243
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));

0 commit comments

Comments
 (0)