spatie / laravel-ray

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

`ray('Date')` and `dump('Date')` cause a TypeError #221

Closed bakerkretzmar closed 3 years ago

bakerkretzmar commented 3 years ago

Description

With spatie/laravel-ray installed, calling ray('Date') or dump('Date') causes a TypeError:

TypeError: date(): Argument #1 ($format) must be of type string, Spatie\LaravelRay\Ray given

Versions

Ray version: N/A, bug is reproducible without the Ray app running

spatie/ray package version: 1.30.2 spatie/laravel-ray package version: 1.26.1

PHP version: 8.0.10 Laravel version: 8.63.0

Desktop: M1 mac mini with macOS 11.6 (Big Sur)

Steps to reproduce

  1. laravel new app && cd app
  2. composer require spatie/laravel-ray
  3. php artisan tinker
  4. ray('date')
  5. See error.

Expected behaviour

I would expect ray('date') and dump('date') to both dump the string "date".

freekmurze commented 3 years ago

@Nielsvanpach could you take a look at this, I think it's a duplicate for a previous issue.

MohannadNaj commented 3 years ago

I can confirm this issue happened to me while in v1.30.0, and fixed after composer update to v1.30.3 .. Thanks!