{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/comments/234427287","pull_request_review_id":176073934,"id":234427287,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQyNzI4Nw==","diff_hunk":"@@ -15,62 +15,72 @@\n {\n     /**\n      * Prepares a statement for execution and returns a Statement object.\n+     *\n+     * @param string $sql The SQL query to prepare.\n+     *\n+     * @return Statement The prepared statement.\n      */\n     public function prepare(string $sql) : Statement;\n \n     /**\n      * Executes an SQL statement, returning a result set as a Statement object.\n      *\n+     * @param string $sql The SQL query to execute.\n+     *\n+     * @return ResultStatement The result statement.\n+     *\n      * @throws DBALException\n      */\n     public function query(string $sql) : ResultStatement;\n \n     /**\n      * Quotes a string for use in a query.\n      *\n-     * @param mixed $input\n-     * @param int   $type\n+     * If the driver does not support quoting, an exception is thrown.","path":"lib/Doctrine/DBAL/Driver/Connection.php","position":27,"original_position":27,"commit_id":"43da935bfaac8c1a2c3fb23547ac2aa6465849ab","original_commit_id":"8d86a7a5fda4e90207189d40ebd379e5bf856693","user":{"login":"morozov","id":59683,"node_id":"MDQ6VXNlcjU5Njgz","avatar_url":"https://avatars1.githubusercontent.com/u/59683?v=4","gravatar_id":"","url":"https://api.github.com/users/morozov","html_url":"https://github.com/morozov","followers_url":"https://api.github.com/users/morozov/followers","following_url":"https://api.github.com/users/morozov/following{/other_user}","gists_url":"https://api.github.com/users/morozov/gists{/gist_id}","starred_url":"https://api.github.com/users/morozov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morozov/subscriptions","organizations_url":"https://api.github.com/users/morozov/orgs","repos_url":"https://api.github.com/users/morozov/repos","events_url":"https://api.github.com/users/morozov/events{/privacy}","received_events_url":"https://api.github.com/users/morozov/received_events","type":"User","site_admin":false},"body":"Regarding the \"if the driver does not support quoting\", I'd remove it.","created_at":"2018-11-18T02:23:16Z","updated_at":"2018-11-18T02:23:16Z","html_url":"https://github.com/doctrine/dbal/pull/3335#discussion_r234427287","pull_request_url":"https://api.github.com/repos/doctrine/dbal/pulls/3335","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/comments/234427287"},"html":{"href":"https://github.com/doctrine/dbal/pull/3335#discussion_r234427287"},"pull_request":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/3335"}},"in_reply_to_id":234300772},"pull_request":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/3335","id":227269368,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MjY5MzY4","html_url":"https://github.com/doctrine/dbal/pull/3335","diff_url":"https://github.com/doctrine/dbal/pull/3335.diff","patch_url":"https://github.com/doctrine/dbal/pull/3335.patch","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/3335","number":3335,"state":"open","locked":false,"title":"DBAL 3.0: suggestions to improve the Driver\\Connection interface","user":{"login":"BenMorel","id":1952838,"node_id":"MDQ6VXNlcjE5NTI4Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/1952838?v=4","gravatar_id":"","url":"https://api.github.com/users/BenMorel","html_url":"https://github.com/BenMorel","followers_url":"https://api.github.com/users/BenMorel/followers","following_url":"https://api.github.com/users/BenMorel/following{/other_user}","gists_url":"https://api.github.com/users/BenMorel/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorel/subscriptions","organizations_url":"https://api.github.com/users/BenMorel/orgs","repos_url":"https://api.github.com/users/BenMorel/repos","events_url":"https://api.github.com/users/BenMorel/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorel/received_events","type":"User","site_admin":false},"body":"|      Q       |   A\r\n|------------- | -----------\r\n| Type         | improvement\r\n| BC Break     | yes\r\n| Fixed issues | #3334 \r\n\r\n#### Summary\r\n\r\nThis PR proposes a first batch of changes to the `Driver\\Connection` interface, suggested in #3334:\r\n\r\n## Return `void` in `beginTransaction()`, `commit()`, `rollBack()`\r\n\r\nTakeaway from the issue:\r\n\r\n> Because Doctrine forces PDO::ERRMODE_EXCEPTION, it makes no sense IMO to return false on error in any method; we'd rather enforce always throwing exceptions when something goes wrong, which would make the interface consistent with the methods that already guarantee to throw on error, such as prepare() and query().\r\n\r\n> As it stands, these methods in the PDOConnection can never return false, they always return true or throw an exception, so the bool return type makes no sense in this driver.\r\n\r\n> Furthermore, I can see that many implementations actually don't respect the current contract, and don't return any value in these methods (DBAL\\Connection, MasterSlaveConnection, DB2Connection, ...), so this change makes even more sense.\r\n\r\n\r\n# Type-hint parameters and return types\r\n\r\n- `beginTransaction()`, `commit()`, `rollBack()` as described above\r\n- `lastInsertId()` that always receives a `string|null` and always returns `string`\r\n- `quote()` that should always return `string` or throw an exception (?)\r\n\r\n**These changes do not break any tests.**","created_at":"2018-10-31T12:37:27Z","updated_at":"2018-11-18T02:23:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eca4af4ba689ce9aff89a1490856e757733654c0","assignee":{"login":"morozov","id":59683,"node_id":"MDQ6VXNlcjU5Njgz","avatar_url":"https://avatars1.githubusercontent.com/u/59683?v=4","gravatar_id":"","url":"https://api.github.com/users/morozov","html_url":"https://github.com/morozov","followers_url":"https://api.github.com/users/morozov/followers","following_url":"https://api.github.com/users/morozov/following{/other_user}","gists_url":"https://api.github.com/users/morozov/gists{/gist_id}","starred_url":"https://api.github.com/users/morozov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morozov/subscriptions","organizations_url":"https://api.github.com/users/morozov/orgs","repos_url":"https://api.github.com/users/morozov/repos","events_url":"https://api.github.com/users/morozov/events{/privacy}","received_events_url":"https://api.github.com/users/morozov/received_events","type":"User","site_admin":false},"assignees":[{"login":"morozov","id":59683,"node_id":"MDQ6VXNlcjU5Njgz","avatar_url":"https://avatars1.githubusercontent.com/u/59683?v=4","gravatar_id":"","url":"https://api.github.com/users/morozov","html_url":"https://github.com/morozov","followers_url":"https://api.github.com/users/morozov/followers","following_url":"https://api.github.com/users/morozov/following{/other_user}","gists_url":"https://api.github.com/users/morozov/gists{/gist_id}","starred_url":"https://api.github.com/users/morozov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morozov/subscriptions","organizations_url":"https://api.github.com/users/morozov/orgs","repos_url":"https://api.github.com/users/morozov/repos","events_url":"https://api.github.com/users/morozov/events{/privacy}","received_events_url":"https://api.github.com/users/morozov/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":308827849,"node_id":"MDU6TGFiZWwzMDg4Mjc4NDk=","url":"https://api.github.com/repos/doctrine/dbal/labels/BC%20Break","name":"BC Break","color":"e11d21","default":false},{"id":308809145,"node_id":"MDU6TGFiZWwzMDg4MDkxNDU=","url":"https://api.github.com/repos/doctrine/dbal/labels/Connections","name":"Connections","color":"bfe5bf","default":false},{"id":225630784,"node_id":"MDU6TGFiZWwyMjU2MzA3ODQ=","url":"https://api.github.com/repos/doctrine/dbal/labels/Improvement","name":"Improvement","color":"0052cc","default":false}],"milestone":{"url":"https://api.github.com/repos/doctrine/dbal/milestones/3","html_url":"https://github.com/doctrine/dbal/milestone/3","labels_url":"https://api.github.com/repos/doctrine/dbal/milestones/3/labels","id":1446225,"node_id":"MDk6TWlsZXN0b25lMTQ0NjIyNQ==","number":3,"title":"3.0.0","description":"","creator":{"login":"beberlei","id":26936,"node_id":"MDQ6VXNlcjI2OTM2","avatar_url":"https://avatars2.githubusercontent.com/u/26936?v=4","gravatar_id":"","url":"https://api.github.com/users/beberlei","html_url":"https://github.com/beberlei","followers_url":"https://api.github.com/users/beberlei/followers","following_url":"https://api.github.com/users/beberlei/following{/other_user}","gists_url":"https://api.github.com/users/beberlei/gists{/gist_id}","starred_url":"https://api.github.com/users/beberlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beberlei/subscriptions","organizations_url":"https://api.github.com/users/beberlei/orgs","repos_url":"https://api.github.com/users/beberlei/repos","events_url":"https://api.github.com/users/beberlei/events{/privacy}","received_events_url":"https://api.github.com/users/beberlei/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":34,"state":"open","created_at":"2015-12-06T13:18:43Z","updated_at":"2018-11-15T00:16:45Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/doctrine/dbal/pulls/3335/commits","review_comments_url":"https://api.github.com/repos/doctrine/dbal/pulls/3335/comments","review_comment_url":"https://api.github.com/repos/doctrine/dbal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/3335/comments","statuses_url":"https://api.github.com/repos/doctrine/dbal/statuses/43da935bfaac8c1a2c3fb23547ac2aa6465849ab","head":{"label":"BenMorel:develop_connection_interface","ref":"develop_connection_interface","sha":"43da935bfaac8c1a2c3fb23547ac2aa6465849ab","user":{"login":"BenMorel","id":1952838,"node_id":"MDQ6VXNlcjE5NTI4Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/1952838?v=4","gravatar_id":"","url":"https://api.github.com/users/BenMorel","html_url":"https://github.com/BenMorel","followers_url":"https://api.github.com/users/BenMorel/followers","following_url":"https://api.github.com/users/BenMorel/following{/other_user}","gists_url":"https://api.github.com/users/BenMorel/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorel/subscriptions","organizations_url":"https://api.github.com/users/BenMorel/orgs","repos_url":"https://api.github.com/users/BenMorel/repos","events_url":"https://api.github.com/users/BenMorel/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorel/received_events","type":"User","site_admin":false},"repo":{"id":7467964,"node_id":"MDEwOlJlcG9zaXRvcnk3NDY3OTY0","name":"dbal","full_name":"BenMorel/dbal","private":false,"owner":{"login":"BenMorel","id":1952838,"node_id":"MDQ6VXNlcjE5NTI4Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/1952838?v=4","gravatar_id":"","url":"https://api.github.com/users/BenMorel","html_url":"https://github.com/BenMorel","followers_url":"https://api.github.com/users/BenMorel/followers","following_url":"https://api.github.com/users/BenMorel/following{/other_user}","gists_url":"https://api.github.com/users/BenMorel/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorel/subscriptions","organizations_url":"https://api.github.com/users/BenMorel/orgs","repos_url":"https://api.github.com/users/BenMorel/repos","events_url":"https://api.github.com/users/BenMorel/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorel/received_events","type":"User","site_admin":false},"html_url":"https://github.com/BenMorel/dbal","description":"Doctrine Database Abstraction Layer","fork":true,"url":"https://api.github.com/repos/BenMorel/dbal","forks_url":"https://api.github.com/repos/BenMorel/dbal/forks","keys_url":"https://api.github.com/repos/BenMorel/dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BenMorel/dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BenMorel/dbal/teams","hooks_url":"https://api.github.com/repos/BenMorel/dbal/hooks","issue_events_url":"https://api.github.com/repos/BenMorel/dbal/issues/events{/number}","events_url":"https://api.github.com/repos/BenMorel/dbal/events","assignees_url":"https://api.github.com/repos/BenMorel/dbal/assignees{/user}","branches_url":"https://api.github.com/repos/BenMorel/dbal/branches{/branch}","tags_url":"https://api.github.com/repos/BenMorel/dbal/tags","blobs_url":"https://api.github.com/repos/BenMorel/dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BenMorel/dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BenMorel/dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/BenMorel/dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BenMorel/dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/BenMorel/dbal/languages","stargazers_url":"https://api.github.com/repos/BenMorel/dbal/stargazers","contributors_url":"https://api.github.com/repos/BenMorel/dbal/contributors","subscribers_url":"https://api.github.com/repos/BenMorel/dbal/subscribers","subscription_url":"https://api.github.com/repos/BenMorel/dbal/subscription","commits_url":"https://api.github.com/repos/BenMorel/dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/BenMorel/dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/BenMorel/dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/BenMorel/dbal/issues/comments{/number}","contents_url":"https://api.github.com/repos/BenMorel/dbal/contents/{+path}","compare_url":"https://api.github.com/repos/BenMorel/dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BenMorel/dbal/merges","archive_url":"https://api.github.com/repos/BenMorel/dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BenMorel/dbal/downloads","issues_url":"https://api.github.com/repos/BenMorel/dbal/issues{/number}","pulls_url":"https://api.github.com/repos/BenMorel/dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/BenMorel/dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/BenMorel/dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BenMorel/dbal/labels{/name}","releases_url":"https://api.github.com/repos/BenMorel/dbal/releases{/id}","deployments_url":"https://api.github.com/repos/BenMorel/dbal/deployments","created_at":"2013-01-06T13:22:38Z","updated_at":"2015-04-25T10:19:57Z","pushed_at":"2018-11-17T23:52:30Z","git_url":"git://github.com/BenMorel/dbal.git","ssh_url":"git@github.com:BenMorel/dbal.git","clone_url":"https://github.com/BenMorel/dbal.git","svn_url":"https://github.com/BenMorel/dbal","homepage":"http://www.doctrine-project.org/projects/dbal","size":24101,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"doctrine:develop","ref":"develop","sha":"fa42c100631f85bbcdcc0bde0c22884cc75671ba","user":{"login":"doctrine","id":209254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTI1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/209254?v=4","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":677464,"node_id":"MDEwOlJlcG9zaXRvcnk2Nzc0NjQ=","name":"dbal","full_name":"doctrine/dbal","private":false,"owner":{"login":"doctrine","id":209254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTI1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/209254?v=4","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/doctrine/dbal","description":"Doctrine Database Abstraction Layer","fork":false,"url":"https://api.github.com/repos/doctrine/dbal","forks_url":"https://api.github.com/repos/doctrine/dbal/forks","keys_url":"https://api.github.com/repos/doctrine/dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/dbal/teams","hooks_url":"https://api.github.com/repos/doctrine/dbal/hooks","issue_events_url":"https://api.github.com/repos/doctrine/dbal/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/dbal/events","assignees_url":"https://api.github.com/repos/doctrine/dbal/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/dbal/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/dbal/tags","blobs_url":"https://api.github.com/repos/doctrine/dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/dbal/languages","stargazers_url":"https://api.github.com/repos/doctrine/dbal/stargazers","contributors_url":"https://api.github.com/repos/doctrine/dbal/contributors","subscribers_url":"https://api.github.com/repos/doctrine/dbal/subscribers","subscription_url":"https://api.github.com/repos/doctrine/dbal/subscription","commits_url":"https://api.github.com/repos/doctrine/dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/dbal/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/dbal/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/dbal/merges","archive_url":"https://api.github.com/repos/doctrine/dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/dbal/downloads","issues_url":"https://api.github.com/repos/doctrine/dbal/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/dbal/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/dbal/releases{/id}","deployments_url":"https://api.github.com/repos/doctrine/dbal/deployments","created_at":"2010-05-20T17:01:42Z","updated_at":"2018-11-17T21:58:19Z","pushed_at":"2018-11-17T23:52:32Z","git_url":"git://github.com/doctrine/dbal.git","ssh_url":"git@github.com:doctrine/dbal.git","clone_url":"https://github.com/doctrine/dbal.git","svn_url":"https://github.com/doctrine/dbal","homepage":"https://www.doctrine-project.org/projects/dbal.html","size":25684,"stargazers_count":3712,"watchers_count":3712,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":922,"mirror_url":null,"archived":false,"open_issues_count":445,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":922,"open_issues":445,"watchers":3712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/3335"},"html":{"href":"https://github.com/doctrine/dbal/pull/3335"},"issue":{"href":"https://api.github.com/repos/doctrine/dbal/issues/3335"},"comments":{"href":"https://api.github.com/repos/doctrine/dbal/issues/3335/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/3335/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/3335/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/dbal/statuses/43da935bfaac8c1a2c3fb23547ac2aa6465849ab"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"morozov"}}