nicolasguilloux/wiremock-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require nicolasguilloux/wiremock-bundle
包简介
A Symfony bundle to quickly mock Http Clients using Wiremock.
README 文档
README
A Symfony bundle to quickly mock Http Clients using Wiremock. The way it works is by decorating the Symfony HttpClient. It checks if Wiremock has a stub for the request and if it does, it returns the stubbed response. If not, it forwards the request to the original http client as usual.
Table of content
1. Installation
Execute the composer command to install the bundle:
composer require nicolasguilloux/wiremock-bundle --dev
2. Documentation
2.1. Configuration
Here is an example of a configuration with the Wiremock http client:
framework: http_client: scoped_clients: wiremock.client: base_uri: 'http://localhost:8080' wiremock: # Set the Wiremock http client (default: wiremock.client) # http_client: 'wiremock.client' # Removes the Wiremock http client from the HttpClient profiler page (default: false) # remove_from_http_client_profiler: true # Decorates by default all clients except the following ones (default: []) # blacklist_clients: [] # Decorates only the following http client (default: []) # whitelist_clients: []
2.2. Profiler
A new tab is available in the Symfony profiler to see the Wiremock http calls. This might be helpful to see if a request has been used to stub a response or not.
3. Versioning
wiremock-bundle follows semantic versioning. In short the scheme is MAJOR.MINOR.PATCH where 1. MAJOR is bumped when there is a breaking change, 2. MINOR is bumped when a new feature is added in a backward-compatible way, 3. PATCH is bumped when a bug is fixed in a backward-compatible way.
Versions bellow 1.0.0 are considered experimental and breaking changes may occur at any time.
4. Contributing
Contributions are welcomed! There are many ways to contribute, and we appreciate all of them. Here are some of the major ones:
-
Bug Reports: While we strive for quality software, bugs can happen, and we can’t fix issues we’re not aware of. So please report even if you’re not sure about it or just want to ask a question. If anything the issue might indicate that the documentation can still be improved!
-
Feature Request: You have a use case not covered by the current api? Want to suggest a change or add something? We’d be glad to read about it and start a discussion to try to find the best possible solution.
-
Pull Request: Want to contribute code or documentation? We’d love that! If you need help to get started, GitHub as documentation on pull requests. We use the "fork and pull model" were contributors push changes to their personal fork and then create pull requests to the main repository. Please make your pull requests against the
masterbranch.
As a reminder, all contributors are expected to follow our Code of Conduct.
5. License
wiremock-bundle is distributed under the terms of the MIT license.
See LICENSE for details.
6. Hacking
Nix and devenv are here to help you install the software dependencies.
With the two tools installed, you can simply enter a working shell: devenv shell.
nicolasguilloux/wiremock-bundle 适用场景与选型建议
nicolasguilloux/wiremock-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.52k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 07 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nicolasguilloux/wiremock-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nicolasguilloux/wiremock-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-24