如何使用 Composer 安装 PSR-7 http-message 接口

How to install PSR-7 http-message interfaces with Composer

是否有可能安装 PSR-7 HTTP message interfaces using Composer? I can't seem to find any information on the official github page 的方法,也不是在网络上。

作为 Composer 初学者,我还想问一下,是否可以使用 Composer 从互联网(也许也在 Github 之外)安装软件包,即使他们不提供有关安装的信息使用作曲家。

非常感谢。

您只需 select 并安装 PSR-7 实现,例如 laminas/laminas-diactoros or slim/psr7. You can find all composer packages on https://packagist.org/

示例:

composer require slim/psr7
composer require psr/http-message