`please` cannot run app commands from app/Console/Commands on Laravel 13.36+
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reading src/Console/Please/Kernel.php and compare its getArtisan() command resolution with Laravel 13.36's kernel behavior described in the issue. Check the existing command tests or add a regression case for a command discovered in app/Console/Commands; done means php please app:example works and Statamic commands still run. Pull request #15809 is already open against this issue.
索引モデルが issue の本文から書いたものです。
説明
Bug description
Since Laravel 13.36.0, php please no longer finds commands that Laravel discovers in app/Console/Commands. php artisan runs them normally, but php please fails:
$ php artisan static:warm-links --help # works
$ php please static:warm-links --help
ERROR Command "static:warm-links" is not defined.
The commands are also missing from php please list. Statamic's own commands (php please static:clear and so on) still work.
Cause
laravel/framework#61931 ("Keep the console kernel's own commands on the kernel instance", released in v13.36.0) changed Illuminate\Foundation\Console\Kernel:
load()andcommand()no longer register commands throughArtisan::starting(...). They add them to a new property,$kernelCommands.getArtisan()now resolves both lists:->resolveCommands([...$this->kernelCommands, ...$this->commands])
Statamic\Console\Please\Kernel::getArtisan() overrides this method and still resolves only $this->commands:
(new Please($this->app, $this->events, Statamic::version()))
->resolveCommands($this->commands)
So under please, the commands in $kernelCommands are never registered. Closure commands defined with Artisan::command() in routes/console.php go through Kernel::command() too, so they are probably affected as well (not tested).
Suggested fix
In src/Console/Please/Kernel.php:
->resolveCommands([...($this->kernelCommands ?? []), ...$this->commands])
The ?? [] keeps it working on Laravel versions before 13.36, where the property does not exist. Tested locally: the app command runs under please again, and Statamic's commands still work.
How to reproduce
- Statamic 6.x on Laravel 13.36.0 or newer.
php artisan make:command Example(signature e.g.app:example).php artisan app:exampleworks.php please app:examplefails withCommand "app:example" is not defined.- With Laravel 13.35 or older, step 4 works.
Logs
ERROR Command "app:example" is not defined.
Environment
Statamic 6.40.0 Pro
Laravel 13.40.0
PHP 8.5.12
Installation
Existing Laravel app, installed Statamic.
Additional details
Found when a deploy script that runs php please <app command> broke after an upgrade that also moved Laravel from 13.29 to 13.40. Workaround: call app commands with php artisan.
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 21時間 3分
- マージ済み PR(30日)
- 128
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
Passing `null` to `bool_string` modifier returns nothing instead of `false`対応中かも @shadetheory が 4 日前に担当しました。 オープンmodifiers
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
statamic/cms#15748 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
antlers
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
`GlobalRuntimeState::$interpolatedVariables` is never reset, so long-running Antlers renders slow down without bound対応中かも @lazerg が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Command palette doesn’t index non published items対応中かも @lazerg が 1 日前に担当しました。 オープンsearch
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/blocks-engine#5003 ·
メンテナーはふだん 1 日以内に返信
-
from-cloud mythic tracked
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
MythicalLTD/FeatherPanel#459 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: PostgreSQL backend: Queue.remove() / Job.remove() never emit the QueueEvents "removed" event対応中かも @1AbdullahButt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
taskforcesh/bullmq#5085 ·
メンテナーはふだん 1 日以内に返信
-
area:mesi area:php-extension good first issue priority:low type:chore
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
crazy-goat/go-mesi#652 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
shukiv/jabali-panel#2423 ·
メンテナーはふだん 1 日以内に返信