Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
## Summary - decommission the legacy findings lifecycle backfill substrate across command, job, service, and UI layers - remove related platform capabilities, operation catalog entries, and action surface exemptions - add regression and removal verification tests to ensure runtime integrity and surface absence - include spec, plan, tasks, and data-model artifacts for the removal slice ## Scope - active spec: specs/253-remove-findings-backfill-runtime-surfaces - target branch: dev ## Validation - integrated regression and removal verification tests for console, findings, and system ops surfaces - audit log and capability trace verification for the removal path Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #294
30 lines
742 B
PHP
30 lines
742 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use App\Services\Localization\LocaleResolver;
|
|
use Closure;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Carbon;
|
|
use Illuminate\Support\Facades\App;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class ApplyResolvedLocale
|
|
{
|
|
public function __construct(private LocaleResolver $resolver) {}
|
|
|
|
public function handle(Request $request, Closure $next, ?string $plane = null): Response
|
|
{
|
|
$context = $this->resolver->resolve($request, $plane);
|
|
|
|
App::setLocale($context['locale']);
|
|
Carbon::setLocale($context['locale']);
|
|
|
|
$request->attributes->set(LocaleResolver::REQUEST_ATTRIBUTE, $context);
|
|
|
|
return $next($request);
|
|
}
|
|
}
|