Skip to content

Add symfony/http-foundation as a runtime dependency for mineadmin/support#164

Draft
Copilot wants to merge 3 commits into3.0from
copilot/add-symfony-http-foundation-dependency
Draft

Add symfony/http-foundation as a runtime dependency for mineadmin/support#164
Copilot wants to merge 3 commits into3.0from
copilot/add-symfony-http-foundation-dependency

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 30, 2026

mineadmin/support uses Symfony\Component\HttpFoundation\HeaderUtils and IpUtils at runtime, but the package was only being pulled in transitively via hyperf/testing from require-dev. Production installs with composer install --no-dev could therefore miss the dependency and fail at runtime.

  • Runtime dependency declaration

    • Added symfony/http-foundation to src/Support/composer.json so the Support component declares the dependency it actually uses.
    • Added the same requirement to the root composer.json to keep the aggregated package manifest aligned with component-level requirements.
  • Version compatibility

    • Declared the dependency as ^6.4 || ^7.0 instead of pinning only to ^6.4.
    • This preserves compatibility with the current PHP 8.1 support floor while also allowing newer Symfony majors on PHP 8.2+ environments.
  • Affected runtime path

    • Mine\Support\Request\ClientIpRequestTrait imports and calls HttpFoundation utilities for forwarded header parsing and trusted proxy IP checks.
use Symfony\Component\HttpFoundation\HeaderUtils;
use Symfony\Component\HttpFoundation\IpUtils;
  • Result
    • composer install --no-dev now includes symfony/http-foundation, avoiding missing-class failures in the Support request IP handling path without unnecessarily restricting supported Symfony versions.

[!WARNING]


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI changed the title [WIP] Add symfony/http-foundation dependency for hyperf/testing Add symfony/http-foundation as a runtime dependency for mineadmin/support Mar 30, 2026
Copilot AI requested a review from zds-s March 30, 2026 01:27
@zds-s
Copy link
Copy Markdown
Member

zds-s commented Mar 30, 2026

@copilot 6.4 有点太低了吧,我现在是支持 8.1-8.3 的。未来也是要计划支持到最新 8.5 的

Copy link
Copy Markdown
Author

Copilot AI commented Mar 30, 2026

@copilot 6.4 有点太低了吧,我现在是支持 8.1-8.3 的。未来也是要计划支持到最新 8.5 的

已调整为 ^6.4 || ^7.0,兼容当前 PHP 8.1-8.3,同时不再限制 PHP 8.2+ 环境安装 Symfony 7。对应提交:df62549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mineadmin/support 缺少symfony/http-foundation 的依赖。需要增加

3 participants