{"action":"created","issue":{"url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/39","repository_url":"https://api.github.com/repos/SimpleBus/SymfonyBridge","labels_url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/39/comments","events_url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/39/events","html_url":"https://github.com/SimpleBus/SymfonyBridge/issues/39","id":196176068,"number":39,"title":"Simpler configuration with reflection","user":{"login":"unkind","id":1517363,"avatar_url":"https://avatars.githubusercontent.com/u/1517363?v=3","gravatar_id":"","url":"https://api.github.com/users/unkind","html_url":"https://github.com/unkind","followers_url":"https://api.github.com/users/unkind/followers","following_url":"https://api.github.com/users/unkind/following{/other_user}","gists_url":"https://api.github.com/users/unkind/gists{/gist_id}","starred_url":"https://api.github.com/users/unkind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unkind/subscriptions","organizations_url":"https://api.github.com/users/unkind/orgs","repos_url":"https://api.github.com/users/unkind/repos","events_url":"https://api.github.com/users/unkind/events{/privacy}","received_events_url":"https://api.github.com/users/unkind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-16T23:23:17Z","updated_at":"2016-12-30T17:32:51Z","closed_at":null,"body":"Hi,\r\n\r\nhttp://simplebus.github.io/SymfonyBridge/doc/event_bus_bundle.html\r\n\r\nAs far as I can see from the doc above, if I need to register listener, I have to write something like\r\n```yml\r\nservices:\r\n    user_registered_event_subscriber:\r\n        class: Acme\\Listeners\\SendEmailVerificationInstructionsSubscriber\r\n        tags:\r\n            - { name: event_subscriber, subscribes_to: Acme\\Events\\UserRegistered, method: onUserRegistered  }\r\n            - { name: event_subscriber, subscribes_to: Acme\\Events\\UserChangedEmail, method: onUserChangedEmail }\r\n```\r\nfor the given class:\r\n```php\r\nfinal class SendEmailVerificationInstructionsSubscriber\r\n{\r\n    public function onUserRegistered(UserRegistered $event)\r\n    {\r\n        // ...\r\n    }\r\n\r\n    public function onUserChangedEmail(UserChangedEmail $event)\r\n    {\r\n        // ...\r\n    }    \r\n}\r\n```\r\n\r\nDo I understand right, that the SymfonyBridge doesn't provide way to register all methods via reflection yet? I mean, you copy-paste method names and event classes into configuration, but in most cases it can be done automatically (well, for class-based naming strategy at least):\r\n```yml\r\nservices:\r\n    user_registered_event_subscriber:\r\n        class: Acme\\Listeners\\SendEmailVerificationInstructionsSubscriber\r\n        tags:\r\n            - { name: event_subscriber, auto: true }\r\n```"},"comment":{"url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/comments/269798934","html_url":"https://github.com/SimpleBus/SymfonyBridge/issues/39#issuecomment-269798934","issue_url":"https://api.github.com/repos/SimpleBus/SymfonyBridge/issues/39","id":269798934,"user":{"login":"cmodijk","id":771041,"avatar_url":"https://avatars.githubusercontent.com/u/771041?v=3","gravatar_id":"","url":"https://api.github.com/users/cmodijk","html_url":"https://github.com/cmodijk","followers_url":"https://api.github.com/users/cmodijk/followers","following_url":"https://api.github.com/users/cmodijk/following{/other_user}","gists_url":"https://api.github.com/users/cmodijk/gists{/gist_id}","starred_url":"https://api.github.com/users/cmodijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmodijk/subscriptions","organizations_url":"https://api.github.com/users/cmodijk/orgs","repos_url":"https://api.github.com/users/cmodijk/repos","events_url":"https://api.github.com/users/cmodijk/events{/privacy}","received_events_url":"https://api.github.com/users/cmodijk/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T17:32:51Z","updated_at":"2016-12-30T17:32:51Z","body":"> Can you explain what's wrong with it in this case? It runs at container compilation time, it reduces bugs due to misconfiguration, makes things easier. I can make a PR if we can find consensus on this one.\r\n\r\nYes please make the PR I think it is a great feature. I'm not sure if i'm going to use it myself tough but please create one. \r\n"}}
{"actor":{"display_login":"cmodijk"}}