spatie / laravel-ray

Debug with Ray to fix problems faster in Laravel apps
https://myray.app
MIT License
291 stars 64 forks source link

Register `DumpRecorder` only once and keep original handler connected #233

Closed AlexVanderbist closed 2 years ago

AlexVanderbist commented 2 years ago

When using Ray I noticed that Ignition stopped receiving dump and dd statements. This is because both packages replace the VarDumper::$handler with their own implementation and only one $handler can be registered at a time.

This PR makes sure the DumpRecorder only registers its MultiDumpHandler once. It also makes sure that the original VarDumper::$handler gets added to the MultiDumpHandler.