Repository navigation
Pre-release 4.2.122 → 4.2.121 — task 4.5 (foundation): Artisan commands through v13's withCommands() - #95
Merged
Conversation
agissept
force-pushed
the
pre-release/4.2.122
branch
from
October 2, 2026 09:20
9079a82 to
1a857e4
Compare
agissept
force-pushed
the
pre-release/4.2.122
branch
2 times, most recently
from
October 5, 2026 07:26
0a3d002 to
e9b7202
Compare
…s() (task 4.5) The app registers its commands the way a Laravel 13 app does, with ->withCommands([...]) in bootstrap/app.php, instead of ~150 Artisan::add(App::make(...)) lines in app/start/artisan.php: - ApplicationBuilder::withCommands() hands the command classes to the console Kernel once it resolves, as in v13. - The Artisan wrapper (the console Kernel stand-in) gains v13's addCommands() and builds them through the container when the console starts, with v13's resolveCommands(); #[AsCommand] commands join the lazy command map. - The wrapper no longer requires app/start/artisan.php. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
agissept
force-pushed
the
pre-release/4.2.122
branch
from
October 5, 2026 08:40
e9b7202 to
ac1e494
Compare
agissept
approved these changes
Oct 5, 2026
agissept
marked this pull request as ready for review
October 6, 2026 02:34
agissept
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 4.5, foundation — Artisan commands registered through v13's
withCommands()Stacks on #94. This is the second foundation slice. The dicoding app registers its commands as a Laravel 13 app does, with
->withCommands([...])inbootstrap/app.php. Until now they were ~150Artisan::add(App::make(...))lines inapp/start/artisan.php, a file only L4.2 loads.Changes
ApplicationBuilder::withCommands(array $commands)hands the command classes to the console Kernel once it resolves, as in v13. Only command classes are supported: the app passes no paths and relies on no discovery.addCommands(). When the console starts, it builds those commands through the container with v13'sresolveCommands(), as v13's Kernel does.#[AsCommand]commands join the lazy command map.app/start/artisan.phpis no longer loaded.FoundationApplicationBuilderTestnow registers its probe command withwithCommands(), and its fixturestart/artisan.phpthrows if loaded. A new test adds a second command throughaddCommands(), runs both and checks that the first gets its constructor dependency from the container.Verification
withCommands()registering nothing;addCommands()replacing instead of adding;start/artisan.php.feature/platform/framework-4.2.122-rc1). It moves its 150 commands fromapp/start/artisan.phpto->withCommands([...]). It ran with vendor installed exactly from its lock:artisan list --format=jsonis byte-identical to 4.2.121: all 188 commands, with every argument and option.php -S+server.php→index.php, and 7 artisan commands) are identical to 4.2.121.Tag
4.2.122(9079a822) is not pushed, and neither are4.2.119–4.2.121. Tag pushes are refused for this session.🤖 Generated with Claude Code
https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo