NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3496 most downloaded on Packagist
The ThinkPHP Framework.
Last release 8 months ago
15 Jan 2026
Ships fairly regularly
a new release about every 3 months
Rarely documented
notes for 10 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
120 releases · first in 2016
改进Config类hook方法 增加key参数 调整Config类lazy方法 修正路由url生成 兼容PHP8.5调整 新增 optimize 命令 改进Request类 优化日志文件删除顺序 调整"psr/http-message"增加"^2.0" 优化 PHP CS Fixer 配置规则 路由
核心移出 ClassNotFoundException 异常,直接使用 think-container 中的异常类
ClassNotFoundException异常,直接使用 think-container 中的异常类ModelService兼容orm4.0CallbackDispatchheader请求过滤检测方法version方法用于版本控制检测withoutmiddleware对自动layer中间件的支持LogRecord记录时间信息group方法用法name生成php think optimize:config 指令php think route:list和php think optimize:route指令,支持分组子目录规则One column per quarter.
增加 ValidateRuleSet 类 用于更方便的进行数组验证
ValidateRuleSet类 用于更方便的进行数组验证prefix参数 (用于是否自动prefix 默认为true)rules方法定义验证规则( 返回数组或验证对象)selfappend、middleware方法多次调用must 属性设置必须验证的字段不生效dateFormat验证规则auto_detect_browser参数Response增加getCookie方法Validate和Container组件移出核心并独立依赖完善 PHP 8.4 兼容性 改进parseUrl方法 改进验证类getError方法 分组绑定自动添加prefix 改进路由到类的方法的时候 支持控制器中间件 自动识别路由到类的layer并支持自动中间件
增加路由预定义变量规则 当变量规则为整数或浮点数的时候 自动转换类型
8.4兼容支持when路由变量验证方法action_bind_param参数 设置操作方法的参数绑定方式json的判断Validate增加accepted、acceptedIf、declined、declinedIf、multipleOf内置规则cookie设置可以在当前请求生效withoutmiddleware方法用于排除某个路由的中间件getKey方法 获取错误字段名invokeAfter位置only方法支持强制类型转换must属性设置该验证类的必须验证字段 无论是否定义require规则fail_delete配置参数 用于在获取缓存发生异常的时候是否强制删除default参数支持传入闭包pull方法判断,并增加default参数Macroable方法注入功能serialize/unserialize方法8.4异常类增加AlwaysErrorMsg注解支持 明确指定是否需要输出错误信息
主要更新:
改进remember方法的有效期兼容性 为requre获取参数方法指定正确的filter类型 取消缓存读取和写入次数计数 废弃相关方法 兼容低版本的psr/log、psr/simple-cache 改进路由的cache方法参数类型 异常页面手册地址调整
改进版本号获取指令(App类VERSION常量废弃) 修正Http类dispatchToRoute方法 改进请求对象获取根域名方法 Feat: 自动获取 php 命令路径,而不是固定用 php fix: is_executable() 的参数不正确 直接使用 PHP_BINARY 常量 Cache类
改进版本号获取指令(App类VERSION常量废弃)
修正Http类dispatchToRoute方法
改进请求对象获取根域名方法
Feat: 自动获取 php 命令路径,而不是固定用 php
fix: is_executable() 的参数不正确
直接使用 PHP_BINARY 常量
Cache类set方法有效期参数兼容DateTimeInterface参数
修正Log/Channel类
Nothing published for this version
Nothing published for this version
Nothing published for this version
改进版本号获取指令 修正异常页面编码输出
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fix: 生成模型字段缓存的命令行指令在模型目录存在子目录时异常
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →