Repository navigation
Merge pull request from dicoding-dev/pre-release/4.2.95 - #59
Merged
Merged
Conversation
…rs (task 2.8, part 1) Introduce a running route-middleware stack so the app can migrate filters -> middleware route-by-route, WITHOUT removing any filter yet. - Route::middleware()/gatherMiddleware() store middleware names on the route. - Router middleware registry (aliasMiddleware/middlewareGroup/middlewarePriority) + resolveMiddleware/gatherRouteMiddleware/uniqueMiddleware. - runRouteWithinStack() runs the route through Illuminate\Pipeline\Pipeline (already present from task 1.2) INSIDE the legacy before/after filter bracket. - New leaves copied from L13: MiddlewareNameResolver (alias/group/':' params), SortedMiddleware (priority sort). - dispatchToRoute: one-line swap route->run($request) -> runRouteWithinStack(). Safety: routes with no ->middleware() short-circuit to a plain run() -> behavior is identical for every existing (filter-only) route (66 existing routing tests unchanged). Filters stay intact; middleware and filters use SEPARATE registries so the ':' param syntax does not collide. Exceptions propagate to the existing top-level handler (base Pipeline rethrows); the HTTP-aware routing Pipeline is deferred to SCC-1. Deferred (SCC-1 lockstep): removing the filter surface, Http\Kernel + middleware groups/priority config, controller middleware -- these land together with the app's filters->middleware conversion that consumes this via the dev-13 alias. Tests: +testRouteMiddlewareRunsAndWraps (closure/short-circuit/alias/param/group), +testRouteMiddlewareCoexistsWithFilters. tests/Routing green (68), Foundation/Http green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit aec112e)
…lters (task 2.8)
Add Controller::middleware($middleware, array $options = []) — matches L13's exact
signature. Bridges to beforeFilter() so controller-declared middleware runs via the
existing ControllerDispatcher filter path until the routing engine is swapped to
stock L13. Lets the app flip $this->beforeFilter('x') -> $this->middleware('x')
(options incl. only/except carry over unchanged after the swap). Additive;
beforeFilter() untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit da7dfc9)
…(task 2.8) runRouteWithinStack() gathered+ran route middleware unconditionally, so the new engine ignored Router::disableFilters() — which the testing env enables by default (RoutingServiceProvider) and which many integration tests toggle via Route::enable/ disableFilters(). Since flipped routes now attach their guards as ->middleware(), skip the pipeline when $filtering is off, mirroring the legacy filter path. Restores filters-off-in-testing semantics for flipped routes (e.g. an unauthenticated request reaches the controller instead of the oauth2 middleware's 401). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 3d77e2e)
agissept
force-pushed
the
pre-release/4.2.95
branch
from
September 17, 2026 09:40
3d77e2e to
6c6d989
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.
Pre-release 4.2.95 — dibangun di atas 4.2.94.
Tasks
Controller::middleware()bridging ke controller filters;MiddlewareNameResolver+SortedMiddleware; honourdisableFilters()di engine baru.@deprecatedbridge.Notes
🤖 Generated with Claude Code