The /e modifier for preg_replace() is deprecated in PHP 5.5; replace with preg_replace_callback()
This commit is contained in:
parent
c8bd45b2c7
commit
b22d2ff925
@ -33,10 +33,11 @@ class RegisterKernelListenersPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
if (!isset($event['method'])) {
|
||||
$event['method'] = 'on'.preg_replace(array(
|
||||
'/(?<=\b)[a-z]/ie',
|
||||
'/[^a-z0-9]/i'
|
||||
), array('strtoupper("\\0")', ''), $event['event']);
|
||||
$event['method'] = 'on'.preg_replace_callback(array(
|
||||
'/(?<=\b)[a-z]/i',
|
||||
'/[^a-z0-9]/i',
|
||||
), function ($matches) { return strtoupper($matches[0]); }, $event['event']);
|
||||
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
|
||||
}
|
||||
|
||||
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));
|
||||
|
Reference in New Issue
Block a user