install:debugbar reads the package folder from the working directory and uses the default storage adapter

オープン
#691 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@armanist がすでに取り組んでいます。

2026年11月21日 から。

評価

この issue はまだ評価されていません。

説明

bug console debugbar good first issue

Summary

php qt install:debugbar reads the php-debugbar package folder relative to the current working directory and works through the application's default storage adapter, so it fails in two setups where it should publish the assets. A few smaller issues of the same code and of the cache adapters, found while reviewing #687, are fixed alongside.

Problems

  1. Working directory: the vendor path vendor/php-debugbar/php-debugbar/resources is relative. Run from another folder (cd public && php ../qt install:debugbar), the command throws FileSystemException ("directory does not exist") although the package is installed. Paths should resolve from the application base directory, as the target folder already does through assets_dir().
  2. Storage adapter: the command copies local files through FileSystemFactory::get(), which returns the application's default adapter. With fs.default set to dropbox or gdrive, it checks the local vendor folder in the cloud and fails. It should use the local adapter (FileSystemType::LOCAL).
  3. Error message: a file that cannot be copied is reported as "The directory … is not writable", which hides the cause (for example a locked or unreadable file). The message should name the file.
  4. Typo: "The debug ber already installed" should read "The debug bar is already installed".
  5. Cache docblocks: the @method annotations of the Cache facade are untyped (get($key, $default = null)), while the adapters declare the PSR-16 v3 types, so static analysis accepts cache()->get(42), which throws a TypeError. The *Multiple() methods of the four adapters do not list @throws InvalidCacheKeyException.

Scope

  • src/Console/Commands/DebugBarCommand.php: vendor path from base_dir(), the local adapter, a message that names the file, the typo; tests for the first three.
  • src/Cache/Cache.php and the four cache adapters: docblocks only.

Out of scope

  • All-or-nothing behaviour of the *Multiple() methods: PSR-16 does not require it.
  • Memcached and an expired TTL: a separate bug that also affects 3.1.x.
主要言語
PHP
スター
43
フォーク
22
平均マージ
54分
マージ済み PR(30日)
57

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quantum-php/framework のほかの issue

quantum-php/framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。