Codeception / Codeception/module-symfony
Backwards compatibility break in `RouterAssertionsTrait::seeCurrentRouteIs()`
- Vorherrschende Sprache
- PHP
- Sterne
- 96
- Forks
- 25
- Ø Merge
- 2 Std. 35 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
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
Beitragsleitfaden
Rechercherichtung
Beginne in src/Codeception/Module/Symfony/RouterAssertionsTrait.php bei seeCurrentRouteIs() und vergleiche das durch Pull Request #227 eingeführte Verhalten. Reproduziere den dokumentierten Aufruf mit einer Integer-ID und füge einen Regressionstest hinzu oder aktualisiere ihn, falls die bestehende Testsuite diese Assertion abdeckt. Erledigt ist die Aufgabe, wenn frühere Aufrufe weiterhin Integer-Routenparameter vergleichen, ohne sie in Strings umzuwandeln.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php, symfony
- Bereich
- backend, testing
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100