dootask/bootstrap/providers.php
kuaifan cbe00f1284 refactor(skeleton): 平移 Laravel 13 新目录结构
- bootstrap/app.php 改为 Application::configure() 链式配置:
  withRouting(web/api/console) + withMiddleware + withExceptions
- 删除 app/Http/Kernel.php、app/Console/Kernel.php:全局/分组中间件
  归并到 13 默认栈,定制项经 trustProxies/trimStrings/
  validateCsrfTokens/throttleApi/alias(webapi) 配置 API 表达
- 删除 app/Exceptions/Handler.php:ApiException/ModelNotFound 渲染、
  ApiException 条件日志(report->stop)迁入 withExceptions;
  图片动态裁剪逻辑抽为 App\Exceptions\ImagePathHandler
- 删除 RouteServiceProvider/EventServiceProvider/AuthServiceProvider/
  BroadcastServiceProvider:限流、14 个模型观察者、Registered 监听
  迁入 AppServiceProvider::boot;新增 bootstrap/providers.php
- 删除 7 个框架默认中间件子类(TrustProxies/TrimStrings/VerifyCsrfToken/
  EncryptCookies/Authenticate/RedirectIfAuthenticated/
  PreventRequestsDuringMaintenance)与未启用的 TrustHosts,
  保留自定义 WebApi
- config/app.php 移除 providers/aliases 数组(改用框架默认集 +
  bootstrap/providers.php,补齐 9~13 新增的框架 provider)
- artisan、public/index.php 换 13 骨架版(handleCommand/handleRequest)

验证:LaravelS 正常拉起,/health、登录、token 认证、WebSocket 握手、
头像、裁剪(经 withExceptions)、404 兜底全过;php artisan test
145 passed/1 skipped;migrate:fresh 213 全过

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 19:51:19 +00:00

6 lines
64 B
PHP

<?php
return [
App\Providers\AppServiceProvider::class,
];