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

Deprecate Statement::bindParam($driverOptions) #4534

Merged
merged 1 commit into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Upgrade to 3.1

## Deprecated `Connection::$_schemaManager` and `Connection::getSchemaManager()`
## Deprecated `$driverOptions` argument of `PDO\Statement::bindParam()` and `PDO\SQLSrv\Statement::bindParam()`

The usage of the `$driverOptions` argument of `PDO\Statement::bindParam()` and `PDO\SQLSrv\Statement::bindParam()` is deprecated.
To define parameter binding type as `ASCII`, `BINARY` or `BLOB`, use the corresponding `ParameterType::*` constant.

## Deprecated `Connection::$_schemaManager` and `Connection::getSchemaManager()`

The usage of `Connection::$_schemaManager` and `Connection::getSchemaManager()` is deprecated.
Use `Connection::createSchemaManager()` instead.
Expand Down Expand Up @@ -484,7 +489,7 @@ Code that extends either of the classes needs to be adjusted in order to functio

# Upgrade to 2.11

## Deprecated `Abstraction\Result`
## Deprecated `Abstraction\Result`

The usage of the `Doctrine\DBAL\Abstraction\Result` interface is deprecated. In DBAL 3.0, the statement result at the wrapper level will be represented by the `Doctrine\DBAL\Result` class.

Expand All @@ -503,9 +508,9 @@ The usage of the wrapper `Connection` and `Statement` classes as implementations

## Deprecations in the wrapper `Connection` class

1. The `executeUpdate()` method has been deprecated in favor of `executeStatement()`.
2. The `query()` method has been deprecated in favor of `executeQuery()`.
3. The `exec()` method has been deprecated in favor of `executeStatement()`.
1. The `executeUpdate()` method has been deprecated in favor of `executeStatement()`.
2. The `query()` method has been deprecated in favor of `executeQuery()`.
3. The `exec()` method has been deprecated in favor of `executeStatement()`.

Note that `PrimaryReplicaConnection::query()` ensures connection to the primary instance while `executeQuery()` doesn't.

Expand Down Expand Up @@ -620,7 +625,7 @@ Consumers of the Connection class should not rely on connection parameters store
## Deprecated `Portability\Connection::PORTABILITY_{PLATFORM}` constants

The platform-specific portability mode flags are meant to be used only by the portability layer internally to optimize
the user-provided mode for the current database platform.
the user-provided mode for the current database platform.

## Deprecated `MasterSlaveConnection` use `PrimaryReadReplicaConnection`

Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/SQLSrv/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(PDOStatement $statement)
* @param mixed $variable
* @param int $type
* @param int|null $length
* @param mixed $driverOptions
* @param mixed $driverOptions The usage of the argument is deprecated.
*/
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function bindValue($param, $value, $type = ParameterType::STRING)
* @param mixed $variable
* @param int $type
* @param int|null $length
* @param mixed $driverOptions
* @param mixed $driverOptions The usage of the argument is deprecated.
*
* @return bool
*/
Expand Down