merge to fork master - #1
Open
i25ma wants to merge 77 commits into
Open
Conversation
fix BinyException.php thanks Illyasviels
merge changes
修复请求发送json的type时拉取不到param的问题
修复启用restful的api时multipart/form-data的上传时,request->param拉不到post的信息的问题
用AI更新了遗留的bug 以及PHP8+兼容 算是弥补了之前的遗憾 主要内容: - 修复 Form::typeDatetime 逻辑颠倒的 bug(原本任意输入都能通过校验) - 修复 BinyException 在 PHP 8+ 下的 vsprintf TypeError(大量老代码传字符串 params) - 修复 Autoload include 未 include_once 导致的类重定义风险 - 修复 Request 在 CLI / 缺失 $_SERVER 时的 undefined array key warning - SQL 转义走 mysqli_real_escape_string + set_charset,防多字节注入(含 real_like_string) - CSRF token 用 random_bytes + hash_equals(密码学安全 + 常量时间对比) - unserialize 加 allowed_classes=false,防对象注入 - App::__get 从硬 switch 改为 bind() 注册表,支持第三方组件扩展 - App.php 顶部 include 全部改为 include_once,与 Composer classmap 共存 - 新增 composer.json(PHP >= 8.1,app/* 走 PSR-4,lib/ 继续 Biny 自研 Autoload 兜底) - 新增 tests/ 集成测试脚本(smoke + p0_fixes 全部通过) 外部 API 100% 兼容,保留 Biny 轻量特点。
added 5 commits
August 24, 2026 10:51
- release 徽章改为 shields.io 动态跟随 GitHub Releases - 新增 PHP >= 8.1 徽章 - 徽章链接改为 https,仓库路径统一大小写
演示如何通过 v2.11.0 引入的 App::bind() 注册表挂载 MongoDB, 以及封装 MongoDAO 风格类的最佳实践。 框架保持轻量,MongoDB 等第三方组件由用户按需扩展。 回应 issue #142。
演示如何通过 App::bind() + Event 钩子集成 firebase/php-jwt: - JWT 签发(jwtService) - JWT 验证(beforeAction 钩子做统一中间件) - 白名单排除、当前用户注入 - Refresh token / JTI 黑名单两种登出方案 - JWE 加密 JWT 示例 - 常见坑:HS256 密钥、alg:none、localStorage XSS 等 回应 issue #137。
- README 新增“第三方组件接入 Extensions”章节,指向 docs/mongodb.md 与 docs/jwt.md - FAQ 里“适配 PHP7”的过时描述更新为 v2.11.0 已支持 PHP 8.x - 补充第三方组件挂载语法示例(Kafka/ES/RabbitMQ/S3)
修复原 README 里的中式英语与语法问题: - "cross library join table" → "cross-database JOINs" - "query PK cache" → "primary-key query caching"(展开缩写) - "anti injection / anti XSS" → "injection prevention / XSS escaping" - "rapid positioning problems" → "quickly identifying issues" - "template rendering deranged" → "template render as garbled output"(deranged 意为精神错乱) - "you use the native abbreviated rendering method" → "Biny's built-in examples use PHP's short-tag syntax"(原译误把主语从 Biny 换成读者) - 主谓不一致、缺冠词、断句等细节修正 - 保留原意,不做内容层面改动
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主分支代码合并