X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2Fbootstrap%2Fgithub.php;h=e03cba099fd16717fe1c4b09911e2c5be263e1ae;hb=5c1a4c8a5d83ea925f17c94e5ab996b92e31e240;hp=e0defa7bc5482da1f53c647431470e25e1e43eca;hpb=b9ea42b0b88f4976327ed03a1e4abb9b34248b7a;p=pharext%2Fpharext.org diff --git a/app/bootstrap/github.php b/app/bootstrap/github.php index e0defa7..e03cba0 100644 --- a/app/bootstrap/github.php +++ b/app/bootstrap/github.php @@ -16,19 +16,18 @@ $injector->share(Github\API::class) $config->$basic->auth->toArray(), 0); } + $logger = new Github\Logger($config); + // FIXME: configure through app.ini try { $cache = new Github\Storage\Redis("gh-cache"); } catch (\Exception $ex) { - try { - $cache = new Github\Storage\Memcache("gh-cache"); - } catch (\Exception $ex) { - $cache = null; - } + /* Memcached won't throw an exception */ + $cache = new Github\Storage\Memcache("gh-cache"); } return new Github\API( $config->github - ,new Github\Logger($config) + ,$logger ,new Github\Storage\Session("gh-tokens") ,$cache );