{"action":"created","issue":{"url":"https://api.github.com/repos/xp-framework/command/issues/9","repository_url":"https://api.github.com/repos/xp-framework/command","labels_url":"https://api.github.com/repos/xp-framework/command/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/xp-framework/command/issues/9/comments","events_url":"https://api.github.com/repos/xp-framework/command/issues/9/events","html_url":"https://github.com/xp-framework/command/pull/9","id":164847610,"number":9,"title":"Make commands runnable via `xp [class]`","user":{"login":"thekid","id":696742,"avatar_url":"https://avatars.githubusercontent.com/u/696742?v=3","gravatar_id":"","url":"https://api.github.com/users/thekid","html_url":"https://github.com/thekid","followers_url":"https://api.github.com/users/thekid/followers","following_url":"https://api.github.com/users/thekid/following{/other_user}","gists_url":"https://api.github.com/users/thekid/gists{/gist_id}","starred_url":"https://api.github.com/users/thekid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thekid/subscriptions","organizations_url":"https://api.github.com/users/thekid/orgs","repos_url":"https://api.github.com/users/thekid/repos","events_url":"https://api.github.com/users/thekid/events{/privacy}","received_events_url":"https://api.github.com/users/thekid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xp-framework/command/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-11T14:15:23Z","updated_at":"2016-07-12T14:04:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xp-framework/command/pulls/9","html_url":"https://github.com/xp-framework/command/pull/9","diff_url":"https://github.com/xp-framework/command/pull/9.diff","patch_url":"https://github.com/xp-framework/command/pull/9.patch"},"body":"Previous:\r\n\r\n```sh\r\n$ xp Test\r\nUncaught exception: Exception lang.Error (Call to undefined static method lang.Object::main())\r\n  at lang.Object::__callStatic((0x4)'main', array[1]) [line 369 of class-main.php]\r\n```\r\n\r\nNow:\r\n\r\n```sh\r\n$ xp Test\r\nTest\r\n\r\n$ xp Test -?\r\n@FileSystemCL<.>\r\nTest\r\n════════════════════════════════════════════════════════════════════════\r\n\r\n> Usage\r\n\r\n  $ xp cmd Test\r\n```\r\n\r\nAlternatively, we could output an error message like *The class `Test' is intended for use by the \"cmd\" subcommand*, but because it's so easily fixable, why not simply offer this?\r\n\r\n@johannes85 & @kiesel - what do you think about this?"},"comment":{"url":"https://api.github.com/repos/xp-framework/command/issues/comments/232057429","html_url":"https://github.com/xp-framework/command/pull/9#issuecomment-232057429","issue_url":"https://api.github.com/repos/xp-framework/command/issues/9","id":232057429,"user":{"login":"thekid","id":696742,"avatar_url":"https://avatars.githubusercontent.com/u/696742?v=3","gravatar_id":"","url":"https://api.github.com/users/thekid","html_url":"https://github.com/thekid","followers_url":"https://api.github.com/users/thekid/followers","following_url":"https://api.github.com/users/thekid/following{/other_user}","gists_url":"https://api.github.com/users/thekid/gists{/gist_id}","starred_url":"https://api.github.com/users/thekid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thekid/subscriptions","organizations_url":"https://api.github.com/users/thekid/orgs","repos_url":"https://api.github.com/users/thekid/repos","events_url":"https://api.github.com/users/thekid/events{/privacy}","received_events_url":"https://api.github.com/users/thekid/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T14:04:29Z","updated_at":"2016-07-12T14:04:29Z","body":"> since a naming collision could be undetected.\r\n\r\nNot sure I get this. `xp Test` will load the class in *Test.class.php* and run its *main()* method. With this works regardless of whether it is a command or not. There can not be a naming collision between a command named Test and a regular class named test because both would be declared in the same file."}}
{"actor":{"display_login":"thekid"}}