You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
working with the current set of http clients and packages, as described in the readme is a real pain and requires some advanced composer style fu to get right.
I would love to use symfony/http-client with this api, but its not possible because of the long list of psr and/or http related additional requirements in the composer.json
I am not that experienced with all this psr/http related stuff, but had the hope that this could somehow be simplified. does the github-api really need all this dependencies?
or should symfony/http-client provide more stuff, so it can be used in combination with this package?
I think the complexity you consider a pain comes from the usage of PSR-17 and PSR-18 which are very powerful and provide great interoperability at the cost of being harder to work with.
does the github-api really need all this dependencies?
The GitHub API project focuses on implementing the right calls and structures that mirror the GitHub API design, and lets you choose whatever http implementation you want (provided it complies with PSR-17 and PSR-18). So, yes, you need these dependencies because the project itself has no HTTP client 😄 . The project php-github-api can plug itself on a HTTP client though.
I agree the first time, it's very unfriendly 😉 and can be unwelcoming.
I think the complexity you consider a pain comes from the usage of PSR-17 and PSR-18 which are very powerful and provide great interoperability at the cost of being harder to work with.
seems to provide all the necessary packages, is there an issue with this?
from a end-user-perspective it would be easiest to use a single package instead of 2.
I am updating from php-github-api 2.x for which even more packages were required (because of guzzle6).
thats the point where it would be easier to have a single package, instead of all this cruft around it.
thanks for your interesst in getting my problem solved. I will get this sorted somehow.
my actual request was about the question whether things have to be that complex, or whether there is room for improvement to get things done more easily
Activity
matks commentedon Apr 20, 2021
Hi @clxmstaab I just saw your tweet.
I think the complexity you consider a pain comes from the usage of PSR-17 and PSR-18 which are very powerful and provide great interoperability at the cost of being harder to work with.
The GitHub API project focuses on implementing the right calls and structures that mirror the GitHub API design, and lets you choose whatever http implementation you want (provided it complies with PSR-17 and PSR-18). So, yes, you need these dependencies because the project itself has no HTTP client 😄 . The project php-github-api can plug itself on a HTTP client though.
I agree the first time, it's very unfriendly 😉 and can be unwelcoming.
The CLI
seems to provide all the necessary packages, is there an issue with this?
Note: I'm just a user of this library, not a maintainer, so I hope I said nothing inaccurate
clxmstaab commentedon Apr 20, 2021
thx for your support.
agree.
its gettin even more complex, when you need to e.g. combine KnpLabs/php-github-api with e.g. https://github.com/lesstif/php-jira-rest-client and a few other http based packages.
from a end-user-perspective it would be easiest to use a single package instead of 2.
I am updating from php-github-api 2.x for which even more packages were required (because of guzzle6).
matks commentedon Apr 20, 2021
For php-github-api v2 and Guzzle6, I found a very useful package https://github.com/php-http/guzzle6-adapter
So the following set of constraints can be resolved
clxmstaab commentedon Apr 20, 2021
yep, this is what we have atm in production.
I am in the process of combining it with https://github.com/phpro/soap-client and https://github.com/lesstif/php-jira-rest-client and https://github.com/cloudflare/cloudflare-php
thats the point where it would be easier to have a single package, instead of all this cruft around it.
thanks for your interesst in getting my problem solved. I will get this sorted somehow.
my actual request was about the question whether things have to be that complex, or whether there is room for improvement to get things done more easily
acrobat commentedon Apr 21, 2021
Because we depend on httplug/psr-18 it is possibly to use the symfony/http-client for this.
To setup the library with the symfony http client, execute this composer req
composer require knplabs/github-api:^3.0 symfony/http-client nyholm/psr7The
nyholm/psr7package is needed as per symfony docsWhen composer in done installing the package, you can use the symfony client with this library by specifying the client into our builder class
But I understand the "over complex" feeling with all the psr's and the glue packages needed
minor #1002 Update readme and add example for different http client u…