{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/44221768","id":44221768,"diff_hunk":"@@ -600,4 +607,22 @@ private static function initFormats()\n             'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',\n         );\n     }\n+\n+    /**\n+     * @param string $line\n+     * @return bool\n+     */\n+    private function adjustBarWidthToWindowWidth($line)\n+    {\n+        $lineLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $line);\n+        $windowWidth = exec('tput cols');\n+\n+        if ($lineLength > $windowWidth) {\n+            $barWidthDelta = $lineLength - $windowWidth;\n+            $newBarWidth = $this->barWidth - $barWidthDelta - 20;\n+            $this->setBarWidth($newBarWidth);\n+            return true;","path":"src/Symfony/Component/Console/Helper/ProgressBar.php","position":34,"original_position":34,"commit_id":"4edfabc5208c3938f5102b6b7f7defbd37259009","original_commit_id":"4edfabc5208c3938f5102b6b7f7defbd37259009","user":{"login":"1ed","id":162986,"avatar_url":"https://avatars.githubusercontent.com/u/162986?v=3","gravatar_id":"","url":"https://api.github.com/users/1ed","html_url":"https://github.com/1ed","followers_url":"https://api.github.com/users/1ed/followers","following_url":"https://api.github.com/users/1ed/following{/other_user}","gists_url":"https://api.github.com/users/1ed/gists{/gist_id}","starred_url":"https://api.github.com/users/1ed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ed/subscriptions","organizations_url":"https://api.github.com/users/1ed/orgs","repos_url":"https://api.github.com/users/1ed/repos","events_url":"https://api.github.com/users/1ed/events{/privacy}","received_events_url":"https://api.github.com/users/1ed/received_events","type":"User","site_admin":false},"body":"An empty line required before the return... but this method looks strange to me anyway... you should change something or return something but not both... why is return required?","created_at":"2015-11-08T07:42:40Z","updated_at":"2015-11-08T07:42:40Z","html_url":"https://github.com/symfony/symfony/pull/16490#discussion_r44221768","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/16490","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/44221768"},"html":{"href":"https://github.com/symfony/symfony/pull/16490#discussion_r44221768"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/16490"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/16490","id":49994772,"html_url":"https://github.com/symfony/symfony/pull/16490","diff_url":"https://github.com/symfony/symfony/pull/16490.diff","patch_url":"https://github.com/symfony/symfony/pull/16490.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/16490","number":16490,"state":"open","locked":false,"title":"[Console] progress bar fix","user":{"login":"TomasVotruba","id":924196,"avatar_url":"https://avatars.githubusercontent.com/u/924196?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasVotruba","html_url":"https://github.com/TomasVotruba","followers_url":"https://api.github.com/users/TomasVotruba/followers","following_url":"https://api.github.com/users/TomasVotruba/following{/other_user}","gists_url":"https://api.github.com/users/TomasVotruba/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasVotruba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasVotruba/subscriptions","organizations_url":"https://api.github.com/users/TomasVotruba/orgs","repos_url":"https://api.github.com/users/TomasVotruba/repos","events_url":"https://api.github.com/users/TomasVotruba/events{/privacy}","received_events_url":"https://api.github.com/users/TomasVotruba/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #13019\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nThis is just a simple proposal for the issue. \r\n\r\nI don't understand `override()` deep enough method yet. I'd like to hear some feedback to the solution and to improve it further.\r\n\r\nIt solves it partially, by limiting too long static output to shorter progress bar width. Window resizing or dynamic line size breaks.\r\n","created_at":"2015-11-06T19:32:29Z","updated_at":"2015-11-08T07:42:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a239fcd6a62900d5ac6b2bc58f4380d3cf9f6980","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/16490/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/16490/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/16490/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/4edfabc5208c3938f5102b6b7f7defbd37259009","head":{"label":"TomasVotruba:console-progress-bar-fix","ref":"console-progress-bar-fix","sha":"4edfabc5208c3938f5102b6b7f7defbd37259009","user":{"login":"TomasVotruba","id":924196,"avatar_url":"https://avatars.githubusercontent.com/u/924196?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasVotruba","html_url":"https://github.com/TomasVotruba","followers_url":"https://api.github.com/users/TomasVotruba/followers","following_url":"https://api.github.com/users/TomasVotruba/following{/other_user}","gists_url":"https://api.github.com/users/TomasVotruba/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasVotruba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasVotruba/subscriptions","organizations_url":"https://api.github.com/users/TomasVotruba/orgs","repos_url":"https://api.github.com/users/TomasVotruba/repos","events_url":"https://api.github.com/users/TomasVotruba/events{/privacy}","received_events_url":"https://api.github.com/users/TomasVotruba/received_events","type":"User","site_admin":false},"repo":{"id":45224822,"name":"symfony","full_name":"TomasVotruba/symfony","owner":{"login":"TomasVotruba","id":924196,"avatar_url":"https://avatars.githubusercontent.com/u/924196?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasVotruba","html_url":"https://github.com/TomasVotruba","followers_url":"https://api.github.com/users/TomasVotruba/followers","following_url":"https://api.github.com/users/TomasVotruba/following{/other_user}","gists_url":"https://api.github.com/users/TomasVotruba/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasVotruba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasVotruba/subscriptions","organizations_url":"https://api.github.com/users/TomasVotruba/orgs","repos_url":"https://api.github.com/users/TomasVotruba/repos","events_url":"https://api.github.com/users/TomasVotruba/events{/privacy}","received_events_url":"https://api.github.com/users/TomasVotruba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomasVotruba/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/TomasVotruba/symfony","forks_url":"https://api.github.com/repos/TomasVotruba/symfony/forks","keys_url":"https://api.github.com/repos/TomasVotruba/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomasVotruba/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomasVotruba/symfony/teams","hooks_url":"https://api.github.com/repos/TomasVotruba/symfony/hooks","issue_events_url":"https://api.github.com/repos/TomasVotruba/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/TomasVotruba/symfony/events","assignees_url":"https://api.github.com/repos/TomasVotruba/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/TomasVotruba/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/TomasVotruba/symfony/tags","blobs_url":"https://api.github.com/repos/TomasVotruba/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomasVotruba/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomasVotruba/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomasVotruba/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomasVotruba/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/TomasVotruba/symfony/languages","stargazers_url":"https://api.github.com/repos/TomasVotruba/symfony/stargazers","contributors_url":"https://api.github.com/repos/TomasVotruba/symfony/contributors","subscribers_url":"https://api.github.com/repos/TomasVotruba/symfony/subscribers","subscription_url":"https://api.github.com/repos/TomasVotruba/symfony/subscription","commits_url":"https://api.github.com/repos/TomasVotruba/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomasVotruba/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomasVotruba/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomasVotruba/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomasVotruba/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/TomasVotruba/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomasVotruba/symfony/merges","archive_url":"https://api.github.com/repos/TomasVotruba/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomasVotruba/symfony/downloads","issues_url":"https://api.github.com/repos/TomasVotruba/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/TomasVotruba/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/TomasVotruba/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/TomasVotruba/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomasVotruba/symfony/labels{/name}","releases_url":"https://api.github.com/repos/TomasVotruba/symfony/releases{/id}","created_at":"2015-10-30T02:42:27Z","updated_at":"2015-10-30T02:42:47Z","pushed_at":"2015-11-06T19:29:18Z","git_url":"git://github.com/TomasVotruba/symfony.git","ssh_url":"git@github.com:TomasVotruba/symfony.git","clone_url":"https://github.com/TomasVotruba/symfony.git","svn_url":"https://github.com/TomasVotruba/symfony","homepage":"symfony.com","size":63359,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.8"}},"base":{"label":"symfony:master","ref":"master","sha":"4acfc3e26f7c02ba2cb43c0fbba6756dd8b2e998","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","created_at":"2010-01-04T14:21:21Z","updated_at":"2015-11-08T06:34:59Z","pushed_at":"2015-11-07T23:32:22Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":258048,"stargazers_count":11092,"watchers_count":11092,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4361,"mirror_url":null,"open_issues_count":795,"forks":4361,"open_issues":795,"watchers":11092,"default_branch":"2.8"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/16490"},"html":{"href":"https://github.com/symfony/symfony/pull/16490"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/16490"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/16490/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/16490/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/16490/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/4edfabc5208c3938f5102b6b7f7defbd37259009"}}}}