Closed SMillerDev closed 3 years ago
@SMillerDev, Thanks for your PR 👍.
Which other implementations except CURL are possible?
Currently none, but people could extend this work to make the client compatible with their library of choice.
I renamed the commit to comply with the semantic messages but that seems to have broken the check.
It looks like problem with CircleCI webhooks. Could you try:
sign out of Github in the browser, sign out of CircleCI, then log back into CircleCI via Github.
I've never logged into CircleCI so I can't really try that. But I do see checks show up now.
I've never logged into CircleCI so I can't really try that. But I do see checks show up now.
Yeah, but build isn't triggered. I have to figure out why.
Service Under Maintenance
All but the nightly check pass now, but I don't think that one is because of my changes.
All but the nightly check pass now, but I don't think that one is because of my changes.
Could you please rebase your sources with master? The #71 contains fix for nightly build.
Ah yes, everything is green now.
@SMillerDev, do you want to continue with this PR?
Yeah, I'm still committed to finishing this. Just haven't found any time to work on it along my daily work.
Thanks for info, let's keep this waiting for you 😄
Okay, I found some time I just have no idea how the Test parameters work. I was thinking of something like this
public function setUp($url = "http://localhost:8086", $logFile = "php://output", $guzzle=true): void
But I can't find any documentation on how it's supposed to work/be triggered.
@SMillerDev, tests depends on the running InfluxDB, so you can use something like:
# start InfluxDB (requires `docker`)
make start-server
# start tests
composer run test
Just to clarify, I'm wondering how to pass/change these parameters to the setUp function. Because if that's possible I think I just make it run twice, once with Guzzle and once with cURL.
You can use system env:
public function setUp($url = "http://localhost:8086", $logFile = "php://output"): void
{
// Initialize HTTP API via sys env
switch ($_ENV['CLIENT_HTTP_API'] ?? 'Guzzle') {
case "Guzzle":
...
case "Curl":
...
}
...
}
and then update CircleCI configuration to: config.yml.zip.
Unfortunately, I don't know of a better solution... 😞
This PR has been closed because it has not had recent activity. Please reopen if this PR is still important to you and you want to continue with them.
Hi @SMillerDev,
We are preparing a new major version of the client (v3.0.0
) which add supports for custom HTTP clients. Please try the preview version by:
composer require influxdata/influxdb-client-php:generic-http-client
For more info about new major version see:
Regards
Thanks for the ping and all the work @bednar . I'll give it a try later.
Proposed Changes
This changes the setup of the create/write/health API classes so that the API does not strictly depend on the implementation detail that is the Guzzle client. As an example the CurlApi classes are added that I will extend in this or a future PR.
Checklist
make test
completes successfully