Report named dataset keys combined with dependencies that pass values

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
testing

Research direction

Start by reading the PHPUnit argument unpacking behavior described in the issue and the referenced TestCase.php lines around 1805–1815. Trace how this plugin reports dependencies and dataset keys, including the behavior across PHPUnit 11, 12, and 13. Done means the report reflects when dependency values are appended and covers the named-key runtime failure.

Written by the indexing model from the issue text.

Description

enhancement

Since PHPUnit 11, string dataset keys are passed as named arguments. PHPUnit appends the values of @depends/#[Depends] targets positionally (array_merge($data, array_values($dependencyInput))), so a dataset with string keys plus a dependency that returns a value fails at runtime with "Cannot use positional argument after named argument during unpacking".

The report must model when a dependency really appends a value: PHPUnit 11 stops collecting at the first void dependency and skips larger tests (TestCase.php ~1805-1815), PHPUnit 12/13 continue. Dropped from #177 to keep it focused (see the comment on #177).

Dominant language
Gherkin
Stars
79
Forks
38
Avg merge
6h 52m
Merged PRs (30d)
28

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 psalm/psalm-plugin-phpunit

All issues in psalm/psalm-plugin-phpunit

Similar issues

More Testing & QA issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.