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

Phase out Database::prepareStatement() #6002

Open
5 tasks
dtdesign opened this issue Sep 27, 2024 · 0 comments
Open
5 tasks

Phase out Database::prepareStatement() #6002

dtdesign opened this issue Sep 27, 2024 · 0 comments
Assignees
Labels

Comments

@dtdesign
Copy link
Member

Version 5.4 added Database::prepare() as a convenient alternative that performs the replacement based on WCF_N and has proven to prevent a lot of runtime errors for legacy setups with WCF_N !== 1.

The next step is to deprecate prepareStatement() and make it an alias of prepare() in 7.0. For some situations, most important exporters, we need to preserve the previous behavior by introducing prepareUnmanaged() which behaves exactly as prepareStatement() but represents an explicit opt-in.

  • WoltLab Suite 6.2
    • prepareUnmanaged() is introduced and is identical to the prepareStatement() in version 6.1.
    • prepareStatement() is marked as deprecated and forwards all calls to prepareUnmanaged().
    • prepare() is updated to use prepareUnmanaged() instead of prepareStatement().
    • All uses of prepareStatement() in the exporters are migrated to prepareUnmanaged() or prepare().
    • All remaining uses of prepareStatement() in the software are rewritten to use prepare() instead. This includes rewriting the queries to no longer use WCF_N directly.
  • WoltLab Suite 7.0
    • prepareStatement() is being removed.
@Cyperghost Cyperghost self-assigned this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Foundation
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants