Codeception / Codeception/module-symfony

Backwards compatibility break in `RouterAssertionsTrait::seeCurrentRouteIs()`

Open Beginner friendly
#245 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
96
Forks
25
Avg merge
2h 35m
Merged PRs (30d)
3

Description

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:

```php
$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:

https://github.com/Codeception/module-symfony/blob/01cfa3e12917e396cf99cee1fb63a553865cad16/src/Codeception/Module/Symfony/RouterAssertionsTrait.php#L87

Contributor guide

Open the contributing guide

Research direction

Start in src/Codeception/Module/Symfony/RouterAssertionsTrait.php at seeCurrentRouteIs(), and compare the behavior introduced by pull request #227. Reproduce the documented call with an integer id, then add or update a regression test if the existing test suite has coverage for this assertion. Done means prior calls continue comparing integer route parameters without converting them to strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.