Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Rename `setServerParameters()` to `haveServerParameters()`; drop `haveServerParameter()`

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
28/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php, symfony
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu trong src/Codeception/Module/REST.php, quanh dòng 1617 và 1629, sau đó so sánh hành vi của setServerParameters() và setServerParameter() trong Symfony BrowserKit được liên kết. Xác định xem user agent mặc định có nên được giữ lại hay không, đồng thời kiểm tra hành vi cuối cùng về việc đặt tên, Deprecation và xử lý tham số theo các yêu cầu của issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Just stumbled upon this while searching for a new name for deleteHeader(), see https://github.com/Codeception/module-rest/issues/22

Current situation:

I would say:

  • "setServerParameters" isn't the right term, Codeception's convention for this is "haveServerParameters".
  • It doesn't make sense to have two functions for this, one for a single parameter, and one for multiple. If the expected argument is an array, anybody knows immediately what to pass. So the existing haveServerParameter can be deprecated in favor of the new haveServerParameters.
  • Remaining question: Is the "Symfony BrowserKit" thing more of a bug or more of a feature?
    If feature: Just pass the array along to Symfony's setServerParameters, and that's it.
    If bug: foreach() over the array and use Symfony's setServerParameter.
Ngôn ngữ chính
PHP
Star
60
Fork
30
Merge trung bình
22 giờ 37 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 Codeception/module-rest

Tất cả issue của Codeception/module-rest

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.