topthink/framework
The ThinkPHP Framework.
v8.1.4
3.4M downloads/mo
#3184 most downloaded on Packagist
top-think/framework
What this package is like to depend on
Last release 7 months ago
15 Jan 2026
Ships fairly regularly
a new release about every 3 months
Rarely documented
notes for 10 of 115 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
120 releases · first in 2016
1 release in the last 12 months
see the full history below
Release timeline
119 releases · Jan 2016 to Jan 2026Releases
latest 60 of 120-
v8.1.415 Jan 2026Release notes
Open source →- 改进Config类hook方法 增加key参数
- 调整Config类lazy方法
- 修正路由url生成
- 兼容PHP8.5调整
- 新增 optimize 命令
- 改进Request类
- 优化日志文件删除顺序
- 调整"psr/http-message"增加"^2.0"
- 优化 PHP CS Fixer 配置规则
- 路由绑定到命名空间支持控制器后缀
- 改进路由分组的url有效性检查
- 改进Redis缓存驱动
- 改进路由中间件传参导致的问题
- 改进HttpEnd错误日志
- 改进Response类send方法的异常处理
-
v8.1.314 Jul 2025Release notes
Open source →主要改进和优化了路由和日志功能
- 核心移出
ClassNotFoundException异常,直接使用think-container中的异常类 - 改进分组绑定的MISS路由支持
- 路由地址的URL不支持直接访问
ModelService兼容orm4.0- 改进
CallbackDispatch - 增加
header请求过滤检测方法 - 增加
version方法用于版本控制检测 - 改进改进
withoutmiddleware对自动layer中间件的支持 - 改进日志的写入确保按照日志的记录时间
- 日志
LogRecord记录时间信息 - 开启强制路由的不再检查路由地址直接访问
- 路由定义支持分组子目录,支持自动扫描子目录注册分组
- 改进Route类
group方法用法 - 改进路由的
name生成 - fixed:路由组设置了中间件等,但子路由没有设置时,合并问题
- 增加
php think optimize:config指令 - 改进
php think route:list和php think optimize:route指令,支持分组子目录规则
- 核心移出
-
v8.1.214 Jan 2025Release notes
Open source →- 改进事件订阅及多级通配符
- 增加
ValidateRuleSet类 用于更方便的进行数组验证 - 增加验证分组、规则集和规则别名方法
- 路由分组绑定方法增加
prefix参数 (用于是否自动prefix 默认为true) - 修正批量验证
- 支持通过
rules方法定义验证规则( 返回数组或验证对象) - 依赖注入支持使用
self - 路由Rule支持
append、middleware方法多次调用 - 修正通过
must属性设置必须验证的字段不生效 - 优化 Cookie 设置(数组 key 为字符串数值时,PHP 会自动转换为 int)
- 修正分组多级路由合并检查
- 改进多模块模式的视图自动渲染定位
- 改进
dateFormat验证规则 - 多语言增加
auto_detect_browser参数 Response增加getCookie方法Validate和Container组件移出核心并独立依赖- 改进pathinfo兼容获取
-
v8.1.126 Nov 2024Release notes
Open source →- 完善 PHP 8.4 兼容性
- 改进parseUrl方法
- 改进验证类getError方法
- 分组绑定自动添加prefix
- 改进路由到类的方法的时候 支持控制器中间件
- 自动识别路由到类的layer并支持自动中间件
-
v8.1.021 Nov 2024Release notes
Open source →本版本主要改进了路由和验证功能,以及PHP
8.4兼容支持- 修复路由使用数组方式报错问题
- 改进验证场景处理
- 路由分组支持默认URL调度和绑定,并且不受强制路由影响
- 自动URL调度功能,支持多模块
- 资源路由支持扩展路由定义
- 支持多模块自动路由规则,并自动执行模块中间件
- 路由新增
when路由变量验证方法 - 增加枚举类型验证
- 改进数组验证支持指定键名和支持多维数组验证
- 增加路由预定义变量规则 当变量规则为整数或浮点数的时候 自动转换类型
- 路由配置增加
action_bind_param参数 设置操作方法的参数绑定方式 - 改成系统初始化阶段的异常处理
- 配置增加获取器功能
- 优化异常处理对
json的判断 - 改进环境变量文件读取 支持公共环境变量文件
Validate增加accepted、acceptedIf、declined、declinedIf、multipleOf内置规则cookie设置可以在当前请求生效- 改进日志备份文件名规则
- 增加
withoutmiddleware方法用于排除某个路由的中间件 - 优化路由调度
- 改进缓存反序列化的异常处理
- 改进验证异常类 增加
getKey方法 获取错误字段名 - 改进依赖注入的对象默认值判断
- 调整
invokeAfter位置 - Request
only方法支持强制类型转换 - 优化验证类的验证规则判断
- 验证类支持使用
must属性设置该验证类的必须验证字段 无论是否定义require规则 - 缓存增加
fail_delete配置参数 用于在获取缓存发生异常的时候是否强制删除 - 缓存get方法
default参数支持传入闭包 - 改进缓存
pull方法判断,并增加default参数 - 优化智能事件订阅,提高事件响应效率
- 增加
Macroable方法注入功能 - 改进缓存
serialize/unserialize方法 - 兼容PHP
8.4
-
v8.0.429 Jul 2024Release notes
Open source →主要更新:
- Request增加setRootDomain方法
- 修正RedirectResponse的restore方法
- cache/redis 驱动改为使用时才连接
- 标签内的缓存标识列表为空时,不调用 clearTag 方法
- 修正默认异常模板的编码输出
- 修复文件响应文件名为中文无法正确在浏览器下载中使用的问题
- Session Facade增加注释
- 修正清空路由规则方法未清空分组路由的问题
- requireCallback 验证规则支持传入数组
- 支持设置控制台默认执行用户
- 异常类增加AlwaysErrorMsg注解支持 明确指定是否需要输出错误信息
- 改进路由到类的方法支持数组方式
- 改进复杂条件验证唯一
- requireIf验证支持数组方式
- 修正路由分组的调度检查
-
v8.0.317 Oct 2023Release notes
Open source →- 改进remember方法的有效期兼容性
- 为requre获取参数方法指定正确的filter类型
- 取消缓存读取和写入次数计数 废弃相关方法
- 兼容低版本的psr/log、psr/simple-cache
- 改进路由的cache方法参数类型
- 异常页面手册地址调整
-
v8.0.215 Aug 2023Release notes
Open source →改进版本号获取指令(App类VERSION常量废弃)
修正Http类dispatchToRoute方法
改进请求对象获取根域名方法
Feat: 自动获取 php 命令路径,而不是固定用 php
fix: is_executable() 的参数不正确
直接使用 PHP_BINARY 常量
Cache类set方法有效期参数兼容DateTimeInterface参数
修正Log/Channel类 -
v8.0.109 Jul 2023Nothing published for this version
-
v8.0.030 Jun 2023Nothing published for this version
-
v8.0.0-beta07 Feb 2023 pre-releaseNothing published for this version
-
v6.1.516 Apr 2024 -
v6.1.411 Jul 2023Nothing published for this version
-
v6.1.322 May 2023Nothing published for this version
-
v6.1.208 Feb 2023Nothing published for this version
-
v6.1.126 Oct 2022Nothing published for this version
-
v6.1.025 Oct 2022Nothing published for this version
-
v6.0.1616 Apr 2024 -
v6.0.1519 May 2023Nothing published for this version
-
v6.0.1425 Oct 2022Nothing published for this version
-
v6.0.1315 Jul 2022Nothing published for this version
-
v6.0.1221 Jan 2022Nothing published for this version
-
v6.0.1131 Dec 2021Nothing published for this version
-
v6.0.10no dateNothing published for this version
-
v6.0.922 Jul 2021Nothing published for this version
-
v6.0.827 Apr 2021Nothing published for this version
-
v6.0.725 Jan 2021Nothing published for this version
-
v6.0.610 Jan 2021Nothing published for this version
-
v6.0.526 Oct 2020Nothing published for this version
-
v6.0.429 Sep 2020Nothing published for this version
-
v6.0.326 Jun 2020Nothing published for this version
-
v6.0.213 Jan 2020Nothing published for this version
-
v6.0.124 Dec 2019Nothing published for this version
-
v6.0.023 Oct 2019Nothing published for this version
-
v6.0.0-rc514 Oct 2019 pre-releaseNothing published for this version
-
v6.0.0-rc415 Aug 2019 pre-releaseNothing published for this version
-
v6.0.0-rc302 Jun 2019 pre-releaseNothing published for this version
-
v6.0.0-rc222 Apr 2019 pre-releaseNothing published for this version
-
v5.1.4225 Oct 2022Nothing published for this version
-
v5.1.4111 Jan 2021Nothing published for this version
-
v5.1.4009 Oct 2020Nothing published for this version
-
v5.1.3917 Nov 2019Nothing published for this version
-
v5.1.3809 Aug 2019Nothing published for this version
-
v5.1.3726 May 2019Nothing published for this version
-
v5.1.3628 Apr 2019Nothing published for this version
-
v5.1.3503 Mar 2019Nothing published for this version
-
v5.1.3430 Jan 2019Nothing published for this version
-
v5.1.3316 Jan 2019Nothing published for this version
-
v5.1.3223 Dec 2018Nothing published for this version
-
v5.1.3111 Dec 2018Nothing published for this version
-
v5.1.3030 Nov 2018Nothing published for this version
-
v5.1.2911 Nov 2018Nothing published for this version
-
v5.1.2829 Oct 2018Nothing published for this version
-
v5.1.2722 Oct 2018Nothing published for this version
-
v5.1.2614 Oct 2018Nothing published for this version
-
v5.1.2504 Oct 2018Nothing published for this version
-
v5.1.2405 Sep 2018Nothing published for this version
-
v5.1.2324 Aug 2018Nothing published for this version
-
v5.1.2209 Aug 2018Nothing published for this version
-
v5.1.2102 Aug 2018Nothing published for this version