No dependency tracking - reproducible false negative
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
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:
class Basewithoutfoo(),class Child extends Basewithfoo().- Run once - nothing to change, both files cached.
- Add
foo()toBase. Do not touchChild. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rectorphp/rector-src
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rectorphp/rector-src#8494 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
rectorphp/rector-src#8488 · 1 comment ·
All issues in rectorphp/rector-src
Similar issues
-
jira-created
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
nunomaduro/phpinsights#745 ·
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
WordPress/plugin-check#1486 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
az-digital/az_quickstart#6019 ·