Stop shipping var_dump() to production — enforce it with PHPStan

php dev.to

Stop shipping var_dump() to production — enforce it with PHPStan We’ve all done it. You add a quick var_dump() or dd() while debugging… and somehow it survives code review 😅 Or worse: someone uses DB::raw() where it shouldn’t be used a controller starts calling repositories directly architecture rules slowly fall apart The problem PHPStan is great — but enforcing custom rules like this is not trivial. You either: write a custom PHPStan rule (time-consuming) or use s

Read Full Tutorial open_in_new
arrow_back Back to Tutorials