legatus / responder
轻松构建PSR-7响应
0.1.0
2020-07-25 15:12 UTC
Requires
- php: >=7.4
- ext-json: *
- http-interop/http-factory-discovery: ^1.5
- psr/http-factory: ^1.0
- psr/http-server-middleware: ^1.0
- ralouphie/mimey: ^2.1
Requires (Dev)
- adlawson/vfs: ^0.12.1
- friendsofphp/php-cs-fixer: ^2.16
- infection/infection: ^0.16.4
- league/plates: ^3.3
- phpunit/phpunit: ^9.0
- symfony/serializer: ^4.0|^5.0
- twig/twig: ^3.0
- vimeo/psalm: ^3.7
This package is auto-updated.
Last update: 2024-09-26 07:05:51 UTC
README
轻松构建PSR-7响应
安装
您可以使用Composer安装Responder组件
composer require legatus/responder
快速开始
<?php // This automatically detects installed PSR Message Factories :) $responder = Legatus\Http\create_responder(); $response = $responder->json([ 'msg' => 'This is a cool json response', ]); $response = $responder->redirect('/take/me/here'); $response = $responder->html('<h1>Hello World!</h1>'); $response = $responder->blob('/file/location.ext'); $response = $responder->raw();
有关更多详细信息,您可以在此处查看在线文档。
项目状态与发布流程
虽然这个库仍在开发中,但它经过充分测试,应该足够稳定,可以在生产环境中使用。
当前版本号格式为0.x.y。当引入非破坏性更改(添加新方法、优化现有代码等)时,y值增加。
当引入破坏性更改时,总是开始一个新的0.x版本周期。
因此,将您的项目锁定到特定的版本周期,如0.2.*,是安全的。
如果您需要升级到新的版本周期,请检查发布历史,以了解每个进一步0.x.0版本引入的更改列表。
社区
我们还没有社区频道。如果您想帮忙,请告诉我!
贡献
阅读贡献指南以了解您如何为Legatus做出贡献。
安全问题
请通过电子邮件私下报告安全问题,并在披露之前给我们一段宽限期。
关于Legatus
Legatus是由Matías Navarro Carter领导的一个个人开源项目,由贡献者开发。