KnpLabs / KnpLabs/php-github-api

RequestInterface shows invalid URI

Aberta
#611 2 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
PHP
Estrelas
2.2k
Forks
587
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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"
]
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
php
Domínio
api
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.