Phase out `Database::prepareStatement()`

Đang mở
#6,002 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Cyperghost đang làm issue này rồi.

Từ ngày 18/10/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Feature

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.
Ngôn ngữ chính
PHP
Star
248
Fork
147
Merge trung bình
17 phút
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WoltLab/WCF

Tất cả issue của WoltLab/WCF

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.