承接 gpn273/laravel-psr18-http-bridge 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gpn273/laravel-psr18-http-bridge

最新稳定版本:0.1.0

Composer 安装命令:

composer require gpn273/laravel-psr18-http-bridge

包简介

Laravel PSR-18 HTTP Client Bridge

README 文档

README

This package provides a bridge between the Laravel HTTP Client and PSR-18, allowing developers to use the Laravel HTTP Client as a PSR-18 compliant HTTP client in their PHP projects.

Installation

You can install the package via composer:

composer require gpn273/laravel-psr18-http-bridge

Usage

The Psr18Client class accepts a Closure which must return a Illuminate\Http\Client\PendingRequest. This would be where you would initially set up your Laravel HTTP Client.

use Gpn273\LaravelPsr18HttpBridge\Psr18Client;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Support\Facades\Http;

$client = new Psr18Client(function (): PendingRequest {
    return Http::timeout(10)
        ->connectTimeout(3)
        ->acceptJson();
});

Conclusion

This package makes it easy to use the Laravel HTTP Client in any PHP project that adheres to the PSR-18 standard. It provides a seamless and powerful way for developers to use Laravel's HTTP Client in a PSR-18 compatible way, allowing for more flexibility and reusability.

Bug Reporting and Suggestions

If you find any bugs or have any suggestions for improvements, please open an issue on the GitHub repository or submit a pull request. Your feedback is greatly appreciated and will help us improve the package.

Contributing Guide

  1. Bug Reports: Before submitting a bug report, please perform a search in the issue tracker to make sure the issue has not already been reported. If a similar issue exists, please add a comment to the existing issue instead of creating a new one. If the issue is a new one, please provide a clear and concise description of the problem, including steps to reproduce the issue, and the expected behavior. Also, it would be helpful if you include the version of the package you are using, and the version of PHP.

  2. Feature Requests: Before submitting a feature request, please perform a search in the issue tracker to make sure the request has not already been made. If a similar request exists, please add a comment to the existing request instead of creating a new one. If the request is a new one, please provide a clear and concise description of the proposed feature, including the problem it solves, and any relevant use cases.

  3. Code Changes: Before submitting a code change, please create a fork of the repository and make the changes in your fork. Then, submit a pull request to the main repository. Please make sure that your code adheres to the PSR-2 coding standard and includes appropriate test coverage. Also, please include a clear and concise description of the changes you have made and the problem they solve.

  4. Communication: All contributors should communicate in a respectful and professional manner, regardless of the medium (issues, pull requests, email, etc.).

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固