Skip to content

Commit

Permalink
Revert "Add method to retrieve all members from projects (including i…
Browse files Browse the repository at this point in the history
…nherited)"

This reverts commit 553fab6.
  • Loading branch information
m1guelpf committed Apr 15, 2019
1 parent 8636d7d commit 35c1719
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 49 deletions.
35 changes: 2 additions & 33 deletions lib/Gitlab/Api/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,37 +305,6 @@ public function members($project_id, $parameters = [])
return $this->get($this->getProjectPath($project_id, 'members'), $resolver->resolve($parameters));
}

/**
* @param int $project_id
* @param array $parameters (
*
* @var string $query The query you want to search members for.
* )
*
* @throws MissingOptionsException If a required option is not provided
*
* @return mixed
*/
public function membersAll($project_id, $parameters = [])
{
if (!is_array($parameters)) {
@trigger_error("Deprecated: String parameter of the members() function is deprecated.", E_USER_NOTICE);
$username_query = $parameters;
$parameters = array();
if (!empty($username_query)) {
$parameters['query'] = $username_query;
}
}

$resolver = $this->createOptionsResolver();

$resolver->setDefined('query')
->setAllowedTypes('query', 'string')
;

return $this->get($this->getProjectPath($project_id, 'members/all'), $resolver->resolve($parameters));
}

/**
* @param int $project_id
* @param int $user_id
Expand Down Expand Up @@ -811,7 +780,7 @@ public function deployment($project_id, $deployment_id)
{
return $this->get($this->getProjectPath($project_id, 'deployments/'.$this->encodePath($deployment_id)));
}

/**
* @param mixed $project_id
* @param array $parameters
Expand Down Expand Up @@ -839,7 +808,7 @@ public function addShare($project_id, array $parameters = [])

return $this->post($this->getProjectPath($project_id, 'share'), $resolver->resolve($parameters));
}

/**
* @param mixed $project_id
* @param int $group_id
Expand Down
16 changes: 0 additions & 16 deletions lib/Gitlab/Model/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,6 @@ public function members($username_query = null)
return $members;
}

/**
* @param string $username_query
* @return User[]
*/
public function membersAll($username_query = null)
{
$data = $this->client->projects()->membersAll($this->id, $username_query);

$members = array();
foreach ($data as $member) {
$members[] = User::fromArray($this->getClient(), $member);
}

return $members;
}

/**
* @param int $user_id
* @return User
Expand Down

0 comments on commit 35c1719

Please sign in to comment.