Download the PHP package brezzhnev/atlassian-connect-core without Composer

On this page you can find all versions of the php package brezzhnev/atlassian-connect-core. 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 atlassian-connect-core

Atlassian Connect Core

Latest Version on Packagist Build Status Quality Score Total Downloads

The easiest way to create an add-on for JIRA and Confluence.

Version Compatibility

Laravel Package
5.5.x 1.2.x
6.x 1.3.x

Getting Started

Installing

Install dependency via Composer

Register route middleware jwt by adding to app\Http\Kernel.php the following line:

Set the authentication driver to jwt in config/auth.php:

Set the model class in config/auth.php providers section:

Register the subscriber in the app/Providers/EventServiceProvider.php:

Configure the database and run:

The command php artisan plugin:install will publish config, views and resources that you can change for your needs.

Also, it will create "dummy" tenant needed for local testing and developing without needing of installing the add-on on real JIRA or Confluence instances.

Publishing as an add-on

If your application returns the add-on descriptor on the request to URL http://localhost:8000/atlassian-connect.json it means you are close to happiness and you can install the add-on.

Step 1. Make your application accessible

To install the add-on in the instance, you should be visible through the internet. For testing purposes the easiest way is to use ngrok.

Then you have it accessible, put your actual website URL to environment variable PLUGIN_URL.

Make sure your add-on is accessible via HTTPS, it is a requirement.

Step 2. Configure your JIRA / Confluence instance

Configure your add-on using config/plugin.php. Most values may be overwritten using env vars.

Step 3. Upload your add-on

Finally, you need to upload the add-on. Click "Upload add-on" and paste your public URL with descriptor path, eg. https://d1ea31ce.ngrok.io/atlassian-connect.json or https://yourplugindomain.com/atlassian-connect.json

Step 4. Testing the successfulness

After the successful installation, on JIRA instance you may see "Your add-on" top menu item. You also can go to the add-on general page by direct link :product_base_url/plugins/servlet/ac/sample-plugin/hello-page

Instead of :product_base_url you should put your JIRA or Cofluence instance URL (eg. https://google-dev.atlassian.net).

If you see page working, the application configured and add-on installed correctly.

Publish resources

Instead of using plugin:install you can perform actions manually.

To copy all the publishes you should use the following command:

To copy only specific publish you must call this command with option --tag. The value can be public (to copy assets), views and config.

Usage

Default routes

The following routes are registered by default:

You may disable them by setting the config value plugin.loadRoutes to false.

Descriptor

You can use Descriptor facade to customize or create from scratch your own descriptor contents.

For example, you may customize it by adding to the app\Providers\AppServiceProvider in boot section the following:

Warning: if you are using route helper in the AppServiceProvider you should have RouteServiceProvider defined above AppServiceProvider in your app.php config.

API requests

In most cases of add-on development for Atlassian Product you need to perform requests to the instance.

For this case you can use JWTClient. It uses GuzzleHttp as HTTP client.

If you want to have custom handling (middlewares etc.) you can pass client instance to the constructor.

Pagination

If you want to send a request to an endpoint with pagination you should use JWTClient::paginate method. In most cases you don't need to pass paginator instance to the JWTClient constructor because it will be instantiated automatically by resolving your Tenant product type (JIRA or Confluence), but you always can use the specific paginator.

There are two paginators supported by default:

You're always able to extend Paginator class and create your own.

Examples

Get a Confluence page content

Get a JIRA issue

Webhooks

The plugin provides a convenient way to handle incoming webhooks, based on habitual Laravel Events.

If you don't familiar with Laravel Events, please take a look at Laravel Docs

There are two ways to define webhook listeners:

1. Define listeners in the config/plugin.php

2. Define listeners using the Webhook facade, for example:

As you can see, you can define event listener as a closure or as a string in Laravel-like syntax:

You don't need to define the webhooks within your add-on descriptor, they will be described automatically.

Example listener

Your event listeners may also type-hint any dependencies they need on their constructors. All event listeners are resolved via the Laravel service container, so dependencies will be injected automatically.

Console commands

Tests

Run the following in the package folder:

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of atlassian-connect-core with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
firebase/php-jwt Version ^5.0
guzzlehttp/guzzle Version ^6.3
illuminate/support 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 brezzhnev/atlassian-connect-core contains the following files

Loading the files please wait ....