Phase out `Database::prepareStatement()`
Maintainers usually reply within 1 day
@Cyperghost is already working on this.
Since Oct 18, 2024.
Assessment
This issue has not been assessed yet.
Description
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 theprepareStatement()in version 6.1. -
prepareStatement()is marked as deprecated and forwards all calls toprepareUnmanaged(). -
prepare()is updated to useprepareUnmanaged()instead ofprepareStatement(). - All uses of
prepareStatement()in the exporters are migrated toprepareUnmanaged()orprepare(). - All remaining uses of
prepareStatement()in the software are rewritten to useprepare()instead. This includes rewriting the queries to no longer useWCF_Ndirectly.
-
- WoltLab Suite 7.0
prepareStatement()is being removed.
- Dominant language
- PHP
- Stars
- 248
- Forks
- 147
- Avg merge
- 17m
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WoltLab/WCF
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WoltLab/WCF#6771 · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LinkNacional/woo-rede#367 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Translation is missing for sw-app.component.sw-app-shop-id-change-modal.error.shop-id-change-failedOpenneeds-triage Platform(Default)
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Configuration consistency enhancement
Difficulty 2/5 Under an hour Newbie friendliness 72/100
novalo-dev/Prestashop-MCP-Server#405 ·
Maintainers usually reply within 1 day
-
OpenRouter errors returned in a 200 body are thrown as a plain AiExceptionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 2 days