Skip to content

feat!: 最低 PHP 版本要求提升至 8.1 - #2991

Closed
overtrue wants to merge 1 commit into
6.xfrom
overtrue/drop-php-8.0-support
Closed

overtrue wants to merge 1 commit into
6.xfrom
overtrue/drop-php-8.0-support

Conversation

@overtrue

@overtrue overtrue commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

背景

PHP 8.0 已于 2023-11-26 结束安全支持。

继续支持它还带来了实际成本:在 PHP 8.0 上,composer update --prefer-stable 会解析出 symfony/cache 5.4 + psr/simple-cache 3.0 这一运行时不兼容的组合(symfony/cache 要到 6.0 才支持 psr/simple-cache 3.x),构造 Psr16Cache 时抛 LogicException,CI 的 PHP-8-stable 任务因此持续失败。

该失败与代码改动无关,属于依赖漂移:test.yml 上一次在 6.x 上运行是 2026-04-16,这之后的依赖发布触发了这个组合。

修改

  • composer.json 的 php 约束从 >=8.0.2 提升至 >=8.1
  • CI matrix 移除 8.0
  • README 与文档中的版本要求同步更新

破坏性变更

不再支持 PHP 8.0,需升级到 PHP 8.1 及以上。建议随下一个 minor 版本发布。

关联

#2990 中包含了一处针对该问题的 CI 临时约束(仅在 PHP 8.0 的 job 中把 psr/simple-cache 限制到 ^1.0|^2.0),本 PR 合并后那段可以一并移除。

PHP 8.0 已于 2023-11-26 结束安全支持。继续支持它还带来实际成本:
PHP 8.0 上 composer 会解析出 symfony/cache 5.4 + psr/simple-cache 3.0
这一运行时不兼容的组合(symfony/cache 6.0 起才支持 psr/simple-cache 3.x),
导致 CI 的 PHP-8-stable 任务持续失败。

BREAKING CHANGE: 不再支持 PHP 8.0,请升级到 PHP 8.1 及以上。
Copilot AI lite review requested due to automatic review settings August 7, 2026 21:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 has reached their quota limit.

@vercel

vercel Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
easywechat Ready Ready Preview Aug 7, 2026 9:50pm

This branch was successfully deployed

1 active deployment
Preview — 7b29cf94 Deployed Aug 7, 2026 by vercel[bot]
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.

2 participants