laravel/lumen-framework

[Bug] While upgrading Lumen 9 to 11 Suggests Incompatible Version of symfony/psr-http-message-bridge

开放

#1,286 创建于 2025年6月12日

 (8 条评论) (0 个反应) (0 位负责人)PHP (410 个派生)github user discovery
help wanted

仓库指标

星标
 (1,507 个星标)
PR 合并指标
 (平均合并 1小时 3分钟) (30 天内合并 7 个 PR)

描述

Current Version

Lumen Framework: ^9.0 PHP Version: ^8.1 Database Driver & Version: MySQL 5.7

Upgrading To

Lumen Framework: ^11.2.0 PHP Version: ^8.2 Database Driver & Version: MySQL 5.7

Description

We recently upgraded laravel/lumen-framework from version 9 to 11. The upgrade went smoothly overall—except for one issue related to our logging setup.

We use a custom tracing library (based on Monolog) for advanced logging, which relies on symfony/psr-http-message-bridge. In our setup, this package is a dependency of razorpay/trace, which requires version ^7.0 of the Symfony bridge.

However, Lumen 11 suggests using version ^2.0 of symfony/psr-http-message-bridge (mentioned here ), which causes a version conflict. Moreover, Lumen 11 still relies internally on psr/http-message:^1.0, while most modern PSR-7 implementations (e.g., nyholm/psr7:^1.6) expect compatibility with later versions of the Symfony bridge.

This mismatch prevents trace logs and PSR-7 bridging features from functioning correctly after the upgrade.

Expected Behavior

The suggested version for symfony/psr-http-message-bridge in the documentation should be updated to a version compatible with modern PSR-7 implementations and Symfony components—preferably ^7.0 or at least ^3.0+.

Suggested Fixes

  • Update the "Suggested Packages" section in the documentation to recommend a compatible version (e.g., ^7.0)

  • Clarify Lumen’s support for PSR-7 implementations and bridging libraries

  • Ensure compatibility with modern Symfony components when using Monolog or custom logging solutions

Environment

Lumen version: 11.2.0 PHP version: 8.2

Related packages:

razorpay/trace: custom-library symfony/psr-http-message-bridge:^2.0 (suggested, causes issue) symfony/psr-http-message-bridge:^7.0 (required)

Steps To Reproduce

  • Create or upgrade a Lumen 9 project to Lumen 11
  • Include a package like razorpay/trace:custom-branch which requires symfony/psr-http-message-bridge:^7.0
  • Install suggested packages from the Lumen 11 documentation
  • Observe that trace logging or PSR-7 bridging fails silently or throws type errors

贡献者指南