hcelebi / gitlab-php-client
PHP Client For GitLab API
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/hcelebi/gitlab-php-client
Requires
- guzzlehttp/guzzle: ~6.0
- monolog/monolog: ^1.24
- slim/slim: ^3.12
Requires (Dev)
- phpunit/phpunit: 7.5.*
This package is not auto-updated.
Last update: 2025-12-11 05:00:21 UTC
README
Installation
The prefered way to install this client
php composer.phar require hcelebi/gitlab-php-client
or
composer require hcelebi/gitlab-php-client
Configuration
Dependency injection is exist in project, add these factories to configuration.
GitLabClientFactory.php
BranchServiceFactory.php
Dependency injection doesn't exist in project, add this code block to application entry point
$container = new Container();
GitLabClientFactory::createService($container);
BranchServiceFactory::createService($container);
Usage
Get master branch from specific gitlab project
/** @var BranchService $branchService */
$branchService = $container->get(BranchService::class);
$projectId = 37129493;
$branch = $branchService->getBranch(37129493, "master");