There is no license information available for the latest version (dev-master) of this package.

Jira REST API integration in Symfony2.

Installs: 2 918

Dependents: 0

Suggesters: 0

Security: 0

Stars: 18

Watchers: 7

Forks: 23

Open Issues: 5


dev-master 2017-01-20 11:30 UTC

This package is not auto-updated.

Last update: 2021-04-30 21:33:55 UTC


Master: Build Status

A Symfony2 bundle that integrates the Jira REST API into native Symfony2 services.


  1. Install Composer.

    # Install Composer
    curl -sS | 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
            url:         ""
            credentials: "username:password"


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');

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

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

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

<!-- src/Project/Bundle/Resources/config/services.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns=""
        <service id="myproject.myservice" class="MyProject\MyBundle\Services\MyService.php" public="true">
            <argument type="service" id="jira_api.issue" />
            <argument type="service" id="jira_api.project" />
            <argument type="service" id="" />

You can then use them in your own services


namespace Project\Bundle\Services;

use JiraApiBundle\Service\IssueService;
use JiraApiBundle\Service\ProjectService;
use JiraApiBundle\Service\SearchService;

 * Service class for my bundle.
class MyService
     * @var \JiraApiBundle\Service\IssueService
    private $issueService;

     * @var \JiraApiBundle\Service\ProjectService
    private $projectService;

     * @var \JiraApiBundle\Service\SearchService
    private $searchService;

     * Constructor.
     * @param \JiraApiBundle\Service\IssueService   $issueService
     * @param \JiraApiBundle\Service\ProjectService $projectService
     * @param \JiraApiBundle\Service\SearchService  $searchService
    public function __construct(
        IssueService   $issueService,
        ProjectService $projectService,
        SearchService  $searchService,
    ) {
        $this->issueService   = $issueService;
        $this->projectService = $projectService;
        $this->searchService  = $searchService;

Unit testing

JiraApiBundle uses PHP Unit for unit testing.

  1. Download PHP Unit.

    # Download PHP Unit
    chmod +x phpunit.phar
  2. Make sure all dependencies are installed through Composer.

    # Install dependencies
    php composer.phar install
  3. Run the unit tests.

    # Run unit tests
    php phpunit.phar