{"action":"created","issue":{"url":"https://api.github.com/repos/Kdyby/Doctrine/issues/239","repository_url":"https://api.github.com/repos/Kdyby/Doctrine","labels_url":"https://api.github.com/repos/Kdyby/Doctrine/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/Kdyby/Doctrine/issues/239/comments","events_url":"https://api.github.com/repos/Kdyby/Doctrine/issues/239/events","html_url":"https://github.com/Kdyby/Doctrine/issues/239","id":132967889,"number":239,"title":"Independency on Kdyby/Events","user":{"login":"enumag","id":539462,"avatar_url":"https://avatars.githubusercontent.com/u/539462?v=3","gravatar_id":"","url":"https://api.github.com/users/enumag","html_url":"https://github.com/enumag","followers_url":"https://api.github.com/users/enumag/followers","following_url":"https://api.github.com/users/enumag/following{/other_user}","gists_url":"https://api.github.com/users/enumag/gists{/gist_id}","starred_url":"https://api.github.com/users/enumag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enumag/subscriptions","organizations_url":"https://api.github.com/users/enumag/orgs","repos_url":"https://api.github.com/users/enumag/repos","events_url":"https://api.github.com/users/enumag/events{/privacy}","received_events_url":"https://api.github.com/users/enumag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Kdyby/Doctrine/labels/feature","name":"feature","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Kdyby/Doctrine/milestones/2","html_url":"https://github.com/Kdyby/Doctrine/milestones/v4.0","labels_url":"https://api.github.com/repos/Kdyby/Doctrine/milestones/2/labels","id":1576652,"number":2,"title":"v4.0","description":"","creator":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":0,"state":"open","created_at":"2016-02-10T22:51:55Z","updated_at":"2016-02-11T16:09:36Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-02-11T12:59:32Z","updated_at":"2016-02-11T16:14:54Z","closed_at":null,"body":"I'd like to remove Kdyby/Events from my projects. The reason is that Kdyby/Events is overcomplicated and I'd prefer some minimalistic integration of Doctrine EventManager instead. I don't need Nette/Object integration, I don't actually need namespaces, I rarely need debug panel, and I don't even want priorities.\r\n\r\nThe only thing I really do need is subscribers as services which means I just need to copy-paste the [ContainerAwareEventManager](https://github.com/symfony/doctrine-bridge/blob/master/ContainerAwareEventManager.php) from Symfony and modify it for Nette\\DI.\r\n\r\nIf I wanted to implement priorities I'd do it completely compile-time. Of course that would mean no priorities for non-service listeners but I don't mind.\r\n\r\nWhat does it mean for Kdyby/Doctrine? Is a service of type `Doctrine\\Common\\EventManager` enough or does it actually require something specific to Kdyby/Events?"},"comment":{"url":"https://api.github.com/repos/Kdyby/Doctrine/issues/comments/182939238","html_url":"https://github.com/Kdyby/Doctrine/issues/239#issuecomment-182939238","issue_url":"https://api.github.com/repos/Kdyby/Doctrine/issues/239","id":182939238,"user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T16:14:54Z","updated_at":"2016-02-11T16:14:54Z","body":"Those are some good todos to solve for kdyby/events ;)\r\n\r\nAnyway, there is no direct dependency on kdyby/events that I'm aware of, apart from the namespaces.\r\n\r\nSo basically, the `OrmExtension` could look if the `EventsExtension` is registered in compiler\r\n- if it is, create the `NamespacedEventManager` service and bind it\r\n- if not, look for it with `getByType(EventManager)` and wire that instead\r\n- otherwise throw with explanation\r\n\r\nMakes sense?"}}