framework icon indicating copy to clipboard operation
framework copied to clipboard

ThinkPHP Framework

Results 260 framework issues
Sort by recently updated
recently updated
newest added

**您的功能请求与问题相关吗?** 希望 ThinkPHP 可以支持 Phar 打包,配合 worker 或 swoole 等组件实现 phar 方式或二进制方式运行。 **描述您想要的解决方案** 替换系统的 Glob 和 realpath 等函数的使用。

enhancement

声明以下路由定义 ``` Route::group('admin', function () { Route::resource('user', 'user')->except(['create', 'edit']); })->prefix('api.admin.'); ``` 实际上 ./think route:list 生成的预览定义 ``` +----------------------+-------------+--------+-------------+ | Rule | Route | Method | Name | +----------------------+-------------+--------+-------------+ | admin/user |...

Route

### 所属功能组件 其它 ### ThinkPHP 版本 8.0.3 ### 操作系统 Windows、Linux ### 错误信息 ### php8.4+出现大量异常报错 `Deprecated: Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used...

Feature

修复全局注册验证规则无法生效的bug

更新前版本中路由ext设置的是shtml,运行了很长一段时间,是没有问题的。 今天更新了最新版,发现后缀变成了html,导致页面无法访问,手动改成shtml访问正常。 应该是url生成的问题。

6.0.4调整了http初始化位置。 目前测试是在Services执行后再进行初始化。 执行http run() 方法时,会找不到依赖注入的 Request 对象,然后重新执行make request.

https://github.com/top-think/framework/blob/9cb47919f59f080e39ec2b8401e4f9c11c8548fb/src/think/middleware/CheckRequestCache.php#L77 `$tag = null; ` 会导致应用配置(app/index/config/route.php)的请求缓存标签无效,建议更改为 `$tag = $this->config['request_cache_tag'];` 另外还有一个疑问 https://github.com/top-think/framework/blob/9cb47919f59f080e39ec2b8401e4f9c11c8548fb/src/think/middleware/CheckRequestCache.php#L102 $tag没有hash,实际缓存时,缓存标签KEY却是hash过的,没看到代码用的md5函数

在tp5中,路由中间件是可以捕获路由匹配中遇到的验证错误,但是在tp6中,只要出错就不会走中间件handle。不想设置全局的

``` public function routes(): void { $this->registerRoutes(function (Route $route) { $route->group(config('admin.route.prefix'), function (Route $router) { $authController = config('admin.auth.controller', AuthController::class); $router->get('auth/login', $authController.'@getLogin')->name('admin.login'); $router->group('',function (Route $router) { $router->resource('users', \quick\admin\controllers\UserController::class); }); }); });...