Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforced parameter and return value types in Connection classes #3568

Merged
merged 1 commit into from
May 30, 2019

Conversation

morozov
Copy link
Member

@morozov morozov commented May 30, 2019

Q A
Type improvement
BC Break yes

Notes:

  1. Alongside with the removed Connection methods, I'd like to be able to remove ::getParams() as well in order to make connection parameters internal to the object and be able to modify them without introducing further BC breaks.
  2. I didn't document the new DriverException thrown by OCI8Connection::lastInsertId() because this method needs to be split apart: one for sequences, another for identity columns.

@@ -243,80 +243,4 @@ public function testGetParamsOverride()
'host' => 'foo',
], $conn->getParams());
}

public function testGetHostOverride()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality of switching shards is still covered by the test above.

* @param int[]|string[] $types The query parameter types.
* @param string $query The SQL query.
* @param array<int, mixed>|array<string, mixed> $params The prepared statement params.
* @param array<int, int|string>|array<string, int|string> $types The query parameter types.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be written as array<int|string, int|string>?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. It's either an array with integer keys corresponding to parameter positions or an array with string keys corresponding to their names. Not a mix.

@morozov morozov merged commit 4e0a6e9 into doctrine:develop May 30, 2019
@morozov morozov deleted the connection-types branch May 30, 2019 03:52
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit that referenced this pull request Jun 13, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit that referenced this pull request Jun 27, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit that referenced this pull request Jun 27, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit that referenced this pull request Jun 27, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request Aug 26, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request Aug 26, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request Aug 26, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit to morozov/dbal that referenced this pull request Aug 27, 2019
Enforced parameter and return value types in Connection classes
morozov added a commit that referenced this pull request Nov 2, 2019
Enforced parameter and return value types in Connection classes
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants