Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No dependency tracking - reproducible false negative

Open
#8,493 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start in src/Caching and trace how a file's cached verdict is keyed and restored. Reproduce the AddOverrideAttributeToOverriddenMethodsRector case by changing Base without touching Child, then determine how dependency information for cross-file reads should invalidate Child. Done means the warm-cache run detects the same change as a cold-cache run.

Written by the indexing model from the issue text.

Description

A rule's output for file A can depend on the contents of file B (AddOverrideAttributeToOverriddenMethodsRector reads the parent, AddReturnTypeDeclarationBasedOnParentClassMethodRector and ReturnTypeFromStrictTypedCallRector read declarations in other files).

The cache stores A's verdict under a hash of A's own contents, so a change in B leaves the entry looking valid.

Reproduction, with AddOverrideAttributeToOverriddenMethodsRector alone:

  1. class Base without foo(), class Child extends Base with foo().
  2. Run once - nothing to change, both files cached.
  3. Add foo() to Base. Do not touch Child.
  4. Run again.

warm cache: [OK] Rector is done!
cold cache: + #[\Override] -> 1 file would have been changed

Same files on disk; the only difference is the cache. src/Caching holds no per-file dependency information, so nothing invalidates Child. The run is green, which makes this a silent false negative rather than a visible miss.

Dominant language
PHP
Stars
137
Forks
451
Avg merge
7h 11m
Merged PRs (30d)
129

Contributor guide

Open the contributing guide

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 rectorphp/rector-src

All issues in rectorphp/rector-src

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.