-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
@@ -243,80 +243,4 @@ public function testGetParamsOverride() | |||
'host' => 'foo', | |||
], $conn->getParams()); | |||
} | |||
|
|||
public function testGetHostOverride() |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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>
?
There was a problem hiding this comment.
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.
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Enforced parameter and return value types in Connection classes
Notes:
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.DriverException
thrown byOCI8Connection::lastInsertId()
because this method needs to be split apart: one for sequences, another for identity columns.