定制 coldbrain/youtrack-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

coldbrain/youtrack-client

Composer 安装命令:

composer require coldbrain/youtrack-client

包简介

A PHP YouTrack client library

README 文档

README

Build Status

The bugtracker YouTrack provides a REST-API. Because a lot of web applications are written in PHP I decided to write a client library for it. To make it easier for developers to write connectors to YouTrack.

The initial development was sponsored by Telematika GmbH. The current development is made by nepda.

The source of this library is released under the BSD license (see LICENSE for details).

Requirements

  • PHP >= 5.4 (Tested with >= 5.5, Travis runs tests with 5.4, 5.5 and 5.6)
  • curl
  • simplexml
  • json
  • YouTrack 3.0+ with REST-API enabled (currently, the production system runs with YouTrack 6.0)

Changelog

2016-02-08 - v1.0.10

  • A lot of new methods added (updateIssue, deleteIssue, createAttachment, importAttachment, importLinks, importIssues, importWorkitems, getWorkitems)
  • Merged #7 from REDLINK/fix-createIssue
  • Merged #8 from REDLINK/replace-urlencode-with-rawurlencode
  • Merged #9 from REDLINK/feature-createAttachment
  • Merged #10 from REDLINK/set-mimetype
  • Merged #12 from REDLINK/feature-newIssueMethods

2015-02-10 - v1.0.9

  • Merged #6 'Fetch issues by filter only + with comments'. Thanks @chabberwock

(Please look into CHANGELOG for a complete list of the past releases)

Usage

<?php
require_once("YouTrack/Connection.php");
$youtrack = new \YouTrack\Connection("http://example.com", "login", "password");
$issue = $youtrack->getIssue("TEST-1");
...

See ./examples folder for more usage examples.

Usage with ZF2 ZendSkeletonApplication

In your /init_autoloader.php

<?php
// ... snip
if ($zf2Path) {
    if (isset($loader)) {
        $loader->add('Zend', $zf2Path);
    } else {
        include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
        Zend\Loader\AutoloaderFactory::factory(array(
            'Zend\Loader\StandardAutoloader' => array(
                'autoregister_zf' => true,
                'namespaces' => [                            // add this
                    'YouTrack' => 'vendor/YouTrack'          // ...
                ],                                           // ...
            )
        ));
    }
}
// ... snip

From now on you can use YouTrack-Client-PHP-Library from any file in you ZF2-App.

<?php
// ...
// example
use YouTrack\Connection as YouTrackConnection;

class ExampleController extends AbstractActionController
{

    public function anyAction()
    {
        $youtrack = new YouTrackConnection("http://example.com", "login", "password");
        $issue = $youtrack->getIssue("TEST-1");
        // ...
    }
}

Tests

The testsuite depends on PHPUnit. You can install it with composer.phar:

curl -sS https://getcomposer.org/installer | php --
php composer.phar install

The unit tests are incomplete but you can run them using phpunit like this:

./vendor/bin/phpunit ./test

Contributors

(and more: https://github.com/nepda/youtrack/network/members)

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 36
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2016-02-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固