2017 © Pedro Peláez
 

symfony-bundle gitlabapibundle

Symfony2 Bundle to include the gitlab api.

image

zeichen32/gitlabapibundle

Symfony2 Bundle to include the gitlab api.

  • Thursday, May 24, 2018
  • by Zeichen32
  • Repository
  • 3 Watchers
  • 32 Stars
  • 28,994 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 6 Forks
  • 0 Open issues
  • 14 Versions
  • 13 % Grown

The README.md

Getting Started With Zeichen32GitLabApiBundle

This Bundle integrates the GitLab PHP API Client into your Symfony Project., (*1)

Step 1: Install Zeichen32GitLabApiBundle

The preferred way to install this bundle is to rely on Composer., (*2)

``` js { "require": { // ... "guzzlehttp/guzzle:^7.0.1", // Optional PSR Client, if you dont want to use the symfony http client "zeichen32/gitlabapibundle": "~6.1" } }, (*3)


### Step 2: Enable the bundle Finally, enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Zeichen32\GitLabApiBundle\Zeichen32GitLabApiBundle(), ); }

Step 3: Configure Zeichen32GitLabApiBundle

Add Zeichen32GitLabApiBundle settings in app/config/config.yml:, (*4)

``` yaml zeichen32_git_lab_api: clients: firstclient: token: your-api-token url: http://example.org/api/v3/ auth_method: http_token secondclient: token: your-api-token url: http://example.org/api/v3/ auth_method: oauth_token sudo: 1 thirdclient: token: your-api-token url: http://example.org/api/v3/ alias: custom_alias, (*5)


The first client automatically defined as your default client. ### Step 4: Use the gitlab api If you want to use the default client you can use type hinting. ``` php <?php namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Gitlab\Client; class DefaultController extends AbstractController { public function index(Client $client) { $issues = $client->api('issues')->all($project_id); } }

If you want to get one of the other clients, you can get the specific client by the "zeichen32_gitlabapi.client.CLIENT_NAME" service id., (*6)

``` yaml services: App\Controller\DefaultController: arguments: {$client: '@zeichen32_gitlabapi.client.default'}, (*7)

``` php
<?php
namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Gitlab\Client;

class DefaultController extends AbstractController {
    private $client;

    public __construct(Client $client) {
        $this->client = $client;
    }

    public function index() {
        $issues = $this->client->api('issues')->all($project_id);
    }
}

Or if you set alias option:, (*8)

``` yaml services: App\Controller\DefaultController: arguments: {$client: '@custom_alias'}, (*9)


For more information about using the api, take a look at the [GitLab Client Documentation](https://github.com/GitLabPHP/Client). ### Step 5: Configuration Reference All available configuration options with their default values listed below: ``` yaml zeichen32_git_lab_api: clients: # Required token: ~ # Required url: ~ # Required auth_method: ~ http_token|oauth_token sudo: ~ alias: ~ http_client: ~ # http client service id

License

This bundle is under the MIT license. See the complete license in the bundle:, (*10)

Resources/meta/LICENSE

The Versions

24/05 2018
28/01 2018

dev-symfony4-compatibility

dev-symfony4-compatibility https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

The Development Requires

api gitlab

17/10 2017
16/12 2015

v2.1.3

2.1.3.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

The Development Requires

api gitlab

07/03 2015

v2.1.2

2.1.2.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

The Development Requires

api gitlab

07/03 2015

v2.1.1

2.1.1.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

The Development Requires

api gitlab

06/03 2015

v2.1.0

2.1.0.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

The Development Requires

api gitlab

25/01 2014

v2.0.0

2.0.0.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api.

  Sources   Download

MIT

The Requires

 

api gitlab

21/06 2013

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api and the gitlab issue tracker in your app.

  Sources   Download

MIT

The Requires

 

by Avatar Zeichen32

api gitlab issue issuetracker

03/06 2013

0.1.2

0.1.2.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api and the gitlab issue tracker in your app.

  Sources   Download

MIT

The Requires

 

api gitlab issue issuetracker

28/02 2013

0.1.1

0.1.1.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include the gitlab api and the gitlab issue tracker in your app.

  Sources   Download

MIT

The Requires

 

api gitlab issue issuetracker

25/02 2013

0.1.0

0.1.0.0 https://github.com/Zeichen32/GitLabApiBundle

Symfony2 Bundle to include gitlab issue tracker in your app.

  Sources   Download

MIT

The Requires

 

api gitlab issue