Skip to content

Commit

Permalink
Deprecate query() and exec() in favor of executeQuery() and executeSt…
Browse files Browse the repository at this point in the history
…atement()
  • Loading branch information
morozov committed Jul 11, 2020
1 parent 524a23b commit 35e9150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 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()`.

## PDO-related classes outside of the PDO namespace are deprecated

Expand Down
4 changes: 4 additions & 0 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,8 @@ public function project($query, array $params, Closure $function)
/**
* Executes an SQL statement, returning a result set as a Statement object.
*
* @deprecated Use {@link executeQuery()} instead.
*
* @return \Doctrine\DBAL\Driver\Statement
*
* @throws DBALException
Expand Down Expand Up @@ -1360,6 +1362,8 @@ public function executeStatement($sql, array $params = [], array $types = [])
/**
* Executes an SQL statement and return the number of affected rows.
*
* @deprecated Use {@link executeStatement()} instead.
*
* @param string $statement
*
* @return int The number of affected rows.
Expand Down

0 comments on commit 35e9150

Please sign in to comment.