Skip to content

Fix doctrine/dbal deprecation using Statement::executeQuery #18429

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

Conversation

vinceAmstoutz
Copy link
Contributor

@vinceAmstoutz vinceAmstoutz commented Jun 17, 2023

Deprecation warning when doctrine/dbal >= 3.4.*.

In Symfony docs,executeQuery() is mentionned here : Querying with SQL.

But since 3.4.* passing parameters to Statement::execute*() functions is deprecated by doctrine/dbal with this warning:
User Deprecated: Passing $params to Statement::executeQuery() is deprecated. Bind parameters using Statement::bindParam() or Statement::bindValue() instead. (Statement.php:212 called by User.php:40, https://github.com/doctrine/dbal/pull/5556, package doctrine/dbal).

I've already ask in the DBAL PR concerned how to use executeQuery from now on.

image
(in the same PR)

So, after having tested it in a prod project, I propose an update of the doc in this sense.

Thanks again @derrabus 🙏

@OskarStark OskarStark changed the title Fix doctrine/dbal deprecation using Statement::executeQuery Fix doctrine/dbal deprecation using Statement::executeQuery Jun 19, 2023
@OskarStark OskarStark changed the base branch from 6.3 to 6.2 June 19, 2023 08:42
@OskarStark OskarStark force-pushed the removes_a_doctrine_dbal_deprecation_using_executeQuery branch from f0a5513 to 5c8154b Compare June 19, 2023 08:42
@OskarStark
Copy link
Contributor

Thank you Vincent.

@OskarStark OskarStark merged commit 8eeba23 into symfony:6.2 Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants