{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5275","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5275/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5275/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5275/events","html_url":"https://github.com/composer/composer/pull/5275","id":152494382,"number":5275,"title":"document plugin capabilities (closes #5262)","user":{"login":"bamarni","id":1205386,"avatar_url":"https://avatars.githubusercontent.com/u/1205386?v=3","gravatar_id":"","url":"https://api.github.com/users/bamarni","html_url":"https://github.com/bamarni","followers_url":"https://api.github.com/users/bamarni/followers","following_url":"https://api.github.com/users/bamarni/following{/other_user}","gists_url":"https://api.github.com/users/bamarni/gists{/gist_id}","starred_url":"https://api.github.com/users/bamarni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamarni/subscriptions","organizations_url":"https://api.github.com/users/bamarni/orgs","repos_url":"https://api.github.com/users/bamarni/repos","events_url":"https://api.github.com/users/bamarni/events{/privacy}","received_events_url":"https://api.github.com/users/bamarni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-02T07:20:38Z","updated_at":"2016-05-02T10:35:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/composer/composer/pulls/5275","html_url":"https://github.com/composer/composer/pull/5275","diff_url":"https://github.com/composer/composer/pull/5275.diff","patch_url":"https://github.com/composer/composer/pull/5275.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/216193714","html_url":"https://github.com/composer/composer/pull/5275#issuecomment-216193714","issue_url":"https://api.github.com/repos/composer/composer/issues/5275","id":216193714,"user":{"login":"nevvermind","id":834932,"avatar_url":"https://avatars.githubusercontent.com/u/834932?v=3","gravatar_id":"","url":"https://api.github.com/users/nevvermind","html_url":"https://github.com/nevvermind","followers_url":"https://api.github.com/users/nevvermind/followers","following_url":"https://api.github.com/users/nevvermind/following{/other_user}","gists_url":"https://api.github.com/users/nevvermind/gists{/gist_id}","starred_url":"https://api.github.com/users/nevvermind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevvermind/subscriptions","organizations_url":"https://api.github.com/users/nevvermind/orgs","repos_url":"https://api.github.com/users/nevvermind/repos","events_url":"https://api.github.com/users/nevvermind/events{/privacy}","received_events_url":"https://api.github.com/users/nevvermind/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T10:35:25Z","updated_at":"2016-05-02T10:35:25Z","body":"Hey, @bamarni. I have a couple of suggestion here:\r\n\r\na) Maybe we should expand more on what exactly these plugin capabilities are. It's not exactly clear from that description;\r\n\r\nb) I don't think we should provide a snippet for capabilities. That would mean to provide one for every future one, too; and that will considerably clutter the Plugins page. As they are interfaces, they should be their own documentation, so I would rather you augment their phpdocs [here](https://github.com/composer/composer/blob/761d6a549c229befce49863bf3d282b4a35bbbbe/src/Composer/Plugin/Capability/CommandProvider.php#L18-L21) and [here](https://github.com/composer/composer/blob/761d6a549c229befce49863bf3d282b4a35bbbbe/src/Composer/Plugin/Capable.php#L25-L31). This could also help in avoiding duplicating documentation;\r\n\r\nc) your `My\\Composer\\Plugin` must implement `Composer\\Plugin\\Capable`, so that snippet's incorrect;\r\n\r\nConclusion: \r\n- I would add a more substantial description of what a Plugin Capability mechanism is;\r\n- I would add a snippet showing how a Capable Plugin must declare the `getCapabilities` method in particular, as that's the tricky part\r\n- I would just create a list like this:\r\n\r\n`<example>`\r\nComposer defines a standard set of capabilities which may be implemented by plugins through the [`Composer\\Plugin\\Capable`][8] interface:\r\n- [CommandProvider](https://github.com/composer/composer/blob/master/src/Composer/Plugin/Capability/CommandProvider.php)  \r\n\r\n`</example>`"}}