symfony/symfony — pull request #10065 by lyrixx (2014-01-18 15:12:19+00:00)
Title: [EventDispatcher] Throw exception is subscriber is miss configured

| Q | A
| ------------- | ---
| Bug fix? | maybe
| New feature? | no
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -

Lot of new comers (during trainings) made the same typo:

```php
class TestEventSubscriberTypo implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array('pre.foo', 'preFoo');
}
}
```

instead of

class TestEventSubscriberTypo implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array('pre.foo' => 'preFoo');
}
}
```

So I added a check.

This can be a BC break as the event name can be an int. But I think (I hope?)
nobody do that.