ovr / phpsa

Smart/Static Analyzer(sis) for PHP :bowtie::neckbeard:
Other
637 stars 77 forks source link

[Analyzer] var_dump leftovers #342

Open kilgaloon opened 6 years ago

kilgaloon commented 6 years ago

It will be good to analyze var_dump leftovers in project, and to add support for other functions that cause same behavior.

ddmler commented 6 years ago

Hi we have an analyzer that does this: https://github.com/ovr/phpsa/blob/master/src/Analyzer/Pass/Expression/FunctionCall/DebugCode.php it currently checks for var_dump, var_export, debug_zval_dump. If you know more you can add them to the list. Or did you mean something different?

kilgaloon commented 6 years ago

What about supporting dumps from another popular frameworks, like dd() in laravel?

ddmler commented 6 years ago

Sure we can add those.

ddmler commented 6 years ago

I added dd and dump (laravel, symfony) in this commit 69939ed Not sure which frameworks are used so widely that it makes sense to add their debug function, but if you know some more feel free to add those, too @Kilgaloon

kilgaloon commented 6 years ago

Also i think it will be good we can move this also to config, so people can setup those, sure we can insert there some defaults, but maybe we can give them option to more through config.