PHPackages                             rabhisalem/jira-api-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rabhisalem/jira-api-bundle

ActiveSymfony-bundle[API Development](/categories/api)

rabhisalem/jira-api-bundle
==========================

Jira REST API integration in Symfony2.

03PHP

Since Feb 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rebhisalem/JiraApiBundle)[ Packagist](https://packagist.org/packages/rabhisalem/jira-api-bundle)[ RSS](/packages/rabhisalem-jira-api-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

JiraApiBundle
=============

[](#jiraapibundle)

Master: [![Build Status](https://camo.githubusercontent.com/7d9c6c9856c99b90253314b901551b53b3eb5559fcabc1f8aab85f8fe31b13aa/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4d656469636f72654e4c2f4a69726141706942756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/MedicoreNL/JiraApiBundle)

A [Symfony2](http://symfony.com) bundle that integrates the [Jira](https://www.atlassian.com/software/jira/overview) [REST API](https://developer.atlassian.com/jira/docs/latest/reference/rest-api.html) into native Symfony2 services.

Installation
------------

[](#installation)

1. Install [Composer](https://getcomposer.org).

    ```
    # Install Composer
    curl -sS https://getcomposer.org/installer | php
    ```
2. Add this bundle to the `composer.json` file of your project.

    ```
    # Add JiraApiBundle as a dependency
    php composer.phar require medicorenl/jira-api-bundle dev-master
    ```
3. After installing, you need to require Composer's autloader in the bootstrap of your project.

    ```
    // app/autoload.php
    $loader = require __DIR__ . '/../vendor/autoload.php';
    ```
4. Add the bundle to your application kernel.

    ```
    // app/AppKernel.php
    public function registerBundles()
    {
        return array(
            // ...
            new JiraApiBundle\JiraApiBundle(),
            // ...
        );
    }
    ```
5. Configure the bundle by adding parameters to the `config.yml` file:

    ```
    # app/config/config.yml
        jira_api:
            url:         "http://jira.your-organisation.com/jira/rest/api/latest/"
            credentials: "username:password"
    ```

Usage
-----

[](#usage)

This bundle contains a number of services, to access them through the service container:

```
// Get a particulair Jira issue from the JiraApiBundle\Service\IssueService
$issueService = $this->get('jira_api.issue');
$issueService->get('STORY-KEY');

// Get all issues by a project in the JiraApiBundle\Service\ProjectService
$projectService = $this->get('jira_api.project');
$projectService->getAll();

// Search for a issue in the JiraApiBundle\Service\SearchService
$searchService = $this->get('jira_api.search');
$searchService->search(
    array(
        'jql' => 'assignee=fred+order+by+duedate',
    )
);
```

You can also add them to the service container of your own bundle:

```
