question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object of class Illuminate\Foundation\Application could not be converted to string

See original GitHub issue

Bug description When running, in yet unknown conditions, an error occurs. PHP Fatal Error: Uncaught Error: Object of class Illuminate\Foundation\Application could not be converted to string in Command line code:6

To Reproduce Run a tinker console window

Expected behavior The error should not have appeared and output following my code in

Screenshots None

Environment (please complete the following information):

  • IDE & Version: PHPStorm 2020.2.1
  • PHP Version: 7.4
  • Interpreter Type: Docker
  • Laravel Version: 7.3.0
  • Tinker version: 2.3.0

Additional context It seems to work with docker run, but not with docker exec in one of my projects.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Roboroadscommented, Aug 1, 2022

JB 2022.2 fixes this. Closing.

2reactions
Roboroadscommented, Jun 9, 2022

I found a way to proof to JetBrains this is also a double-dollar-escaping bug in JB and not in the tinker plugin.

"[docker-compose://[/home/path/docker-compose.yml]:service-php/]:php" -dxdebug.mode=debug -dxdebug.client_port=9000 -dxdebug.client_host=172.17.0.1 -r eval('var_dump('.chr(36).'argv[1]);'); "$x = 123;"
string(10) "$$x = 123;"

Sent this to JB - might get fixed in 2022.2 ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object of class Illuminate\Validation\Validator could not be ...
I'm yet to understand what needed to be fixed in the code making it to generate the error. What is to be put...
Read more >
Object of class Illuminate\Database\Eloquent ... - Laracasts
Object of class Illuminate \Database\Eloquent\Builder could not be converted to string. I have 2 tables projects and tasks , 1 project can have...
Read more >
Object of class Illuminate\Database\Eloquent ... - Laravel.io
Object of class Illuminate \Database\Eloquent\Builder could not be converted to string. I need to return results based on 2 'where' clauses so i...
Read more >
Object of class Illuminate\Routing\UrlGenerator could not be ...
... of class Illuminate\Routing\UrlGenerator could not be converted to string ... I don't get the error if I'm navigating to regular pages ...
Read more >
Object of class Illuminate\Translation\FileLoader could not be ...
+"message": "Object of class Illuminate\Translation\FileLoader could not be converted to string" +"exception": "ErrorException" +"file": ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found