spatie / laravel-ray

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

When laral-ray required in composer, but laravel is not used, ray does not behave as expected #161

Closed Polfo closed 3 years ago

Polfo commented 3 years ago

When laravel-ray is composer required, but ray() is run outside the laravel framework, strange things happen because ray() references the laravel version of ray, not the spatie/ray version of ray.

An example is that ray()->disable() does nothing. It does not disable ray, it also does not produce an error.

That explains why ray()->disable() did not change anything here: Originally posted by @Polfo in https://github.com/spatie/laravel-ray/issues/148#issuecomment-775058169

Versions: spatie/laravel-ray (1.12.6) spatie/ray (1.19.4) php 7.4.9

freekmurze commented 3 years ago

We recommend to only install laravel-ray in a Laravel app