From bbc39a4b8380292ff72dcde939fb43a819800fbc Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Fri, 15 May 2026 17:11:52 +0400 Subject: [PATCH] [#520] Finalize RC release notes link and rector-typed terminal closure --- CHANGELOG.md | 3 ++- src/App/Adapters/WebAppAdapter.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9347a16b..25efb03c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [3.0.0] - TBD +Upgrade guide: https://github.com/softberg/quantum-php-docs/blob/master/v3.0/upgrade-guide.md + ### Changed - **BREAKING:** Refactored app bootstrapping and DI ownership model (#373): - Introduced `AppContext` as the central execution state holder (mode, baseDir, DiContainer, Environment, Config, Request, Response, Routes) @@ -53,7 +55,6 @@ - Routing is executed once per request; matched route is stored on the `Request` - Global route helper functions (`current_*`, `route_*`) now rely on `MatchedRoute` instead of legacy static route state - Middleware ordering is strictly prepend-based (later middleware wraps earlier) - - Nested route groups are no longer supported - Route name uniqueness is now enforced at build time - **BREAKING:** Controller resolution behavior changed: diff --git a/src/App/Adapters/WebAppAdapter.php b/src/App/Adapters/WebAppAdapter.php index 7b1ed81a..37f05471 100644 --- a/src/App/Adapters/WebAppAdapter.php +++ b/src/App/Adapters/WebAppAdapter.php @@ -18,7 +18,6 @@ use Quantum\Middleware\Exceptions\MiddlewareException; use Quantum\Loader\Exceptions\LoaderException; -use Quantum\Module\Exceptions\ModuleException; use Quantum\Config\Exceptions\ConfigException; use Quantum\App\Stages\SetupErrorHandlerStage; use Quantum\Router\Exceptions\RouteException; @@ -39,6 +38,8 @@ use Quantum\App\Enums\ExitCode; use Quantum\App\BootPipeline; use Quantum\App\AppContext; +use Quantum\Http\Response; +use Quantum\Http\Request; use ReflectionException; /** @@ -68,7 +69,7 @@ public function __construct(AppContext $context) /** * Starts the web app - * @throws ModuleException|MiddlewareException|LangException|RouteException|CsrfException|ConfigException|DiException|BaseException|LoaderException|ReflectionException + * @throws MiddlewareException|LangException|RouteException|CsrfException|ConfigException|DiException|BaseException|LoaderException|ReflectionException */ public function start(): ?int { @@ -91,7 +92,7 @@ public function start(): ?int $viewCache = $this->setupViewCache(); - $terminal = fn ($request) => $viewCache->getCachedResponse($request->getUri() ?? '') + $terminal = fn (Request $request): Response => $viewCache->getCachedResponse($request->getUri() ?? '') ?? (new RouteDispatcher())->dispatch($matchedRoute, $request); $response = (new MiddlewareManager($matchedRoute))->applyMiddlewares(request(), $terminal);