Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hcelebi/gitlab-php-client
Gitlab PHP Client
https://github.com/hcelebi/gitlab-php-client
gitlab gitlab-api
Last synced: 1 day ago
JSON representation
Gitlab PHP Client
- Host: GitHub
- URL: https://github.com/hcelebi/gitlab-php-client
- Owner: hcelebi
- Created: 2022-06-28T08:25:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-28T13:08:20.000Z (over 2 years ago)
- Last Synced: 2024-04-10T06:21:48.705Z (10 months ago)
- Topics: gitlab, gitlab-api
- Language: PHP
- Homepage: https://packagist.org/packages/hcelebi/gitlab-php-client
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Gitlab Api Php Client
===============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");
```