Repository navigation
Pre-release 4.2.118 → 4.2.117 — task 4.5 (global hooks): v13 global middleware replaces App::before/after/down - #90
Merged
Conversation
…wn (task 4.5) The Application now hosts v13's global middleware stack (Http\Kernel's setGlobalMiddleware/getGlobalMiddleware) and runs it through Illuminate\Routing\Pipeline around the route dispatch, as v13's Kernel does. The stack is skipped while 'middleware.disable' is true (v13's shouldSkipMiddleware), which restores L4.2's "global filters off in tests" parity lost in the routing swap. Removed the L4.2 hooks with no v13 counterpart: before(), after(), down() (and the illuminate.app.down event), finish()/callFinishCallbacks() and shutdown(). terminate() keeps the terminating callbacks. isDownForMaintenance() stays; v13's queue worker calls it. Added Foundation\Configuration\Middleware, the use()/getGlobalMiddleware() subset of v13's withMiddleware() object, so the app's registration keeps its meaning after the flip. Fork suite 292 green. 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.118
branch
from
October 2, 2026 08:38
d52ab32 to
d2e5980
Compare
agissept
marked this pull request as ready for review
October 2, 2026 08:41
agissept
approved these changes
Oct 2, 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, global hooks — v13 global middleware replaces
App::before/after/downStacks on #89. The fork's
Applicationruns a global middleware stack around the route dispatch, the way v13'sHttp\Kerneldoes, and drops L4.2's application hooks. The app can register its global middleware through v13's API now. After the flip,bootstrap/app.php'swithMiddleware()hands the same registration to v13's kernel.Changes
Illuminate\Foundation\Application(v13Http\KernelAPI; the fork has no HTTP kernel):setGlobalMiddleware()andgetGlobalMiddleware().dispatch()sends the request throughIlluminate\Routing\Pipeline(v13's kernel uses the same class) to the router.shouldSkipMiddleware()(v13 API): the stack is skipped whilemiddleware.disableistrue. That's how the app turns off filters in tests, so this brings back L4.2's "global filters are off in tests", lost in the routing swap (4.2.108).Handler. The routingPipelineonly renders them itself whenContracts\Debug\ExceptionHandleris bound, and the fork binds it only for the queue worker.Illuminate\Foundation\Configuration\Middleware: v13'swithMiddleware()object, under v13's name, withuse()andgetGlobalMiddleware(). The fork ships none of v13's default global middleware, souse()defines the whole stack, as it does on v13.before(),after(),down()and itsilluminate.app.downevent,finish()andcallFinishCallbacks(), andshutdown().terminate()keeps the terminating callbacks.isDownForMaintenance()stays, because v13's queue worker calls it.FoundationGlobalMiddlewareTest(6 tests):handle();Middlewareobject defines the stack;Not in this PR
MiddlewareBuilder) stay until the kernel middleware arrays land.down/upstill write the fork'sapp.manifest/downfile.Branch history
pre-release/4.2.117was rebased (new SHAs, same tree) after this branch was cut. Rewritingpre-release/4.2.118wasn't possible from this session, so it merges the rebased 4.2.117 in (d52ab323, no file changes). The diff against 4.2.117 is this slice only. The commit list also shows the pre-rebase copies of the 4.2.109–4.2.117 commits, and a rebase onto 4.2.117 drops them.Verification
middleware.disableand reversing the stack each turn them red.feature/platform/framework-4.2.118-rc1) moves its hooks onto this API. It ran with vendor installed exactly from its lock:Tag
4.2.118is ond52ab323, this branch's head.🤖 Generated with Claude Code
https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo