add logging; fix caching
[pharext/pharext.org] / app / bootstrap / github.php
index fe3477f4d027ea6c607e9fdd150fc50d18ea2bcd..30bd96d88727decc1a97de18e7eafa77396e2925 100644 (file)
@@ -4,7 +4,6 @@ namespace app;
 
 require_once __DIR__."/config.php";
 
-use merry\Config;
 use http\Url;
 
 $injector->share(Github\API::class)
@@ -17,10 +16,13 @@ $injector->share(Github\API::class)
                                $config->$basic->auth->toArray(),
                                0);
                }
+               // FIXME: configure through app.ini
                return new Github\API(
-                       $config->github
-                  ,new Github\Storage\Session("gh-tokens")
+                        $config->github
+                       ,new Github\Logger($config)
+                       ,new Github\Storage\Session("gh-tokens")
                   #,new Github\Storage\Memcache("gh-cache")
+                       ,new Github\Storage\Redis("gh-cache")
           );
        });