Skip to content

Commit

Permalink
Deprecate Statement::bindParam($driverOptions)
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Mar 6, 2021
1 parent d1b8728 commit 3c9a54b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
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 @@ -24,7 +24,7 @@ public function __construct(PDOStatement $statement)
/**
* {@inheritdoc}
*
* @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

0 comments on commit 3c9a54b

Please sign in to comment.