KnpLabs / KnpLabs/php-github-api

RequestInterface shows invalid URI

Đang mở
#611 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
PHP
Star
2.2k
Fork
587
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm, always getting the `"Not found"` error on my api calls. Tried investigating and found this on the $request passed to the `RequestInterface::sendRequest()` method:

```
Request {#346 ▼
-method: "GET"
-requestTarget: null
-uri: Uri {#347 ▼
-scheme: ""
-userInfo: ""
-host: ""
-port: null
-path: "/user/repos"
-query: "type=owner&sort=full_name&direction=asc"
-fragment: ""
}
-headers: []
-headerNames: []
-protocol: "1.1"
-stream: null
}
```

Seems like the `path` parameter is missing some parameters even though $`github->currentUser()->show()` shows a complete response:

```
array:30 [▼
"login" => "myusername"
"id" => xxxxxxxxx
"avatar_url" => "https://avatars2.githubusercontent.com/u/xxxxxxxxx?v=3"
"gravatar_id" => ""
"url" => "https://api.github.com/users/myusername"
"html_url" => "https://github.com/myusername"
"followers_url" => "https://api.github.com/users/myusername/followers"
"following_url" => "https://api.github.com/users/myusername/following{/other_user}"
"gists_url" => "https://api.github.com/users/myusername/gists{/gist_id}"
"starred_url" => "https://api.github.com/users/myusername/starred{/owner}{/repo}"
"subscriptions_url" => "https://api.github.com/users/myusername/subscriptions"
"organizations_url" => "https://api.github.com/users/myusername/orgs"
"repos_url" => "https://api.github.com/users/myusername/repos"
"events_url" => "https://api.github.com/users/myusername/events{/privacy}"
"received_events_url" => "https://api.github.com/users/myusername/received_events"
"type" => "User"
"site_admin" => false
"name" => "My Name"
"company" => null
"blog" => "http://www.myusername.com"
"location" => null
"email" => "myusername@gmail.com"
"hireable" => true
"bio" => null
"public_repos" => 4
"public_gists" => 0
"followers" => 0
"following" => 0
"created_at" => "2013-03-05T03:52:44Z"
"updated_at" => "2017-06-28T06:59:13Z"
]
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start at RequestInterface::sendRequest() and inspect how the Request and Uri values shown in the report are assembled for the user-repositories call. Reproduce the API request and compare the resulting URI with the endpoint represented by the current-user response; done means the request no longer produces the reported "Not found" error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
php
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.