Codeception / Codeception/module-symfony
Backwards compatibility break in `RouterAssertionsTrait::seeCurrentRouteIs()`
未关闭
适合新手
还没有人认领这个 Issue。
- 主要语言
- PHP
- 星标
- 96
- 派生
- 25
- 平均合并
- 2 小时 35 分钟
- 30 天内合并 PR
- 3
描述
https://github.com/Codeception/module-symfony/pull/227 broke backwards compatibility with tests written for prior versions of the module.
The following test now fails:
$I->seeCurrentRouteIs('some_route', [
'id' => 1,
]);
With:
- Expected | + Actual
@@ @@
Array &0 [
'_route' => 'some_route',
- 'id' => 1,
+ 'id' => '1',
]
This usage is even how the method is documented:
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 src/Codeception/Module/Symfony/RouterAssertionsTrait.php 中的 seeCurrentRouteIs() 开始,并比较 pull request #227 引入的行为。使用整数 id 重现文档中的调用;如果现有测试套件已覆盖此断言,则添加或更新回归测试。当之前的调用继续比较整数路由参数而不将其转换为字符串时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php, symfony
- 领域
- backend, testing
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100