跳转到内容
PHP Ecosystem
Explore

Installation

此内容尚不支持你的语言。

The package requires PHP 8.3+, the filter and mbstring extensions, PSR HTTP interfaces, and Yii ~2.0.55 || ^22.0@dev: Yii 2.0.55 or later within the 2.0 line, or Yii 22. Older Yii 2.0 releases are no longer supported. The selected framework release may require a newer PHP version; check its resolved requirements. Keep Composer’s security advisory blocking enabled and run composer audit after resolving dependencies.

Terminal window
composer require yii2-extensions/psr-bridge:^0.4 httpsoft/http-message

HttpSoft is the implementation used in these examples and in package tests. An existing compatible PSR-7/PSR-17 implementation can be reused. Register its factories as described in configuration. The bridge depends on interfaces and does not select a production message implementation for you.

Check the installed version with composer show yii2-extensions/psr-bridge and follow UPGRADE when upgrading.

For a SAPI entry script, start with the README example. For long-running runtimes, the companion packages FrankenPHP and RoadRunner supply the server integration. Install and configure the chosen runner separately and check its lifecycle implementation against the bridge version in use.

A custom runtime supplies a PSR-7 server request, emits the returned response, and calls Application::finalize(). The bridge does not start an HTTP server or implement the PSR-15 middleware pipeline itself.

Continue with configuration, practical examples, or the agent skill installation.