Skip to content

Commit

Permalink
Merge pull request #695 from gam6itko/master
Browse files Browse the repository at this point in the history
EventDispatcher - use case sensitive event names;
  • Loading branch information
goetas committed Nov 12, 2018
2 parents 21a03e1 + a34c75e commit 37d9568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -22,7 +22,7 @@ public function process(ContainerBuilder $container)
}

$class = isset($attributes['class'])
? strtolower($container->getParameterBag()->resolveValue($attributes['class']))
? $container->getParameterBag()->resolveValue($attributes['class'])
: null;

$format = isset($attributes['format']) ? $attributes['format'] : null;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function process(ContainerBuilder $container)
throw new \RuntimeException(sprintf('The service "%s" (class: %s) must return an event for each subscribed event.', $id, $subscriberClass));
}

$class = isset($eventData['class']) ? strtolower($eventData['class']) : null;
$class = isset($eventData['class']) ? $eventData['class'] : null;
$format = isset($eventData['format']) ? $eventData['format'] : null;
$method = isset($eventData['method']) ? $eventData['method'] : EventDispatcher::getDefaultMethodName($eventData['event']);
$priority = isset($eventData['priority']) ? (integer)$eventData['priority'] : 0;
Expand Down
Expand Up @@ -121,7 +121,7 @@ public function testEventListener()
'serializer.pre_serialize' => [
[
['my_listener', 'onserializerpreserialize'],
'bar',
'Bar',
null
]
]], $call[1][0]);
Expand Down Expand Up @@ -161,7 +161,7 @@ public function testEventListenerWithParams()
'serializer.pre_serialize' => [
[
['my_listener', 'onserializerpreserialize'],
'bar',
'Bar',
null
]
]], $call[1][0]);
Expand Down Expand Up @@ -196,7 +196,7 @@ public function testEventSubscriber()
'serializer.pre_serialize' => [
[
['my_listener', 'onserializerpreserialize'],
'bar',
'Bar',
'json',
null
]
Expand Down

0 comments on commit 37d9568

Please sign in to comment.