Skip to content

Fix infinite run for huge unused subtrees#282

Merged
janedbal merged 1 commit intomasterfrom
fix-infinite-run-huge-unused-subtree
Dec 18, 2025
Merged

Fix infinite run for huge unused subtrees#282
janedbal merged 1 commit intomasterfrom
fix-infinite-run-huge-unused-subtree

Conversation

@janedbal
Copy link
Copy Markdown
Member

This can happen even for mid-size codebases where (for some reason) not a single entrypoint is found (e.g. disabled vendor provider). Or when most usages are excluded. Then, everything becomes dead and complex usage graph can cause this issue.

How to recognize it:

  • PHPStan execution gets stuck after storing result cache:
$ vendor/bin/phpstan -vv
Result cache restored. 0 files will be reanalysed.
 272/272 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% < 1 sec/< 1 sec

Result cache is saved.

(hanging)
  • It disappears with reportTransitivelyDeadMethodAsSeparateError: true

@janedbal janedbal merged commit 4fdc912 into master Dec 18, 2025
37 checks passed
@janedbal janedbal deleted the fix-infinite-run-huge-unused-subtree branch December 18, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant