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

* 注释调整,实际为普通数组,非对象数组; * 返回值调整,void => null; * 清理冗余参数 $value;

在多应用模式下,routePath被改成了应用下的route目录,如下代码: > vendor/topthink/think-multi-app/src/MultiApp.php 82行 ` return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR;` 而在命令执行时,还是取得项目根目录下的route目录,如下代码: > vendor/topthink/framework/src/think/console/command/RouteList.php 63行 `$path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR;` 故,在多应用模式下,命令执行得不到对应路由表

bug

希望增加Log::withContext(['request-id' => $requestId])这种类型的方法,在think-swoole中这个方法很有效

Log

https://github.com/top-think/framework/blob/05adb994cf82a2f9b34145ac41a6082a9914873f/src/helper.php#LL193C16-L193C16 比如 workerman 或 swoole 方式启用 web 服务时,dump 就不好用了

enhancement

模型链式查询 ->field('*,(num - f_num) as a_num->group('id') ->having('a_num > 0')-> ->paginate($size,false,['page'=>$page]);时报错 如果使用 ->select()就没问题

ORM

多应用模式下,在app配置文件中配置domain_bind后,把缓存由file改成redis。访问domain_bind中绑定的域名无法再跳转到对应的应用,接口报404错误

应该是baseFile public function ext(): string { return pathinfo($this->baseFile(), PATHINFO_EXTENSION); }

驱动是 redis 。最近排查,发现使用了 Cache::tag('ddd')->clear() 方法,但是ddd tag中的缓存还是存在。不知道是什么问题。

比如文件驱动,设置缓存空间大小,满了就清理最旧的部分。

Cache::store('redis')->set('sdsd','888888888888'); Cache.php配置redis 'stores' => [ 'file' => [ // 驱动方式 'type' => 'File', // 缓存保存目录 'path' => '', // 缓存前缀 'prefix' => '', // 缓存有效期 0表示永久缓存 'expire' => 0, //...