Repository navigation
Pre-release 4.2.121 → 4.2.120 — task 4.5 (foundation): boot through v13's application builder and entry points - #94
Merged
Conversation
agissept
force-pushed
the
pre-release/4.2.121
branch
from
October 2, 2026 09:20
c0c3703 to
26d05f3
Compare
agissept
force-pushed
the
pre-release/4.2.121
branch
from
October 5, 2026 06:14
26d05f3 to
9adb5c1
Compare
agissept
approved these changes
Oct 5, 2026
…ints (task 4.5)
The app's bootstrap moves to v13's shape: bootstrap/app.php builds the
application with Application::configure()->withMiddleware()->withExceptions()
->create(), public/index.php calls handleRequest() and artisan calls
handleCommand(). The fork provides that surface with v13's names and
signatures, so those files need no change at the flip:
- Application::configure($basePath) returns a Configuration\ApplicationBuilder.
withMiddleware() fills the global middleware; withExceptions() configures the
handler once it resolves, as in v13. setBasePath() binds v13's app, public and
storage paths (path.lang stays at app/lang); useStoragePath() overrides storage.
- handleRequest() and handleCommand() replace run() and the artisan script's
setRequestForConsoleEnvironment() + make('artisan')->run().
- The L4.2 start script now runs lazily, once, when a request, a command or the
console Kernel's bootstrap() first needs it, standing in for v13's kernel
bootstrappers. The environment defaults to production, as in v13; tests set
it on the application instead of start.php's $unitTesting globals.
- The Artisan wrapper is bound from construction and answers v13's console
Kernel bootstrap() and handle(), so tests can bootstrap the way v13's
TestCase does. ArtisanServiceProvider keeps only its two commands.
- bindInstallPaths() and run() are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
agissept
marked this pull request as ready for review
October 5, 2026 07:26
agissept
force-pushed
the
pre-release/4.2.121
branch
from
October 5, 2026 07:26
9adb5c1 to
799ccab
Compare
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 — boot through v13's application builder and entry points
Stacks on #93. This is the first foundation slice: the bootstrap rewrite in task 4.5 of
MIGRATION-TASKS.md. Stock Foundation only ships insidelaravel/framework, so it can't be swapped in package by package. Instead the fork gives the app v13's bootstrap surface, with v13's names and signatures. The dicoding app pair movesbootstrap/app.php,public/index.php,artisanand its test base onto it, and those files need no change at the flip.Changes
Application::configure($basePath)returns a newConfiguration\ApplicationBuilderwith three of v13's methods:withMiddleware()fills the global middleware list.withExceptions()configures the handler once it first resolves, as in v13.create()returns the application.Paths:
setBasePath()binds v13'sapp,publicandstoragepaths under the base path.path.langstays atapp/lang.useStoragePath()overrides storage.bindInstallPaths()is removed.Entry points:
handleRequest()replacesrun().handleCommand()replaces the artisan script'ssetRequestForConsoleEnvironment()+make('artisan')->run().Lazy start:
start.phpnow runs once, the first time a request, a command or the console Kernel'sbootstrap()needs it, in place of v13's kernel bootstrappers.production, as in v13.start.phpno longer reads the$unitTesting/$testEnvironmentglobals; tests set the environment on the application.Console Kernel contract: the Artisan wrapper is bound from construction and answers v13's console Kernel
bootstrap()andhandle(). So tests can bootstrap the way v13'sTestCasedoes:$app->make(Kernel::class)->bootstrap().ArtisanServiceProviderkeeps only its two commands.Tests: a new
FoundationApplicationBuilderTest(8 tests) runs against a throwaway base path, with a minimal config, route file andartisan.php:configure()binds the v13 paths;withMiddleware()andwithExceptions()work, the latter lazily;handleRequest()bootstraps, sends the response through the global middleware and terminates;handleCommand()runs a command with the console request and returns its status;run()andbindInstallPaths()are gone.The old
run()test moves there as thehandleRequest()test.Verification
feature/platform/framework-4.2.121-rc1). It replacesbootstrap/start.phpwith a v13bootstrap/app.php, and movespublic/index.php,artisanand its test base ontohandleRequest(),handleCommand()and the console Kernel. It ran with vendor installed exactly from its lock:Commandtests that first ran while the local mail sink was down. 196 are skipped, and no test is flagged risky.php -S+server.php→index.phpfor 6 requests, and 7 artisan commands. Statuses, bodies, headers, cookies, command output and exit codes are identical. So are the 13 in-process cookie/session/error-page scenarios.Tag
4.2.121(c0c37038) is not pushed, and neither are4.2.119(c95ae41d) or4.2.120(14026a74). Tag pushes are refused for this session.🤖 Generated with Claude Code
https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo