Laravel Composer 错误 Uncaught ReflectionException: Class log does not exist in Container.php:738

Posted

技术标签:

【中文标题】Laravel Composer 错误 Uncaught ReflectionException: Class log does not exist in Container.php:738【英文标题】:Laravel Composer error Uncaught ReflectionException: Class log does not exist in Container.php:738 【发布时间】:2016-09-03 00:47:37 【问题描述】:

我有一个问题,当我使用命令 Composer 时需要 st。或 php 工匠圣。等等。我收到这个错误:

使用版本 ^2.3 进行干预/图像 ./composer.json 已 更新了

php artisan clear-compiled

致命错误:未捕获的 ReflectionException:类日志不存在于 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php:738 堆栈跟踪:

0 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(738):

ReflectionClass->__construct('log')

1 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(633):

Illuminate\Container\Container->build('log', Array)

2 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(697):

Illuminate\Container\Container->make('log', Array)

3 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(853):

Illuminate\Foundation\Application->make('log')

4 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(808):

Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

5 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(777):

我在 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php 在第 738 行 PHP 致命错误:未捕获的 ReflectionException:类日志 不存在于 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php:738 堆栈跟踪:

0 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(738):

ReflectionClass->__construct('log')

1 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(633):

Illuminate\Container\Container->build('log', Array)

2 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(697):

Illuminate\Container\Container->make('log', Array)

3 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(853):

Illuminate\Foundation\Application->make('log')

4 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(808):

Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

5 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(777):

我在 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php 第 738 行 Script php artisan clear-compiled 处理 pre-update-cmd 事件返回错误

安装失败,正在将 ./composer.json 还原为原始文件 内容。

[RuntimeException] 错误输出:PHP 致命错误:未捕获 ReflectionException:类日志中不存在 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php:738 堆栈跟踪:#0 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(738): ReflectionClass->__construct('log') #1 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(633): Illuminate\Container\Container->build('log', Array) #2 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(697): Illuminate\Container\Container->make('log', Array) #3 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(853): Illuminate\Foundation\Application->make('log') #4 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(808): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

5 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(777):

我在 D:\Programy\Wamp\www\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php 在第 738 行

需要 [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [].. ..

我尝试重新安装composer,安装新版本的PHP(7),但仍然没有任何改变:(有人知道如何解决这个问题吗?谢谢。

【问题讨论】:

【参考方案1】:

好的,我解决了这个问题。包 tinymce 正在解决这个问题。要修复它,请将 'cdn' => url('vendor/js/tinymce/tinymce.min.js') 替换为 'cdn' => Config('app.url').'/vendor/js/tinymce/tinymce.min.js',在 config/tinymce.php 中。

【讨论】:

以上是关于Laravel Composer 错误 Uncaught ReflectionException: Class log does not exist in Container.php:738的主要内容,如果未能解决你的问题,请参考以下文章

为啥我会收到 Laravel Composer 解析错误?

Laravel 6.0 Composer 依赖升级错误

安装 Laravel 时出现 Composer 错误:缺少“mbstring”?

安装 sanctum 时 Laravel Composer 错误:与合同冲突

Laravel Composer 看到错误的 PHP 版本

使用 Laravel、Vue-2、vue-composer 在 Ajax 中发布错误