Skip to content

merge to fork master - #1

Open
i25ma wants to merge 77 commits into
i25ma:masterfrom
Tencent:master
Open

merge to fork master #1
i25ma wants to merge 77 commits into
i25ma:masterfrom
Tencent:master

Conversation

@i25ma

@i25ma i25ma commented Jun 2, 2020

Copy link
Copy Markdown
Owner

主分支代码合并

billge1205 and others added 23 commits April 15, 2021 10:53
修复请求发送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 轻量特点。
Copilot AI lite review requested due to automatic review settings August 24, 2026 02:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

billge 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 换成读者)
- 主谓不一致、缺冠词、断句等细节修正
- 保留原意,不做内容层面改动
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants