8000 Documentation on `DBAL\Driver\Statement::bindValue` is incorrect by gjdanis · Pull Request #4212 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Documentation on DBAL\Driver\Statement::bindValue is incorrect #4212

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Driver/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ interface Statement extends ResultStatement
* this will be a parameter name of the form :name. For a prepared statement
* using question mark placeholders, this will be the 1-indexed position of the parameter.
* @param mixed $value The value to bind to the parameter.
* @param int $type Explicit data type for the parameter using the {@link ParameterType}
* constants.
* @param mixed $type Explicit data type for the parameter using the {@link ParameterType}
Copy link
Member

Choose a reason for hiding this comment

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

This change is invalid. All implementations of this interface must accept integers. A specific implementation (Doctrine\DBAL\Statement) accepts other types but they are not part of the interface.

Copy link
Contributor Author
@gjdanis gjdanis Aug 18, 2020

Choose a reason for hiding this comment

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

Thanks @morozov - is the documentation incorrect then on Doctrine\DBAL\Connection::prepare? FWIW changing the documentation on prepare to return a Doctrine\DBAL\Statement (and not a driver statement) fixes the issue for us.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like it's already fixed in 15d9be0 but not yet released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are there plans to create a release in the near future?

Copy link
Member

Choose a reason for hiding this comment

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

We're waiting for #3980 to be resolved in order to release 2.10.3, 2.11.0, and 3.0.0. We can release 2.10.3 earlier but there's no reason for that right now.

* constants or a reference to a {@link Type} implementation.
*
* @return bool TRUE on success or FALSE on failure.
*/
Expand Down
0