【问题标题】:Using telescope with lumen使用带流明的望远镜
【发布时间】:2019-03-28 14:04:18
【问题描述】:

我按照https://github.com/laravel/telescope尝试了命令:

composer require laravel/telescope --dev

php artisan telescope:install

该命令导致以下错误:

There are no commands defined in the "telescope" namespace.

尝试通过 composer update 更新依赖关系,但问题仍然存在。

composer update

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 29 updates, 0 removals
  - Updating illuminate/contracts (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/support (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/filesystem (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/session (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/pipeline (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/http (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/container (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/routing (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/events (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/view (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/translation (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/validation (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/database (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/console (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/queue (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating illuminate/pagination (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/log (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/hashing (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/config (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/cache (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/bus (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/broadcasting (v5.7.9 => v5.7.10): Loading from cache
  - Updating illuminate/auth (v5.7.9 => v5.7.10): Downloading (100%)
  - Updating laravel/lumen-framework (v5.7.1 => v5.7.2): Downloading (100%)
  - Updating phpunit/php-code-coverage (6.0.8 => 6.1.3): Downloading (100%)
  - Updating phpunit/phpunit (7.4.0 => 7.4.3): Downloading (100%)
  - Updating aws/aws-sdk-php (3.69.4 => 3.69.13): Downloading (100%)
  - Updating league/flysystem (1.0.47 => 1.0.48): Downloading (100%)
Writing lock file
Generating optimized autoload files



php artisan telescope:install


There are no commands defined in the "telescope" namespace.

这是否意味着我们需要等到 laravel/lumen-framework v5.7.7+ 才能使用带 lumen 的望远镜?

【问题讨论】:

  • Lumen 不是 Laravel(默认情况下没有视图),所以我想,是的,你需要等到(如果有的话)它可用于 Lumen。

标签: php laravel lumen


【解决方案1】:

根据 Mohamed Said(laravel 开发人员)的评论:

望远镜还没有适应流明。

请参考github问题:https://github.com/laravel/telescope/issues/112

【讨论】:

    【解决方案2】:

    首先:不需要传送命名空间。您始终可以在 bootstrap/app.php 中注册服务提供者。 但这不是问题。我注册了提供程序并收到此错误消息

    调用未定义的方法 Laravel\Lumen\Routing\Router::middlewareGroup().

    Lumen 的路由器类与 Laravel 的不兼容。唯一的解决方案是获取代码,创建一个 fork 并将 Laravel 函数“翻译”成 Lumen 的。

    【讨论】:

      猜你喜欢
      • 2014-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-29
      • 1970-01-01
      相关资源
      最近更新 更多