cast URL to string
[pharext/pharext.org] / app / Github / API.php
index 493984dbc037f76220c556e109fa6618d49335bb..bddd1672789b7d9b467dc0d6598ddea6982afa1b 100644 (file)
@@ -133,7 +133,7 @@ class API
                        "state" => $state,
                        "client_id" => $this->config->client->id,
                        "scope" => $this->config->client->scope,
-                       "redirect_uri" => $callback_url,
+                       "redirect_uri" => (string) $callback_url,
                ];
                return new Url("https://github.com/login/oauth/authorize", [
                        "query" => new QueryString($param)
@@ -264,7 +264,7 @@ class API
                                $repo->name, 
                                $config ?: (array) $this->checkRepoHook($repo)->config
                        );
-                       $name = sprintf("%s-%s.ext.phar", $repo->name, $release->tag_name);
+                       $name = $phar->build();
                        $url = uri_template($release->upload_url, compact("name"));
                        $promise = $this->createReleaseAsset($url, $phar, "application/phar");
                        if ($release->draft) {