xen3r0/jira-api-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

xen3r0/jira-api-client

最新稳定版本:0.2.2

Composer 安装命令:

composer require xen3r0/jira-api-client

包简介

A Modern Jira API client

README 文档

README

CI

Jira API Client is a modern PHP library that provides a simple and fluent interface to interact with the Jira API.

Getting started

Prerequisites

This library requires PHP 8.1 or higher and the following PHP extensions:

  • dom
  • json
  • xml

Installation

Add xen3r0/jira-api-client to your composer.json file:

php composer.phar require xen3r0/jira-api-client

Usage

Create a new instance of the JiraClient class:

use Xen3r0\JiraApiClient\Configuration\ConfigurationFactory;
use Xen3r0\JiraApiClient\Http\JiraClient;

$configuration = ConfigurationFactory::create([
    'host' => 'https://your-jira-instance.atlassian.net',
    'username' => 'your-username',
    'password' => 'your-api-token',
]);
$client = new JiraClient($configuration);

Now, you can use some repositories, for example, IssueRepository:

use Xen3r0\JiraApiClient\Repository\IssueRepository;

$issueRepository = new IssueRepository($client);
$issue = $issueRepository->findByIdOrKey('PROJECT-123');

Symfony Bundle

You can also use this library as a Symfony bundle, you don't need to add another package to your composer dependencies.

Registering the Bundle

To register the bundle, add it to your config/bundles.php file:

return [
    // ...
    Xen3r0\JiraApiClient\Symfony\Bundle\JiraApiClientBundle::class => ['all' => true],
];

Configuration

Then, configure the bundle in your config/packages/jira_api_client.yaml file:

jira_api_client:
    host: 'https://your-jira-instance.atlassian.net'
    username: 'your-username'
    password: 'your-api-token'

Usage

You can now use every repository as a service in your Symfony application. For example, to use the IssueRepository:

use Xen3r0\JiraApiClient\Repository\IssueRepositoryInterface;

#[Route('/some-route', name: 'some_route')]
class SomeController
{
    public function __construct(
        private readonly IssueRepositoryInterface $issueRepository,
    ) {
        $this->issueRepository = $issueRepository;
    }

    public function __invoke(): void
    {
        $issue = $this->issueRepository->findByIdOrKey('PROJECT-123');
        // Do something with the issue...
    }
}

Repositories

This library provides several repositories to interact with different Jira API endpoints. Here are some of the available repositories:

  • CustomFieldOptionRepository: Manage custom field options in Jira.
  • IssueCommentRepository: Manage comments on issues in Jira.
  • IssueRepository: Manage issues in Jira.
  • ProjectRepository: Manage projects in Jira.
  • VersionRepository: Manage versions in Jira.

A repository is missing ? You can suggest a new repository by opening an issue and/or pull request.

Contributing

See the CONTRIBUTING.md file for details on how to contribute to this project.

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固