feat: 支持 Laravel 13(双版并行 + v2.0.0)#2
Merged
Merged
Conversation
- .gitignore: 新增 .claude/settings.local.json 忽略规则 防止 Claude Code 自动生成的本地用户配置(含可能的 MCP token 等)误提交 - .claude/settings.json: 新增 enabledPlugins 项目级覆盖 关闭与本 PHP/Laravel 项目无关的 5 个 LSP 插件(gopls/jdtls/pyright/rust-analyzer/typescript), 减少启动期 commands/skills 注入与供应链入口
依赖约束: - php: ^8.2 → ^8.3 (Laravel 13 最低要求) - laravel/framework: ^12.0 → ^12.0||^13.0 - orchestra/testbench: ^10.0 → ^10.0||^11.0 - phpunit/phpunit: ^11.0 → ^11.0||^12.0 - spatie/eloquent-sortable: ^4.0 → ^4.0||^5.0 - 移除 doctrine/dbal: src 零引用,Laravel 11+ 已不需要 代码修复: - src/Form/Field/ListField.php formatValidatorMessages() 修正: 原代码把 MessageBag::toArray() 返回的 array<string> 整体当作单条 message, 实为 bug; Laravel 13 的 MessageBag::add() 收紧类型签名时被 PHPStan 揭出. 修复为遍历每条字符串消息分别 add. CI 矩阵 (.github/workflows/tests.yml): - 主分片 (PHP 8.3 + Laravel 12): unit-a / unit-gh / unit-misc 三段 - 兼容烟测: PHP 8.4 + Laravel 12 / PHP 8.3 + Laravel 13 / PHP 8.4 + Laravel 13 - 通过 matrix.laravel 条件 composer require 切换 testbench/phpunit/sortable 版本 文档: - README 兼容矩阵新增 v2.x 行 (Laravel 12.x/13.x, PHP 8.3+) - CHANGELOG Unreleased 段写明 breaking changes (PHP 8.3+, doctrine/dbal 移除) 本地双版验证通过: - Laravel 12 + PHP 8.3: 5027 tests / 8071 assertions, exit 0 - Laravel 13 + PHP 8.3: 5027 tests / 8071 assertions, exit 0
- introduction.md: 描述与 badge 由 PHP 8.2+ / Laravel 12+ 改为 PHP 8.3+ / Laravel 12 | 13 - upgrade-from-original.md: - 当前版本表与对比表新增 2.x 列 - PHP/Laravel 检查命令措辞同时覆盖 1.x 与 2.x - composer.json 示例改用 ^8.3 / ^12.0||^13.0 / ^2.0 - 章节标题与措辞同步至 PHP 8.3+ / Laravel 12 / 13 - 总结清单更新 - update.md 末尾新增「从 1.x 升级到 2.x」章节,覆盖: - PHP/Laravel/doctrine-dbal 三项破坏性变更 - 升级步骤与示例 - doctrine/dbal 自托管说明 - L12 → L13 分两步走建议 - 留在 1.x 的兼容方案
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.
Summary
doctrine/dbal依赖(src 零引用,Laravel 11+ 已不需要)依赖约束变化
php^8.2^8.3laravel/framework^12.0^12.0||^13.0orchestra/testbench^10.0^10.0||^11.0phpunit/phpunit^11.0^11.0||^12.0spatie/eloquent-sortable^4.0^4.0||^5.0doctrine/dbal^4.0本地双版验证
Breaking Changes(v2.0.0)
doctrine/dbal(如外部项目曾依赖此传递依赖,需显式 `composer require doctrine/dbal`)v1.x 仍维护安全修复。
Test plan