Rename `setServerParameters()` to `haveServerParameters()`; drop `haveServerParameter()`
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
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:
haveServerParameter('name', 'value')uses Symfony'sClient::setServerParameter()setServerParameters([])uses Symfony'sClient::setServerParameters()which sets'HTTP_USER_AGENT' => 'Symfony BrowserKit'by default.
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
haveServerParametercan be deprecated in favor of the newhaveServerParameters. - 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'ssetServerParameters, and that's it.
If bug:foreach()over the array and use Symfony'ssetServerParameter.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeception/module-rest
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
Codeception/module-rest#114 · 4 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Codeception/module-rest#110 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
Codeception/module-rest#98 ·
-
Trying to get coverage report Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Codeception/module-rest#79 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Codeception/module-rest#80 · 2 bình luận ·
Tất cả issue của Codeception/module-rest
Issue tương tự
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/safe-publish#594 ·
-
needs-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
HttpClient
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
symfony/symfony-docs#23092 ·
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100