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

未关闭
#26 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
28/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
停滞
技术栈
php, symfony
领域
api

调研方向

从 src/Codeception/Module/REST.php 的第 1617 行和第 1629 行附近开始,然后对比链接的 Symfony BrowserKit 中 setServerParameters() 和 setServerParameter() 的行为。确定是否应保留默认 user agent,并根据 issue 的要求验证最终的命名、Deprecation 和参数处理行为。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
PHP
星标
60
派生
30
平均合并
22 小时 37 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Codeception/module-rest 的其他 Issue

查看 Codeception/module-rest 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。