-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ray does not dump binary strings #931
Comments
@sebj54 a bit late to the party but I was just investigating this. I am not too familiar with the subject so maybe I'm just confused. Using the example Ray indeed silently "fails". If I use the example from the PHP docs: ray(hex2bin("6578616d706c65206865782064617461")); I do get the proper response in Ray: So I am not sure what kind of magic the dump method does to get a different result. |
Actually, I think I don't know how Ray works under the hood but maybe the whole problem is due to JSON encoding. Binary strings are not supported in JSON objects: |
@sebj54 I think you are on to something with this. All data is send encoded as json over HTTP to the Ray app that runs a small node server to receive the data. |
Then I really don't know how you can deal with that issue then. Maybe the least you could do is to show an error or a warning in Ray, like "the object you tried to dump could not be JSON encoded. It can save a lot of time to Ray users wondering why there is no output in Ray while they are debugging 😅 |
Popping in to "bump" this because I got the same issue. |
Describe the bug
When you attempt to dump a binary string or anything containing one (like an array or an object), Ray does not dump anything. It just fails silently.
Versions
Ray version (you can see this in "About Ray"): 2.8.1
You can use
composer show
to get the version numbers of:PHP version: 8.2.17
Laravel version (if applicable): 11.18.1
To Reproduce
Add this in your code:
Expected behavior
Ray should display this (like the console when
dump
is used):Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: