KnpLabs / KnpLabs/php-github-api
Add ability to change default host
- 主要語言
- PHP
- 星號
- 2.2k
- 分支
- 587
- PR 合併指標
- 30 天內沒有已合併 PR
描述
For the testing purposes I need to change `https://api.github.com` host to the mock API url, but there is no way to do it. All auto-tests should go to the mock service, instead of real GitHub.
We can use enterprise url as a workaround, but it looks like a wrong path.
I see 3 ways to implement this feature:
1. Check in `Github\Client::__construct` method if `AddHostPlugin` already defined, and skip it's definition in this case. Set enterprise URL will require the same check.
2. Add method to change host plugin manually in `Github\Client` object.
3. Make `Github\Client::getHttpClientBuilder` public.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 Github\Client::__construct 和 Github\Client::getHttpClientBuilder 開始,然後檢查 AddHostPlugin 和企業版 URL 的設定方式。確定呼叫方如何設定模擬主機而不向真實的 Github 傳送請求,並驗證用戶端的請求使用已設定的主機。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- php
- 領域
- api
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100