2.0.0 silently dropped support for `grabFixture()` with numeric indices

Open Beginner friendly
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start at the grabFixture() entry point and inspect the typing refactoring in commit baba62281f6839e1c21e646d50971156fd7b8faa, then compare it with the numeric-index fixture example linked in the issue. Done means integer indices remain supported, with regression coverage if the repository provides it; otherwise the compatibility change should be documented in the changelog or release notes.

Written by the indexing model from the issue text.

Description

https://github.com/Codeception/module-yii2/commit/baba62281f6839e1c21e646d50971156fd7b8faa, a typing refactoring, changed the type of grabFixture() $index param to string|null.

Historically though, this could also be an integer (like, if you just have a fixture array without keys) - see e.g. https://github.com/yiisoft/yii2-app-advanced/blob/8d10c0d2ff1c78c454cf649226ca8465a198902e/frontend/tests/Support/data/login_data.php .

Imho that support should not be dropped. And if that was intentional, it should be in CHANGELOG / release notes.

(yes, technically, using integers as string '0' might still work, but that's ugly)

Dominant language
PHP
Stars
19
Forks
43
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Codeception/module-yii2

All issues in Codeception/module-yii2

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.