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
这对我来说似乎很奇怪的原因是错误是在我的app /我编辑过的实际laravel文件中.当我运行composer update或每次尝试访问我的任何网页时都会发生此错误.以下是作曲家更新的完整转储,任何想法?
[root@dev1 dev1]# composer update> PHP artisan clear-compiledPHP 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:96Stack 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),'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 96Script PHP artisan clear-compiled handling the pre-update-cmd event returned with error code 255升级到Laravel 5.4时,我遇到了类似的错误.问题是Laravel仍在加载bootstrap / cache / compiled.PHP(尽管它说它不再被框架使用).删除文件将解决您的问题.
From the docs:
总结If it exists,you may delete the bootstrap/cache/compiled.PHP file. It is no longer used by the framework.
以上是内存溢出为你收集整理的使用Laravel 5.4和PHP 7进行作曲家更新“类名必须是有效对象或字符串”全部内容,希望文章能够帮你解决使用Laravel 5.4和PHP 7进行作曲家更新“类名必须是有效对象或字符串”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)