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

Type and name sql argument of query function #2918

Closed
wants to merge 2 commits into from

Conversation

rey0bs
Copy link

@rey0bs rey0bs commented Nov 16, 2017

Several functions use first argument of Connection::query function. This argument is named and typed as string in functions which use it, but is not documented in query function.

For example, in Doctrine\DBAL\Connection, the logger uses it in startQuery function. $sql is named and typed in SQLLogger interface, but not in query function.

This PR names this argument to increase visibility and avoid to use func_get_args and $args[0] for $sql parameter.

@rey0bs rey0bs changed the title Use variable arguments in query to increase lisibility Use variable arguments in query function Nov 16, 2017
@rey0bs rey0bs changed the title Use variable arguments in query function Type and name sql argument of query function Nov 16, 2017
* @return \Doctrine\DBAL\Driver\Statement
*
* @throws \Doctrine\DBAL\DBALException
*/
public function query()
public function query($sql, ...$args)
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is a BC break and couldn't be considered for 2.x.

@morozov
Copy link
Member

morozov commented Nov 28, 2020

Obsolete as of #3803.

@morozov morozov closed this Nov 28, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants