Download the PHP package spiria-digital/laravel-jira-rest-client without Composer

On this page you can find all versions of the php package spiria-digital/laravel-jira-rest-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-jira-rest-client

Jira API client for Laravel 5.4+

*This a fork of rjvandoesburg/laravel-jira-rest-client

Perform various operations of Jira APIs with Laravel 5.4+

The aim of the package is to make it easier to communicate with the API. By default the response from the request is not altered in any way. By creating your own implementation or de simple helpers provided with the package you are able to integrate Jira the way you like.

Installation

To get the latest version of laravel-jira-rest-client, run the following command

Do note that not all methods have been implemented yet.

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel 5.4:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Also locate the Aliases key in your config/app.php file and register the Facade:

Copy the package config to your local config with the publish command:

Update the .env with your proper credentials using JIRA variables from config/atlassian/jira.php.

Usage

The core of this package is a direct reflection of the Jira API mean that all request classes don't format the response you get from the API. This desicion was made so the package is more versitile allowing users to handle the response of the requests to their own wishes.

For example, to fetch a specific issue you could do the following

All responses are an instance of \GuzzleHttp\Psr7\Response Read more so in order to get the json response you could do the following:

Which will return a response like seen in the API

Helpers

Now because for the most part you don't want to spend time writing the requests yourself there are some useful helpers to get you communicating with the api.

To fetch a single issue you can use the following code:

Or use the facade if you prefer:

Middleware

To alter the Guzzle Client used for requests you can add middleware to alter the options. To add new middleware you need to alter config/atlassian/jira.php and add the class to the client_options array.

Basic Auth

By default the BasicAuthMiddleware is added and used for authentication with Jira. (Sessions is WIP)

OAuth 1.0

Impersonation

To impersonate a user through Jira requests you must set JIRA_IMPERSONATE=true in your .env file.

Once impersonation is enabled, laravel will use the authentificated user name by default. However, it's also possible to impersonate a user manually by sending a userName to the Jira constructor.

JIRA Setup for Impersonation

  1. Follow Jira documentation to generate an RSA public/private key pair.
  2. Go to Jira --> Application Links (Admin)
  3. Create a new link with your server url
  4. Ignore the "No response" warning
  5. Enter anything in all the field and keep "Create incoming link unchecked". Jira has a weird behaviour when it comes to setting up app links. If you create your incoming link now, you won't have access to 2-Legged auth (Impersonation).
  6. Click continue (ignore the warning). This should have created your new app link.
  7. Edit that link (notice there are no Outgoing info even if you added dummy info at creation).
  8. You may now enter all the info for OAuth and setup impersonation (Allow 2-Legged OAuth).

ps. I'm not quite happy with the middleware as it is implemented at this time but I do want to incorporate them in a way.

TODO


All versions of laravel-jira-rest-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version >=5.4
guzzlehttp/guzzle Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spiria-digital/laravel-jira-rest-client contains the following files

Loading the files please wait ....