Repository navigation
Pre-release 4.2.102 → 4.2.101 — task 4.2 console swap (illuminate/console ^13) - #73
Merged
Merged
Conversation
agissept
force-pushed
the
pre-release/4.2.102
branch
from
September 26, 2026 03:17
4fd1d85 to
1d35c43
Compare
agissept
marked this pull request as draft
September 26, 2026 04:52
- composer: drop illuminate/console from replace, require illuminate/console:^13 (pulls laravel/prompts + nunomaduro/termwind); v13 Console\* shadows fork tree via PSR-4, so the 5 console BC shims go dead (removed at task 4.4/4.5). - Foundation\Artisan::getArtisan() rewired: v13 Console\Application self-bootstraps in its ctor (Container, Dispatcher, version) and has no make()/start()/boot() — so rebind 'artisan' to the console + load start/artisan.php inline (until Foundation Kernel lands at 4.5). - fire() -> handle() on the 22 surviving fork console commands (Foundation/Console 17, Auth/Console 3, Routing/Console 1, Workbench 1) + command.stub; v13 Command::execute() resolves handle() via container, not the old fire() fallback. - tests: fixed 5 fork command tests (setLaravel a Foundation\Application w/ env bound, since v13 Command::run() calls runningUnitTests()); deleted 2 vendored-behavior tests (ConsoleApplicationTest, FoundationArtisanTest — assert old fork Console internals). Fork suite 595 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Surfaced by app-side artisan boot-smoke (fork suite couldn't catch — no app):
- Foundation\Artisan::getArtisan(): call $app->boot() before building the console
(the old Console\Application::make() did; provider boot()s register runtime
extensions like the app's Auth::extend('dicoding-auth') that command resolution needs),
and setContainerCommandLoader() after (v13 registers #[AsCommand] commands lazily into
a commandMap — without the loader, illuminate/database's migrate family is invisible).
- Foundation\Application::basePath(): v13 database MigrationServiceProvider calls it.
- 'composer' binding -> illuminate/support Composer (v13 moved it there; MigrateMakeCommand
type-hints Support\Composer); fork Optimize/AutoloadCommand retyped to match.
artisan list now clean: 191 commands incl. full migrate family + queue:work.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (task 4.2) v13 Support\Composer::dumpAutoloads()/dumpOptimized() return an int exit code, not a Process — the fork command only used the result for a cosmetic 'Executed: ...' info line. Fixes fatal in 'artisan optimize' (composer post-update hook). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v13 illuminate/console Command::execute() resolves handle() or __invoke(), dropping L4.2's fire(). The fork queue console commands (still self.version) kept fire(), so v13 fell back to __invoke() -> BoundMethod "__invoke() does not exist" on queue:listen/work/retry/etc. Rename fire()->handle() to match the v13 idiom the app-side sweep already applied to app commands. Also drop ListFailedCommand's removed-Symfony 'table' HelperSet call in favour of the v13 Command::table() helper (the old path only surfaced now that the command actually reaches its body). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (task 4.2) getArtisan() binds the v13 console as 'artisan' then require's start/artisan.php, which calls Artisan::add() ~149x. The Artisan facade has already cached this Foundation\Artisan wrapper, so each add() re-enters __call()->getArtisan(); with $this->artisan memoized only at the end, every re-entry re-boots and re-requires artisan.php -> unbounded recursion -> OOM (observed ~22GB) on any Artisan::call in tests/runtime. Memoize the console before the require so re-entry short-circuits and add() forwards to the console instance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
agissept
force-pushed
the
pre-release/4.2.102
branch
from
September 28, 2026 07:44
015f5ef to
39915b0
Compare
agissept
marked this pull request as ready for review
September 29, 2026 07:02
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.
Stacks on #72 (4.2.101 view swap). Task 4.2: swap
illuminate/consoleto the real v13 package.What
illuminate/consolefromreplace,require illuminate/console:^13(pulls laravel/prompts + nunomaduro/termwind). v13Illuminate\Console\*shadows the fork tree via PSR-4 → the 5 old console BC shims go dead (removed at 4.4/4.5).Foundation\Artisan::getArtisan()— v13Console\Application(Container, Dispatcher, version)self-bootstraps in its ctor and has nomake()/start()/boot(). New flow:loadDeferredProviders → $app->boot() → new Console\Application → instance('artisan') → load start/artisan.php → setContainerCommandLoader().Application::basePath(); rebind'composer'→ v13Support\Composer(retype fork Optimize/AutoloadCommand); OptimizeCommand dropsProcess::getCommandLine()(v13 Composer dump* return int).fire()→handle()on the 22 surviving fork console commands +command.stub.Command::run()needs aFoundation\Applicationlaravel w/envbound); deleted 2 vendored-behavior tests.Two non-obvious gotchas
setContainerCommandLoader()is mandatory — v13 registers#[AsCommand]commands lazily into a commandMap; without the loader, illuminate/database's whole migrate family + queue:work are silently invisible (eager L4.2-style commands mask it).$app->boot()before building the console — provider boot()s register runtime extensions (the app'sAuth::extend('dicoding-auth')) that command resolution needs.Verify
Fork suite 595 green. App-side (dicoding 4.2.102-rc1): artisan
list=191 cmds incl. full migrate family + queue:work,optimize/envrun clean, unit 8367 green.🤖 Generated with Claude Code