{"action":"opened","number":434,"pull_request":{"url":"https://api.github.com/repos/phalcon/incubator/pulls/434","id":46540630,"html_url":"https://github.com/phalcon/incubator/pull/434","diff_url":"https://github.com/phalcon/incubator/pull/434.diff","patch_url":"https://github.com/phalcon/incubator/pull/434.patch","issue_url":"https://api.github.com/repos/phalcon/incubator/issues/434","number":434,"state":"open","locked":false,"title":"Robuster parsing of task file for CLI","user":{"login":"basilfx","id":815976,"avatar_url":"https://avatars.githubusercontent.com/u/815976?v=3","gravatar_id":"","url":"https://api.github.com/users/basilfx","html_url":"https://github.com/basilfx","followers_url":"https://api.github.com/users/basilfx/followers","following_url":"https://api.github.com/users/basilfx/following{/other_user}","gists_url":"https://api.github.com/users/basilfx/gists{/gist_id}","starred_url":"https://api.github.com/users/basilfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basilfx/subscriptions","organizations_url":"https://api.github.com/users/basilfx/orgs","repos_url":"https://api.github.com/users/basilfx/repos","events_url":"https://api.github.com/users/basilfx/events{/privacy}","received_events_url":"https://api.github.com/users/basilfx/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nWhen using `Phalcon\\Cli\\Console\\Extended` in combination with namespaced task classes, the command `php app/cli.php taskname --help` shows no descriptions, even if they are applied. Removing the namespacing fixes the issue, but this is not a ideal solution for me.\r\n\r\nI have located the problem and propose a fix.\r\n\r\nAs an example, consider a task with the name `App\\Tasks\\ConfigTask` that resides in `app/tasks/ConfigTask.php`. Before this fix, `$taskName` is parsed as `tasks/s/config` and no descriptions appear. With the patch it is parsed as `config` and the descriptions appear. I believe the `trim()` method does not work as expected, or not in all situations.\r\n\r\nI have verified this fix in a non-namespaced situation too.","created_at":"2015-10-01T15:44:41Z","updated_at":"2015-10-01T15:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phalcon/incubator/pulls/434/commits","review_comments_url":"https://api.github.com/repos/phalcon/incubator/pulls/434/comments","review_comment_url":"https://api.github.com/repos/phalcon/incubator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phalcon/incubator/issues/434/comments","statuses_url":"https://api.github.com/repos/phalcon/incubator/statuses/e5129f2a64ca66c73991b7d4a66e5b2a863eefd0","head":{"label":"basilfx:master","ref":"master","sha":"e5129f2a64ca66c73991b7d4a66e5b2a863eefd0","user":{"login":"basilfx","id":815976,"avatar_url":"https://avatars.githubusercontent.com/u/815976?v=3","gravatar_id":"","url":"https://api.github.com/users/basilfx","html_url":"https://github.com/basilfx","followers_url":"https://api.github.com/users/basilfx/followers","following_url":"https://api.github.com/users/basilfx/following{/other_user}","gists_url":"https://api.github.com/users/basilfx/gists{/gist_id}","starred_url":"https://api.github.com/users/basilfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basilfx/subscriptions","organizations_url":"https://api.github.com/users/basilfx/orgs","repos_url":"https://api.github.com/users/basilfx/repos","events_url":"https://api.github.com/users/basilfx/events{/privacy}","received_events_url":"https://api.github.com/users/basilfx/received_events","type":"User","site_admin":false},"repo":{"id":43504117,"name":"incubator","full_name":"basilfx/incubator","owner":{"login":"basilfx","id":815976,"avatar_url":"https://avatars.githubusercontent.com/u/815976?v=3","gravatar_id":"","url":"https://api.github.com/users/basilfx","html_url":"https://github.com/basilfx","followers_url":"https://api.github.com/users/basilfx/followers","following_url":"https://api.github.com/users/basilfx/following{/other_user}","gists_url":"https://api.github.com/users/basilfx/gists{/gist_id}","starred_url":"https://api.github.com/users/basilfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basilfx/subscriptions","organizations_url":"https://api.github.com/users/basilfx/orgs","repos_url":"https://api.github.com/users/basilfx/repos","events_url":"https://api.github.com/users/basilfx/events{/privacy}","received_events_url":"https://api.github.com/users/basilfx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/basilfx/incubator","description":"Incubator adapters/functionality for the Phalcon PHP Framework","fork":true,"url":"https://api.github.com/repos/basilfx/incubator","forks_url":"https://api.github.com/repos/basilfx/incubator/forks","keys_url":"https://api.github.com/repos/basilfx/incubator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basilfx/incubator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basilfx/incubator/teams","hooks_url":"https://api.github.com/repos/basilfx/incubator/hooks","issue_events_url":"https://api.github.com/repos/basilfx/incubator/issues/events{/number}","events_url":"https://api.github.com/repos/basilfx/incubator/events","assignees_url":"https://api.github.com/repos/basilfx/incubator/assignees{/user}","branches_url":"https://api.github.com/repos/basilfx/incubator/branches{/branch}","tags_url":"https://api.github.com/repos/basilfx/incubator/tags","blobs_url":"https://api.github.com/repos/basilfx/incubator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basilfx/incubator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basilfx/incubator/git/refs{/sha}","trees_url":"https://api.github.com/repos/basilfx/incubator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basilfx/incubator/statuses/{sha}","languages_url":"https://api.github.com/repos/basilfx/incubator/languages","stargazers_url":"https://api.github.com/repos/basilfx/incubator/stargazers","contributors_url":"https://api.github.com/repos/basilfx/incubator/contributors","subscribers_url":"https://api.github.com/repos/basilfx/incubator/subscribers","subscription_url":"https://api.github.com/repos/basilfx/incubator/subscription","commits_url":"https://api.github.com/repos/basilfx/incubator/commits{/sha}","git_commits_url":"https://api.github.com/repos/basilfx/incubator/git/commits{/sha}","comments_url":"https://api.github.com/repos/basilfx/incubator/comments{/number}","issue_comment_url":"https://api.github.com/repos/basilfx/incubator/issues/comments{/number}","contents_url":"https://api.github.com/repos/basilfx/incubator/contents/{+path}","compare_url":"https://api.github.com/repos/basilfx/incubator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basilfx/incubator/merges","archive_url":"https://api.github.com/repos/basilfx/incubator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basilfx/incubator/downloads","issues_url":"https://api.github.com/repos/basilfx/incubator/issues{/number}","pulls_url":"https://api.github.com/repos/basilfx/incubator/pulls{/number}","milestones_url":"https://api.github.com/repos/basilfx/incubator/milestones{/number}","notifications_url":"https://api.github.com/repos/basilfx/incubator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basilfx/incubator/labels{/name}","releases_url":"https://api.github.com/repos/basilfx/incubator/releases{/id}","created_at":"2015-10-01T15:21:51Z","updated_at":"2015-10-01T15:21:52Z","pushed_at":"2015-10-01T15:34:05Z","git_url":"git://github.com/basilfx/incubator.git","ssh_url":"git@github.com:basilfx/incubator.git","clone_url":"https://github.com/basilfx/incubator.git","svn_url":"https://github.com/basilfx/incubator","homepage":null,"size":3063,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phalcon:master","ref":"master","sha":"5c2e758f4f3b41a99d9cd6f2dac4c239ff1a9522","user":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"User","site_admin":false},"repo":{"id":6857360,"name":"incubator","full_name":"phalcon/incubator","owner":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phalcon/incubator","description":"Incubator adapters/functionality for the Phalcon PHP Framework","fork":false,"url":"https://api.github.com/repos/phalcon/incubator","forks_url":"https://api.github.com/repos/phalcon/incubator/forks","keys_url":"https://api.github.com/repos/phalcon/incubator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phalcon/incubator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phalcon/incubator/teams","hooks_url":"https://api.github.com/repos/phalcon/incubator/hooks","issue_events_url":"https://api.github.com/repos/phalcon/incubator/issues/events{/number}","events_url":"https://api.github.com/repos/phalcon/incubator/events","assignees_url":"https://api.github.com/repos/phalcon/incubator/assignees{/user}","branches_url":"https://api.github.com/repos/phalcon/incubator/branches{/branch}","tags_url":"https://api.github.com/repos/phalcon/incubator/tags","blobs_url":"https://api.github.com/repos/phalcon/incubator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phalcon/incubator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phalcon/incubator/git/refs{/sha}","trees_url":"https://api.github.com/repos/phalcon/incubator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phalcon/incubator/statuses/{sha}","languages_url":"https://api.github.com/repos/phalcon/incubator/languages","stargazers_url":"https://api.github.com/repos/phalcon/incubator/stargazers","contributors_url":"https://api.github.com/repos/phalcon/incubator/contributors","subscribers_url":"https://api.github.com/repos/phalcon/incubator/subscribers","subscription_url":"https://api.github.com/repos/phalcon/incubator/subscription","commits_url":"https://api.github.com/repos/phalcon/incubator/commits{/sha}","git_commits_url":"https://api.github.com/repos/phalcon/incubator/git/commits{/sha}","comments_url":"https://api.github.com/repos/phalcon/incubator/comments{/number}","issue_comment_url":"https://api.github.com/repos/phalcon/incubator/issues/comments{/number}","contents_url":"https://api.github.com/repos/phalcon/incubator/contents/{+path}","compare_url":"https://api.github.com/repos/phalcon/incubator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phalcon/incubator/merges","archive_url":"https://api.github.com/repos/phalcon/incubator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phalcon/incubator/downloads","issues_url":"https://api.github.com/repos/phalcon/incubator/issues{/number}","pulls_url":"https://api.github.com/repos/phalcon/incubator/pulls{/number}","milestones_url":"https://api.github.com/repos/phalcon/incubator/milestones{/number}","notifications_url":"https://api.github.com/repos/phalcon/incubator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phalcon/incubator/labels{/name}","releases_url":"https://api.github.com/repos/phalcon/incubator/releases{/id}","created_at":"2012-11-25T23:45:51Z","updated_at":"2015-09-30T10:04:50Z","pushed_at":"2015-10-01T07:50:53Z","git_url":"git://github.com/phalcon/incubator.git","ssh_url":"git@github.com:phalcon/incubator.git","clone_url":"https://github.com/phalcon/incubator.git","svn_url":"https://github.com/phalcon/incubator","homepage":null,"size":3063,"stargazers_count":410,"watchers_count":410,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":236,"mirror_url":null,"open_issues_count":8,"forks":236,"open_issues":8,"watchers":410,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/434"},"html":{"href":"https://github.com/phalcon/incubator/pull/434"},"issue":{"href":"https://api.github.com/repos/phalcon/incubator/issues/434"},"comments":{"href":"https://api.github.com/repos/phalcon/incubator/issues/434/comments"},"review_comments":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/434/comments"},"review_comment":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/434/commits"},"statuses":{"href":"https://api.github.com/repos/phalcon/incubator/statuses/e5129f2a64ca66c73991b7d4a66e5b2a863eefd0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":3,"changed_files":1}}