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

Use executeStatement() instead of query() in search #5470

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

ausi
Copy link
Member

@ausi ausi commented Nov 2, 2022

Should fix the deprecations in #5468

@ausi ausi added the bug label Nov 2, 2022
@ausi ausi added this to the 4.13 milestone Nov 2, 2022
@ausi ausi self-assigned this Nov 2, 2022
@leofeyer leofeyer merged commit e6cf673 into contao:4.13 Nov 2, 2022
@leofeyer
Copy link
Member

leofeyer commented Nov 2, 2022

Thank you @ausi.

*
* @return int The number of affected rows
*/
public function executeStatement(string $strQuery): int
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we also allow for parameters and types like doctrine does?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don’t think so, this is merely a replacement for ->query() that works with non-SELECT statements.
If you need parameters and types you should use the database_connection services instead anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants