diff --git a/src/Appwrite/Auth/OAuth2/Gitea.php b/src/Appwrite/Auth/OAuth2/Gitea.php index 57467130aa..390189fc72 100644 --- a/src/Appwrite/Auth/OAuth2/Gitea.php +++ b/src/Appwrite/Auth/OAuth2/Gitea.php @@ -3,9 +3,8 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Appwrite\Vcs\RepositoryOAuth2; -class Gitea extends OAuth2 implements RepositoryOAuth2 +class Gitea extends OAuth2 { protected string $endpoint = ''; diff --git a/src/Appwrite/Auth/OAuth2/Github.php b/src/Appwrite/Auth/OAuth2/Github.php index 71a52d2604..f80c067daa 100644 --- a/src/Appwrite/Auth/OAuth2/Github.php +++ b/src/Appwrite/Auth/OAuth2/Github.php @@ -3,10 +3,9 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Appwrite\Vcs\RepositoryOAuth2; use Utopia\Fetch\Client as FetchClient; -class Github extends OAuth2 implements RepositoryOAuth2 +class Github extends OAuth2 { /** * @var array diff --git a/src/Appwrite/Auth/OAuth2/Gitlab.php b/src/Appwrite/Auth/OAuth2/Gitlab.php index bc34e69a28..fb6244bb52 100644 --- a/src/Appwrite/Auth/OAuth2/Gitlab.php +++ b/src/Appwrite/Auth/OAuth2/Gitlab.php @@ -3,7 +3,6 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Appwrite\Vcs\RepositoryOAuth2; // Reference Material // https://docs.gitlab.com/ee/api/oauth2.html @@ -15,7 +14,7 @@ use Appwrite\Vcs\RepositoryOAuth2; * only supports official gitlab.com, but still encodes to that same JSON * shape so getAppSecret()/getEndpoint() stay correct for both consumers. */ -class Gitlab extends OAuth2 implements RepositoryOAuth2 +class Gitlab extends OAuth2 { /** * @var array diff --git a/src/Appwrite/Platform/Modules/VCS/Http/Installations/Repositories/Create.php b/src/Appwrite/Platform/Modules/VCS/Http/Installations/Repositories/Create.php index 28db0f1b4a..1277f44373 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/Installations/Repositories/Create.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/Installations/Repositories/Create.php @@ -10,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Appwrite\Vcs\Factory as VcsFactory; use Appwrite\Vcs\InstallationTokens; -use Appwrite\Vcs\RepositoryOAuth2; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Query; @@ -81,7 +80,7 @@ class Create extends Action if ($installation->getAttribute('personal', false) === true) { $oauth2 = $vcsFactory->oauth2FromProvider($provider); - if (!$oauth2 instanceof RepositoryOAuth2) { + if (!\method_exists($oauth2, 'createRepository')) { throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'VCS provider does not support repository creation: ' . $provider); } diff --git a/src/Appwrite/Vcs/RepositoryOAuth2.php b/src/Appwrite/Vcs/RepositoryOAuth2.php deleted file mode 100644 index 6923275bb0..0000000000 --- a/src/Appwrite/Vcs/RepositoryOAuth2.php +++ /dev/null @@ -1,14 +0,0 @@ -