PHPackages                             cybercog/laravel-youtrack-sdk - 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. cybercog/laravel-youtrack-sdk

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

cybercog/laravel-youtrack-sdk
=============================

Laravel wrapper for PHP YouTrack SDK.

7.0.0(4mo ago)201.0k↓75%6MITPHPPHP ^8.1CI failing

Since May 22Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/cybercog/laravel-youtrack-sdk)[ Packagist](https://packagist.org/packages/cybercog/laravel-youtrack-sdk)[ Docs](https://github.com/cybercog/laravel-youtrack-sdk)[ Fund](https://paypal.me/antonkomarev)[ RSS](/packages/cybercog-laravel-youtrack-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (0)

Laravel YouTrack SDK
====================

[](#laravel-youtrack-sdk)

[![cog-laravel-youtrack-sdk](https://cloud.githubusercontent.com/assets/1849174/26226734/98de7ac6-3c36-11e7-9017-4c0f2151ec81.png)](https://cloud.githubusercontent.com/assets/1849174/26226734/98de7ac6-3c36-11e7-9017-4c0f2151ec81.png)

[![Build](https://camo.githubusercontent.com/f68f2c3c232e5c90454c7ba6cd23644d60ae74e2b2d95283cb4a94d24bb2b00b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6379626572636f672f6c61726176656c2d796f75747261636b2d73646b2f74657374732e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/cybercog/laravel-youtrack-sdk/actions/workflows/tests.yml)[![StyleCI](https://camo.githubusercontent.com/6a9b4d4aebde72373da8d634c6ff2686987f437688c66d3f69b0432f75d7f99c/68747470733a2f2f7374796c6563692e696f2f7265706f732f39313734313330332f736869656c64)](https://styleci.io/repos/91741303)[![Code Climate](https://camo.githubusercontent.com/918e53fb3bccf05fc492c6c671c1f6bf600b2fc407405a1c6cf8143ab45a8fac/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f6379626572636f672f6c61726176656c2d796f75747261636b2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/cybercog/laravel-youtrack-sdk)[![Releases](https://camo.githubusercontent.com/63f555b3156c8134e430f06198ac447062ea501432cbfe301f5166a9e9967b1f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6379626572636f672f6c61726176656c2d796f75747261636b2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/cybercog/laravel-youtrack-sdk/releases)[![License](https://camo.githubusercontent.com/93e1ae6c241b115b6fca4bb75affa0df66624d63b2b42edf103be3a555c69042/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6379626572636f672f6c61726176656c2d796f75747261636b2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/cybercog/laravel-youtrack-sdk/blob/master/LICENSE)

Introduction
------------

[](#introduction)

Laravel wrapper for the [PHP YouTrack REST](https://github.com/cybercog/youtrack-rest-php#readme) library provides set of tools to interact with [JetBrains YouTrack Issue Tracking and Project Management software](https://www.jetbrains.com/youtrack/).

Contents
--------

[](#contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
    - [YouTrack URL](#youtrack-url)
    - [Authorization methods](#authorization-methods)
- [Usage](#usage)
    - [Initialize API client](#initialize-api-client)
    - [API requests](#api-requests)
    - [API responses](#api-responses)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Testing](#testing)
- [Security](#security)
- [Contributors](#contributors)
- [Alternatives](#alternatives)
- [License](#license)
- [About CyberCog](#about-cybercog)

Features
--------

[](#features)

- Using contracts to keep high customization capabilities.
- Multiple authorization strategies: Token, Cookie.
- Following PHP Standard Recommendations:
    - [PSR-1 (Basic Coding Standard)](http://www.php-fig.org/psr/psr-1/).
    - [PSR-2 (Coding Style Guide)](http://www.php-fig.org/psr/psr-2/).
    - [PSR-4 (Autoloading Standard)](http://www.php-fig.org/psr/psr-4/).
    - [PSR-7 (HTTP Message Interface)](http://www.php-fig.org/psr/psr-7/).
- Covered with unit tests.

Requirements
------------

[](#requirements)

- YouTrack &gt;= 3.0 with REST-API enabled (always enabled, by default)
- PHP &gt;= 8.1
- Guzzle HTTP Client &gt;= 7.0
- Laravel &gt;= 9.0

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

[](#installation)

The preferred method is via [composer](https://getcomposer.org). Follow the [installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

```
composer require cybercog/laravel-youtrack-sdk
```

Configuration
-------------

[](#configuration)

Laravel YouTrack SDK designed to work with default config, but it always could be modified. First of all publish it:

```
php artisan vendor:publish --tag="youtrack-config"
```

This will create a `config/youtrack.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

### YouTrack URL

[](#youtrack-url)

YouTrack instance location could be defined in `.env` file:

```
YOUTRACK_BASE_URI=https://youtrack.custom.domain
```

### Authorization methods

[](#authorization-methods)

Starting with YouTrack 2017.1 release [authorization based on permanent tokens](https://www.jetbrains.com/help/youtrack/standalone/2017.2/Manage-Permanent-Token.html) is recommended as the main approach for the authorization in your REST API calls.

By default Token authorization will be used. You could redefine it in `.env` file:

#### Token authorization

[](#token-authorization)

```
YOUTRACK_AUTH=token
YOUTRACK_TOKEN=your-permanents-token
```

#### Cookie authorization

[](#cookie-authorization)

```
YOUTRACK_AUTH=cookie
YOUTRACK_USERNAME=username
YOUTRACK_PASSWORD=secret
```

Usage
-----

[](#usage)

### Initialize API client

[](#initialize-api-client)

```
$youtrack = app(\Cog\Contracts\YouTrack\Rest\Client\Client::class);
```

As result instantiated `\Cog\YouTrack\Rest\Client\YouTrackClient` class should be returned.

### API requests

[](#api-requests)

#### HTTP request

[](#http-request)

```
$method = 'POST'; // GET, POST, PUT, DELETE, PATCH or any custom ones
$response = $youtrack->request($method, '/issue', [
    'project' => 'TEST',
    'summary' => 'New test issue',
    'description' => 'Test description',
]);
```

You can [customize requests created and transferred by a client using request options](http://docs.guzzlephp.org/en/latest/request-options.html). Request options control various aspects of a request including, headers, query string parameters, timeout settings, the body of a request, and much more.

```
$options = [
    'debug' => true,
    'sink' => '/path/to/dump/file',
];
$response = $youtrack->request('POST', '/issue', [
    'project' => 'TEST',
    'summary' => 'New test issue',
    'description' => 'Test description',
], $options);
```

#### HTTP GET request

[](#http-get-request)

```
$response = $youtrack->get('/issue/TEST-1');
```

#### HTTP POST request

[](#http-post-request)

```
$response = $youtrack->post('/issue', [
    'project' => 'TEST',
    'summary' => 'New test issue',
    'description' => 'Test description',
]);
```

#### HTTP PUT request

[](#http-put-request)

```
$response = $youtrack->put('/issue/TEST-1', [
    'summary' => 'Updated summary',
    'description' => 'Updated description',
]);
```

#### HTTP DELETE request

[](#http-delete-request)

```
$response = $youtrack->delete('/issue/TEST-1');
```

### API responses

[](#api-responses)

Each successful request to the API returns instance of `\Cog\Contracts\YouTrack\Rest\Response\Response` contract. By default it's `\Cog\YouTrack\Rest\Response\YouTrackResponse` class.

#### Get PSR HTTP response

[](#get-psr-http-response)

PSR HTTP response could be accessed by calling `httpResponse` method on API Response.

```
$youtrackResponse = $youtrack->get('/issue/TEST-1');
$psrResponse = $youtrackResponse->httpResponse();
```

#### Get response Cookie

[](#get-response-cookie)

Returns `Set-Cookie` headers as string from the HTTP response.

```
$apiResponse = $youtrack->get('/issue/TEST-1');
$cookieString = $apiResponse->cookie();
```

#### Get response Location

[](#get-response-location)

Returns `Location` header from the HTTP response.

```
$apiResponse = $youtrack->get('/issue/TEST-1');
$location = $apiResponse->location();
```

#### Transform response to array

[](#transform-response-to-array)

```
$apiResponse = $youtrack->get('/issue/TEST-1');
$location = $apiResponse->toArray();
```

#### Get HTTP response status code

[](#get-http-response-status-code)

```
$apiResponse = $youtrack->get('/issue/TEST-1');
$location = $apiResponse->statusCode();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Security
--------

[](#security)

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

Contributors
------------

[](#contributors)

[![@antonkomarev](https://avatars.githubusercontent.com/u/1849174?s=110)
Anton Komarev](https://github.com/antonkomarev)[sergiy-petrov](https://github.com/sergiy-petrov)[Laravel YouTrack SDK contributors list](../../contributors)

Alternatives
------------

[](#alternatives)

Alternatives not found.

*Feel free to add more alternatives as Pull Request.*

License
-------

[](#license)

- `Laravel YouTrack SDK` package is open-sourced software licensed under the [MIT License](LICENSE) by [Anton Komarev](https://komarev.com).

About CyberCog
--------------

[](#about-cybercog)

[CyberCog](https://cybercog.su) is a Social Unity of enthusiasts. Research best solutions in product &amp; software development is our passion.

- [Follow us on Twitter](https://twitter.com/cybercog)
- [Read our articles on Medium](https://medium.com/cybercog)

[![CyberCog](https://cloud.githubusercontent.com/assets/1849174/18418932/e9edb390-7860-11e6-8a43-aa3fad524664.png)](https://cybercog.su)

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance78

Regular maintenance activity

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~246 days

Recently: every ~546 days

Total

14

Last Release

122d ago

Major Versions

2.0.0 → 3.0.02017-09-13

3.0.0 → 4.0.02017-11-19

4.2.0 → 5.0.02019-03-18

5.3.0 → 6.0.02024-02-22

6.1.0 → 7.0.02026-03-01

PHP version history (2 changes)1.0.0PHP ^7.1

6.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3fddc40462126bbc119e373ed6a3f942a90a400f30c076c447c0625b841c4ef?d=identicon)[antonkomarev](/maintainers/antonkomarev)

---

Top Contributors

[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (50 commits)")

---

Tags

api-clientbugtrackercogcybercogissue-trackerjetbrainslaravelphpsdksdk-phpyoutrackyoutrack-rest-phpapiclientlaravelsdkrestjetbrainscogpmticketscybercoghelpdeskyoutrackissuesbugtrackeryt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cybercog-laravel-youtrack-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/cybercog-laravel-youtrack-sdk/health.svg)](https://phpackages.com/packages/cybercog-laravel-youtrack-sdk)
```

###  Alternatives

[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37151.8k3](/packages/cybercog-youtrack-rest-php)[jlevers/selling-partner-api

PHP client for Amazon's Selling Partner API

4335.4M2](/packages/jlevers-selling-partner-api)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[artesaos/laravel-linkedin

Linkedin API integration for Laravel and Lumen 5

5666.5k](/packages/artesaos-laravel-linkedin)[repat/plentymarkets-rest-client

REST Client for Plentymarkets

1310.4k](/packages/repat-plentymarkets-rest-client)[rap2hpoutre/jacky

Opinionated REST JSON HTTP API client for laravel

174.4k](/packages/rap2hpoutre-jacky)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
