{"action":"created","issue":{"url":"https://api.github.com/repos/container-interop/definition-interop/issues/1","labels_url":"https://api.github.com/repos/container-interop/definition-interop/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/container-interop/definition-interop/issues/1/comments","events_url":"https://api.github.com/repos/container-interop/definition-interop/issues/1/events","html_url":"https://github.com/container-interop/definition-interop/pull/1","id":118712930,"number":1,"title":"Add DefinitionProvider to allow modules to provide definitions","user":{"login":"mnapoli","id":720328,"avatar_url":"https://avatars.githubusercontent.com/u/720328?v=3","gravatar_id":"","url":"https://api.github.com/users/mnapoli","html_url":"https://github.com/mnapoli","followers_url":"https://api.github.com/users/mnapoli/followers","following_url":"https://api.github.com/users/mnapoli/following{/other_user}","gists_url":"https://api.github.com/users/mnapoli/gists{/gist_id}","starred_url":"https://api.github.com/users/mnapoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnapoli/subscriptions","organizations_url":"https://api.github.com/users/mnapoli/orgs","repos_url":"https://api.github.com/users/mnapoli/repos","events_url":"https://api.github.com/users/mnapoli/events{/privacy}","received_events_url":"https://api.github.com/users/mnapoli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-24T22:03:50Z","updated_at":"2015-11-26T09:35:02Z","closed_at":"2015-11-25T21:42:27Z","pull_request":{"url":"https://api.github.com/repos/container-interop/definition-interop/pulls/1","html_url":"https://github.com/container-interop/definition-interop/pull/1","diff_url":"https://github.com/container-interop/definition-interop/pull/1.diff","patch_url":"https://github.com/container-interop/definition-interop/pull/1.patch"},"body":"Modules need to be able to expose definitions to the framework (or module system) that is consuming them. To do that, they can implement this interface to return definitions to register.\r\n\r\nI don't remember what was the conclusion today but after thinking about it more I think we have to have this interface. Even if using Puli or something in the `extra` section in `composer.json`, we need to have this class (definitions can't come out of nowhere).\r\n\r\nExample:\r\n\r\n```php\r\nnamespace MyModule;\r\n\r\nclass DefinitionProvider implements Interop\\Container\\Definition\\DefinitionProvider\r\n{\r\n    public function getDefinitions()\r\n    {\r\n        return [ ... ];\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/container-interop/definition-interop/issues/comments/159858264","html_url":"https://github.com/container-interop/definition-interop/pull/1#issuecomment-159858264","issue_url":"https://api.github.com/repos/container-interop/definition-interop/issues/1","id":159858264,"user":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T09:35:02Z","updated_at":"2015-11-26T09:35:02Z","body":"Ok, I agree.\r\n\r\n> And it's always useful to be able to unregister a module, while not having to uninstall it.\r\n\r\nJust to pinpoint one particular feature of Puli: Puli allows you to \"bind\" a class/resource by default, but gives the end user the possibility to \"unbind\" it manually. So using Puli, we could really install packages automatically, and still, give the possibility to the end-user to disable the package if it does not want it enabled by default. Which is cool. But still ok to build a system that is manually registered by default, and to have Puli as an optional brick on the top of that.\r\n\r\n"}}