Skip to content

Commit be597ac

Browse files
author
Matt Humphrey
committed
Removed user teams functionality and explained new versioning
1 parent 28b538e commit be597ac

File tree

6 files changed

+6
-213
lines changed

6 files changed

+6
-213
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ curl -sS https://getcomposer.org/installer | php
1212
$ sudo mv composer.phar /usr/local/bin/composer
1313
```
1414

15-
Add the following to your require block in composer.json config:
15+
Add the following to your require block in composer.json config. Note: be careful when using the `dev-master` tag as this may have unexpected results depending on your version of Gitlab. See the Versioning section below for more information.
1616

1717
```
1818
"m4tthumphrey/php-gitlab-api": "dev-master"
@@ -25,6 +25,11 @@ Include Composer's autoloader:
2525
require_once dirname(__DIR__).'/vendor/autoload.php';
2626
```
2727

28+
Versioning
29+
----------
30+
31+
From the 6.0 stable release of Gitlab, I shall now be matching the client version with the Gitlab version. For example when Gitlab 6.1 is released I will release version 6.1.0 of the API client. If I need to make future updates to the client before the next API version is released. I will simply use a 3th build version. For example `6.1.1`, `6.1.2` etc. It is recommended that you keep your composer file up to date depending on what version of Gitlab you are currently running. So if you are using 6.0, you should required `6.0.*`; 6.1 should be `6.1.*` etc etc.
32+
2833
General API Usage
2934
-----------------
3035

lib/Gitlab/Api/Teams.php

Lines changed: 0 additions & 70 deletions
This file was deleted.

lib/Gitlab/Client.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ public function api($name)
106106
$api = new Api\SystemHooks($this);
107107
break;
108108

109-
case 'teams':
110-
case 'user_teams':
111-
$api = new Api\Teams($this);
112-
break;
113-
114109
default:
115110
throw new InvalidArgumentException();
116111
}

lib/Gitlab/Model/Project.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,6 @@ public function removeMember($user_id)
105105
return true;
106106
}
107107

108-
public function addToTeam($team_id, $greatest_access_level)
109-
{
110-
$team = new Team($team_id, $this->getClient());
111-
112-
return $team->addProject($this->id, $greatest_access_level);
113-
}
114-
115-
public function removeFromTeam($team_id)
116-
{
117-
$team = new Team($team_id, $this->getClient());
118-
119-
return $team->removeProject($this->id);
120-
}
121-
122108
public function hooks($page = 1, $per_page = Api::PER_PAGE)
123109
{
124110
$data = $this->api('projects')->hooks($this->id, $page, $per_page);

lib/Gitlab/Model/Team.php

Lines changed: 0 additions & 109 deletions
This file was deleted.

lib/Gitlab/Model/User.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,4 @@ public function removeKey($id)
8484
return true;
8585
}
8686

87-
public function addToTeam($team_id, $access_level)
88-
{
89-
$team = new Team($team_id, $this->getClient());
90-
91-
return $team->addMember($this->id, $access_level);
92-
}
93-
94-
public function removeFromTeam($team_id)
95-
{
96-
$team = new Team($team_id, $this->getClient());
97-
98-
return $team->removeMember($this->id);
99-
}
100-
10187
}

0 commit comments

Comments
 (0)