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

Document a non-deprecated way to interact with prepared statements #4673

Merged
merged 3 commits into from Jun 16, 2021

Conversation

derrabus
Copy link
Member

Q A
Type improvement
BC Break no
Fixed issues N/A

Summary

While browsing the documentation I noticed that it still contains code examples with the now-deprecated Statement::execute() method.

This PR attempts to fix that by only showing the preferred way to interact with prepared statements. In order to keep merges easy, the PR contains backports of #4505 and #4502 by @xelan and @Sephster.

Sephster and others added 3 commits June 16, 2021 12:59
The example executes the function `fetchAllAssociative` on the Statement object but this object doesn't have this function. Instead, the function should be executed on the returned result set.
The existing example proposes clear-text storage of passwords, which is highly discouraged. Furthermore, such an example sheds a negative light on the Doctrine project if security-conscious developers evaluate whether they should use the library based on the provided examples.
@greg0ire greg0ire added this to the 2.13.2 milestone Jun 16, 2021
@greg0ire greg0ire merged commit f1453c5 into doctrine:2.13.x Jun 16, 2021
@greg0ire
Copy link
Member

Thanks @derrabus !

@derrabus derrabus deleted the docs/new-execute-api branch June 16, 2021 23:30
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 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.

None yet

6 participants