因此,有幾個線程,但沒有一個具有完全相同的問題。基本上我從5.6升級到php 5.4和5.6從5.6我現在得到這個錯誤信息。使用Laravel 5.4和PHP 7編輯器更新「類名稱必須是有效的對象或字符串」
PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in /var/www/dev1/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:96
對我來說這很奇怪的原因是錯誤是在實際的laravel文件不在我的應用程序/我編輯過的東西。當我運行作曲家更新或每當我嘗試訪問我的任何網頁時都會發生此錯誤。下面是作曲家更新的完整轉儲,任何想法?
[[email protected] dev1]# composer update
> php artisan clear-compiled
PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in /var/www/dev1/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:96
Stack trace:
#0 [internal function]: Illuminate\Foundation\Exceptions\Handler->Illuminate\Foundation\Exceptions\{closure}(0, 'Symfony\\Compone...')
#1 /var/www/dev1/bootstrap/cache/compiled.php(6207): call_user_func(Object(Closure), 0, 'Symfony\\Compone...')
#2 /var/www/dev1/bootstrap/cache/compiled.php(12223): Illuminate\Support\Arr::first(Array, Object(Closure), NULL)
#3 /var/www/dev1/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(97): Illuminate\Support\Collection->first(Object(Closure))
#4 /var/www/dev1/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(61): Illuminate\Foundation\Exceptions\Handler->shouldntReport(Object(ReflectionException))
#5 /var/www/dev1/app/Exceptions/Handler.php(33): Illuminate\Foundation\Exceptions\Handler->report(Object(ReflectionException))
#6 /var/www/dev1/vendor/laravel/fram in /var/www/dev1/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php on line 96
Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255
刪除您的'compiled.php'並重試。 – Marwelln
位於哪裏? – CMOS
'bootstrap/cache/compiled.php',你可以從你的錯誤信息中看到。 – Marwelln