{"action":"closed","number":10818,"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/10818","id":59091374,"html_url":"https://github.com/yiisoft/yii2/pull/10818","diff_url":"https://github.com/yiisoft/yii2/pull/10818.diff","patch_url":"https://github.com/yiisoft/yii2/pull/10818.patch","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/10818","number":10818,"state":"closed","locked":false,"title":"Refactoring \\yii\\db\\Connection::getDriverName","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"body":"To bit increase performance.\r\nOld code:\r\n```\r\n$dnsString = 'sqlsrv:Server=localhost;Database=test';\r\n\r\nif (($pos = strpos($dnsString, ':')) !== false) {\r\n    echo strtolower(substr($dnsString, 0, $pos));\r\n}\r\n```\r\n\r\nNow\r\n```\r\nif (($foundDSN = strstr($dnsString, ':', true)) !== false) {\r\n    echo strtolower($foundDSN);\r\n}\r\n```\r\n\r\n|   | Old  | Now  |\r\n|---|---|---|\r\n|  time             | 2.1934509277344E-5  |  1.5020370483398E-5 |\r\n| memory        |  370328 |  370320  |\r\n\r\n| \r\n----\r\n\r\n\r\n\r\n","created_at":"2016-02-11T20:49:18Z","updated_at":"2016-05-03T07:00:29Z","closed_at":"2016-05-03T07:00:29Z","merged_at":null,"merge_commit_sha":"87e4a54184742db75d7cca89012ec23846b05940","assignee":null,"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/9","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.x","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/9/labels","id":831720,"number":9,"title":"2.0.x","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":397,"closed_issues":2,"state":"open","created_at":"2014-10-19T13:49:45Z","updated_at":"2016-05-03T07:00:29Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/yiisoft/yii2/pulls/10818/commits","review_comments_url":"https://api.github.com/repos/yiisoft/yii2/pulls/10818/comments","review_comment_url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/10818/comments","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/5775523a6d1fcc0efa60d540107583ca6812e322","head":{"label":"githubjeka:get-driver-name","ref":"get-driver-name","sha":"5775523a6d1fcc0efa60d540107583ca6812e322","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"repo":{"id":21036114,"name":"yii2","full_name":"githubjeka/yii2","owner":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/githubjeka/yii2","description":"Yii 2 framework main development repo","fork":true,"url":"https://api.github.com/repos/githubjeka/yii2","forks_url":"https://api.github.com/repos/githubjeka/yii2/forks","keys_url":"https://api.github.com/repos/githubjeka/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/githubjeka/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/githubjeka/yii2/teams","hooks_url":"https://api.github.com/repos/githubjeka/yii2/hooks","issue_events_url":"https://api.github.com/repos/githubjeka/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/githubjeka/yii2/events","assignees_url":"https://api.github.com/repos/githubjeka/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/githubjeka/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/githubjeka/yii2/tags","blobs_url":"https://api.github.com/repos/githubjeka/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/githubjeka/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/githubjeka/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/githubjeka/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/githubjeka/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/githubjeka/yii2/languages","stargazers_url":"https://api.github.com/repos/githubjeka/yii2/stargazers","contributors_url":"https://api.github.com/repos/githubjeka/yii2/contributors","subscribers_url":"https://api.github.com/repos/githubjeka/yii2/subscribers","subscription_url":"https://api.github.com/repos/githubjeka/yii2/subscription","commits_url":"https://api.github.com/repos/githubjeka/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/githubjeka/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/githubjeka/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/githubjeka/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/githubjeka/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/githubjeka/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/githubjeka/yii2/merges","archive_url":"https://api.github.com/repos/githubjeka/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/githubjeka/yii2/downloads","issues_url":"https://api.github.com/repos/githubjeka/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/githubjeka/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/githubjeka/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/githubjeka/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/githubjeka/yii2/labels{/name}","releases_url":"https://api.github.com/repos/githubjeka/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/githubjeka/yii2/deployments","created_at":"2014-06-20T11:47:58Z","updated_at":"2015-06-02T11:54:32Z","pushed_at":"2016-04-28T12:32:29Z","git_url":"git://github.com/githubjeka/yii2.git","ssh_url":"git@github.com:githubjeka/yii2.git","clone_url":"https://github.com/githubjeka/yii2.git","svn_url":"https://github.com/githubjeka/yii2","homepage":"http://www.yiiframework.com","size":35228,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"yiisoft:master","ref":"master","sha":"e0fd874992c838364ac18ca140ab81c2a22aeff0","user":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"repo":{"id":3431193,"name":"yii2","full_name":"yiisoft/yii2","owner":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yiisoft/yii2","description":"Yii 2 framework main development repo","fork":false,"url":"https://api.github.com/repos/yiisoft/yii2","forks_url":"https://api.github.com/repos/yiisoft/yii2/forks","keys_url":"https://api.github.com/repos/yiisoft/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiisoft/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiisoft/yii2/teams","hooks_url":"https://api.github.com/repos/yiisoft/yii2/hooks","issue_events_url":"https://api.github.com/repos/yiisoft/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/yiisoft/yii2/events","assignees_url":"https://api.github.com/repos/yiisoft/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/yiisoft/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/yiisoft/yii2/tags","blobs_url":"https://api.github.com/repos/yiisoft/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiisoft/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiisoft/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiisoft/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/yiisoft/yii2/languages","stargazers_url":"https://api.github.com/repos/yiisoft/yii2/stargazers","contributors_url":"https://api.github.com/repos/yiisoft/yii2/contributors","subscribers_url":"https://api.github.com/repos/yiisoft/yii2/subscribers","subscription_url":"https://api.github.com/repos/yiisoft/yii2/subscription","commits_url":"https://api.github.com/repos/yiisoft/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiisoft/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiisoft/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiisoft/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiisoft/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/yiisoft/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiisoft/yii2/merges","archive_url":"https://api.github.com/repos/yiisoft/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiisoft/yii2/downloads","issues_url":"https://api.github.com/repos/yiisoft/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/yiisoft/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/yiisoft/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/yiisoft/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiisoft/yii2/labels{/name}","releases_url":"https://api.github.com/repos/yiisoft/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/yiisoft/yii2/deployments","created_at":"2012-02-13T15:32:36Z","updated_at":"2016-05-02T16:16:18Z","pushed_at":"2016-05-03T06:51:14Z","git_url":"git://github.com/yiisoft/yii2.git","ssh_url":"git@github.com:yiisoft/yii2.git","clone_url":"https://github.com/yiisoft/yii2.git","svn_url":"https://github.com/yiisoft/yii2","homepage":"http://www.yiiframework.com","size":55186,"stargazers_count":8003,"watchers_count":8003,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4687,"mirror_url":null,"open_issues_count":988,"forks":4687,"open_issues":988,"watchers":8003,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/10818"},"html":{"href":"https://github.com/yiisoft/yii2/pull/10818"},"issue":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/10818"},"comments":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/10818/comments"},"review_comments":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/10818/comments"},"review_comment":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/10818/commits"},"statuses":{"href":"https://api.github.com/repos/yiisoft/yii2/statuses/5775523a6d1fcc0efa60d540107583ca6812e322"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":2,"commits":2,"additions":9,"deletions":6,"changed_files":1}}