framework
framework copied to clipboard
ThinkPHP Framework
PHP环境:PHP Version 8.3.0 框架版本:ThinkPHP 8.0.3 是在多应用模式下与强路由模式下发现,单应用还没尝试 Route::group("login",function () { Route::post('login', "login"); Route::post('logout', "logout"); // 正常走中间件 Route::rule('getRuleList', "getRuleList")->middleware(Auth::class); // 不走中间件 Route::post('getRuleList', "getRuleList")->middleware(Auth::class); Route::rule('getRuleList', "getRuleList",'POST')->middleware(Auth::class); })->prefix('Login/');
在全局定义了查询范围 protected $globalScope = ['is_delete']; public function scopeIs_Delete($query): void { $query->where('is_delete',0); } 正常使用Model::withoutGlobalScope()可以关闭这个范围 但是在闭包里面join查询时候没有办法调用这个静态方法,还是会报字段重复的错误 SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'is_delete' in where clause is ambiguous 请问有解决办法吗
如下面报错,其实不用特别的高并发,用workerman开4个进程,如果有频繁的模型save,没有开启数据库字段缓存,就会频繁出现下面的报错。 ``` TypeError: think\cache\driver\Redis::getTagItems(): Return value must be of type array, bool returned in /home/augushong/www/ulthon_admin/vendor/topthink/framework/src/think/cache/driver/Redis.php:233 Stack trace: #0 /home/augushong/www/ulthon_admin/vendor/topthink/framework/src/think/cache/TagSet.php(112): think\cache\driver\Redis->getTagItems() #1 /home/augushong/www/ulthon_admin/vendor/topthink/think-orm/src/db/PDOConnection.php(877): think\cache\TagSet->clear() #2 /home/augushong/www/ulthon_admin/vendor/topthink/think-orm/src/db/PDOConnection.php(1167): think\db\PDOConnection->pdoExecute() #3 /home/augushong/www/ulthon_admin/vendor/topthink/think-orm/src/db/BaseQuery.php(1260): think\db\PDOConnection->update() #4...
`Request` 的 `subDomain()` 函数中,采用了 `stristr` 去掉 rootDomain 的部分。stristr 是查找子串第一次出现,并返回字符串的剩余部分。 所以如果域名是 `tp.com.local.tp.com` 。那么 `subDomain()` 将返回空字符,而不是期望的 `tp.com.local` 。
htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
```php /** * 获取变化的数据 并排除只读数据 * @access public * @return array */ public function getChangedData() { if ($this->force) { $data = $this->data; } else { $data = array_udiff_assoc($this->data, $this->origin, function...
` /** * 根据关联条件查询当前模型 * @access public * @param string $operator 比较操作符 * @param integer $count 个数 * @param string $id 关联表的统计字段 * @param string $joinType JOIN类型 * @return Query...
https://github.com/top-think/framework/blob/5ea34cdaeee1c3d7d91a7510108c95e92e563f23/src/think/exception/InvalidArgumentException.php#L14
目前 Issues 比较混乱,且缺少信息,增加反馈模板,看看能不能减轻开发人员的压力。 演示地址:https://github.com/big-dream/framework/issues/new/choose ### Issues 入口 增加手册和轻社区入口  ### Bug 反馈 收集所属功能、框架版本、运行环境和报错信息。独立的 ORM 和 多应用引导至对应的仓库去反馈。  ### 功能请求  ### 其它问题 