PHPackages                             ricasolucoes/atlassian - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. ricasolucoes/atlassian

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ricasolucoes/atlassian
======================

PHP ATLASSIAN INTEGRATION - JIRA and Confluence Rest Client API for PHP Users.

0.4.4(2y ago)12.1k1MITPHPPHP ^7.2|^8.0

Since Sep 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ricasolucoes/atlassian)[ Packagist](https://packagist.org/packages/ricasolucoes/atlassian)[ Docs](https://github.com/ricasolucoes/atlassian)[ Fund](https://ricasolucoes.com.br/open-source/support-us)[ GitHub Sponsors](https://github.com/ricasolucoes)[ RSS](/packages/ricasolucoes-atlassian/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (18)Versions (10)Used By (1)

PHP ATLASSIAN INTEGRATION - JIRA and Confluence Rest Client
===========================================================

[](#php-atlassian-integration---jira-and-confluence-rest-client)

Atlassian's Jira, Confluence &amp; Confluence Question REST API Client for PHP Users.

[![Latest Stable Version](https://camo.githubusercontent.com/499b405b9744976693c507a9fa9e7c0af30e9422231b861dae86e39b0f2cc30a/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f762f737461626c65)](https://packagist.org/packages/ricasolucoes/atlassian)[![Latest Unstable Version](https://camo.githubusercontent.com/af38dabeb4733f3ae57cdf50fe7b05b4c43de5460e362b8eac454e325a002608/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f762f756e737461626c65)](https://packagist.org/packages/ricasolucoes/atlassian)[![Build Status](https://camo.githubusercontent.com/32b6beed6642b313534b7a424abcd13b2a47704d8b625d2bf02f06c1a4474eff/68747470733a2f2f7472617669732d63692e6f72672f72696361736f6c75636f65732f61746c61737369616e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ricasolucoes/atlassian)[![StyleCI](https://camo.githubusercontent.com/6e4c04d11a4567e3273877842a2bdb8663948eb7b2faec574840ba35dbcf740d/68747470733a2f2f7374796c6563692e696f2f7265706f732f33303031353336392f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://styleci.io/repos/30015369)[![Scrutinizer](https://camo.githubusercontent.com/8b9d85b3d28482ddba27e1a4c6c06a615aa0869c5d5a89728389f26db726172b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696361736f6c75636f65732f61746c61737369616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ricasolucoes/atlassian/)[![Coverage Status](https://camo.githubusercontent.com/2e1f7df282e79bad88d313d187ceddf21227bc689b228560f4c9944eecca28fe/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f72696361736f6c75636f65732f61746c61737369616e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ricasolucoes/atlassian?branch=master)[![License](https://camo.githubusercontent.com/26ffa7957998006a5be654adf17dc356be67bb331ae74b7f20f1e6d4c810d575/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f6c6963656e7365)](https://packagist.org/packages/ricasolucoes/atlassian)[![Total Downloads](https://camo.githubusercontent.com/81a3fb68233e17deaa51e1ba596febf04bf353b8380dfc97fea631f49d1f5345/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f646f776e6c6f616473)](https://packagist.org/packages/ricasolucoes/atlassian)[![Monthly Downloads](https://camo.githubusercontent.com/a60472bfe51c908551a4f83c4fdb5646f7a3fb12cdb9cfa6848b76a624bd7af6/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f642f6d6f6e74686c79)](https://packagist.org/packages/ricasolucoes/atlassian)[![Daily Downloads](https://camo.githubusercontent.com/df52c9dfb3d3ea22f0ae563c7ae78c5bc76bad344669972a8e35967da22eb8ce/68747470733a2f2f706f7365722e707567782e6f72672f72696361736f6c75636f65732f61746c61737369616e2f642f6461696c79)](https://packagist.org/packages/ricasolucoes/atlassian)

Requirements
============

[](#requirements)

- PHP &gt;= 7.1
- [php JsonMapper](https://github.com/netresearch/jsonmapper)
- [phpdotenv](https://github.com/vlucas/phpdotenv)
- [php-jira-rest-client](https://github.com/lesstif/php-jira-rest-client)

Inspiring
=========

[](#inspiring)

- [confluence-rest-api](https://github.com/ogilviec/confluence-rest-api)
- [confluence-php-client](https://github.com/rainflute/confluence-php-client)
- \[Amice/atlassian\](

JIRA Rest API Documents
=======================

[](#jira-rest-api-documents)

- 6.4 -
- Jira Server latest -
- Jira Cloud latest -

Introduction
============

[](#introduction)

Getting started
===============

[](#getting-started)

- Requirements
    - composer
    - curl module for php
- Git
    -
- Run: composer install

Settings
========

[](#settings)

- All settings can be found in settings.php.
    - Connections The program will always use the default connection.
- Filters Filters for JQL queries are defined in src/Filter/Filter.php

Installation
============

[](#installation)

1. Download and Install PHP Composer.

    ```
    curl -sS https://getcomposer.org/installer | php
    ```
2. Next, run the Composer command to install the latest version of php jira rest client.

    ```
    php composer.phar require ricasolucoes/atlassian
    ```

    or add the following to your composer.json file.

    ```
    {
        "require": {
            "ricasolucoes/atlassian": "^0.1.0"
        }
    }
    ```
3. Then run Composer's install or update commands to complete installation.

    ```
    php composer.phar install
    ```
4. After installing, you need to require Composer's autoloader:

    ```
    require 'vendor/autoload.php';
    ```

Configuration
=============

[](#configuration)

you can choose loads environment variables either 'dotenv' or 'array'.

### use dotenv

[](#use-dotenv)

copy .env.example file to .env on your project root directory.

```
CONFLUENCE_HOST="https://your-confluence.host.com"
CONFLUENCE_USER="confluence-username"
CONFLUENCE_PASS="confluence-password"

```

### use array

[](#use-array)

create Service class with ArrayConfiguration parameter.

```
use Atlassian\Question\QuestionService;

$qs = new QuestionService(new \Atlassian\Configuration\ArrayConfiguration(
          [
              'host' => 'https://your-confluence.host.com',
              'user' => 'confluence-username',
              'password' => 'confluence-password',
          ]
   ));
```

copy .env.example file to .env on your project root.

```
JIRA_HOST="https://your-jira.host.com"
JIRA_USER="jira-username"
JIRA_PASS="jira-password-OR-api-token"
# to enable session cookie authorization
# COOKIE_AUTH_ENABLED=true
# COOKIE_FILE=storage/jira-cookie.txt
# if you are behind a proxy, add proxy settings
PROXY_SERVER="your-proxy-server"
PROXY_PORT="proxy-port"
PROXY_USER="proxy-username"
PROXY_PASSWORD="proxy-password"
JIRA_REST_API_V3=false
```

**Laravel Users:** This package working standarlone and not is needed load laravel. If you are developing with laravel framework(8.x), you must append above configuration to your application .env file. Once installed, if you are not using automatic package discovery, then you need to register the `Atlassian\AtlassianProvider` service provider in your `config/app.php`.

**Important Note:**As of March 15, 2018, in accordance to the [Atlassian REST API Policy](https://developer.atlassian.com/platform/marketplace/atlassian-rest-api-policy/), Basic auth with password to be deprecated. Instead of password, you should using [API token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html).

**REST API V3 Note:**In accordance to the [Atlassian's deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/), After the 29th of april 2019, REST API no longer supported username and userKey, and instead use the account ID. if you are JIRA Cloud users, you need to set *JIRA\_REST\_API\_V3=true* in the .env file.

**CAUTION**this library not fully supported JIRA REST API V3 yet.

use array
---------

[](#use-array-1)

create Service class with ArrayConfiguration parameter.

```
use Atlassian\Configuration\ArrayConfiguration;
use Atlassian\Issue\IssueService;

$iss = new IssueService(new ArrayConfiguration(
          array(
               'jiraHost' => 'https://your-jira.host.com',
               // for basic authorization:
               'jiraUser' => 'jira-username',
               'jiraPassword' => 'jira-password-OR-api-token',
               // to enable session cookie authorization (with basic authorization only)
               'cookieAuthEnabled' => true,
               'cookieFile' => storage_path('jira-cookie.txt'),
               // if you are behind a proxy, add proxy settings
               "proxyServer" => 'your-proxy-server',
               "proxyPort" => 'proxy-port',
               "proxyUser" => 'proxy-username',
               "proxyPassword" => 'proxy-password',
          )
   ));
```

Usage
-----

[](#usage)

```
