Skip to content

Conversation

@t1nkl
Copy link
Contributor

@t1nkl t1nkl commented Feb 2, 2024

While testing, there can be an error, with some 3d party requests/code (RabbitMQ connect, wss conect, gRPC connect, etc.), that doesn't hande correctly.

Without this fix, any errors related to such tests, showing in console like - Error: Call to a member function getMessage() on string on vendor/laravel/framework/src/Illuminate/Testing/TestResponse.php:1654

@t1nkl t1nkl changed the title Fix in appendExceptionToException method exception type check [10.x] Fix in appendExceptionToException method exception type check Feb 2, 2024
@dennisprudlo
Copy link
Contributor

The doc states a Throwable must be passed here and throwables have always a getMessage method. Is this something that was changed recently? Otherwise the method is called incorrectly by those third party packages.

@t1nkl
Copy link
Contributor Author

t1nkl commented Feb 5, 2024

The doc states a Throwable must be passed here and throwables have always a getMessage method. Is this something that was changed recently? Otherwise the method is called incorrectly by those third party packages.

No, the problem happens, when you using php sockets
https://www.php.net/manual/en/book.sockets.php

Some connection errors not a Exception or Throwable - just string

Using official libraries:

@taylorotwell taylorotwell merged commit 0c830e7 into laravel:10.x Feb 8, 2024
@t1nkl t1nkl deleted the fix/exception-to-append-can-be-string branch February 8, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants