kdyby / github Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] Use https://github.com/thephpleague/oauth2-github instead
License: Other
[DEPRECATED] Use https://github.com/thephpleague/oauth2-github instead
License: Other
I'm getting this notice:
PHP Notice: Use of undefined constant CURLE_SSL_CACERT_BADFILE - assumed 'CURLE_SSL_CACERT_BADFILE' in /var/www/.../vendor/kdyby/github/src/Kdyby/Github/Api/CurlClient.php:151
PHP 5.4.4
Not sure if it has any impact on anything (extension works), but thought you should know... :) The code was added in #1...
When trying to create a hook:
return $this->github->api('/repos/:owner/:repo/hooks', Api\Request::POST, [], [
'name' => 'web',
'active' => '1',
'events' => [
'push',
'pull_request'
],
'config' => [
'url' => 'http://example.net/some/url',
'content-type' => 'json'
]
]);
Github responds with "Problems parsing JSON". The problem appears to be here. It properly encodes values as JSON, but leaves the whole array as array. So when it is pased to CURL, it encodes it again, and messes up (doble escapes) the values.
EDIT: Just to clarify, when that line is replaced by simple $this->post = Json::encode($post);
, it works, for this example. Not sure why the whole logic about UrlScript or CURLFile is there though. Probably for a reason, so it's probably not a good solution.
EDIT2: Now that I look at it, when you pass the encoded JSON string as a post parameter, it works fine. Which is probably how you're supposed to use it. Oh well, it was late last night when I wrote this :) Anyway, the issue is still relevant, because the behaviour I described is certainly not what I expected. But maybe just a clarifying docs would do the trick?...
Hello everyone.
We're looking for a new maintainer for this repository. If you're using it in your project, I offer you to take over this repository.
It would be a great help for everyone and IMHO it's better than to maintain a fork :)
Otherwise, It will be marked as abadoned on packagist in a week or so.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.