TysonAndre / phan

Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Other
0 stars 0 forks source link

Idea: Automatically generate internal_stubs for a given project #122

Open TysonAndre opened 6 years ago

TysonAndre commented 6 years ago

This should be doable.

Reference tracking (for dead code detection) allows us to know which global functions and classes are being used.

And we can look up the ReflectionExtension for those elements via ReflectionClass and ReflectionMethod.

Then automatically dump those to .phan/internal_stubs and write a php section with internal stubs to stdout.