PHPackages                             jakoch/php-trac-rpc - 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. jakoch/php-trac-rpc

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

jakoch/php-trac-rpc
===================

A library to interact with a Trac Bugtracker API via remote procedure calls.

v1.0.3(10y ago)42212[3 issues](https://github.com/jakoch/PHPTracRPC/issues)MITPHPPHP &gt;=5.3.0

Since Mar 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/jakoch/PHPTracRPC)[ Packagist](https://packagist.org/packages/jakoch/php-trac-rpc)[ Docs](http://github.com/jakoch/PHPTracRPC/)[ RSS](/packages/jakoch-php-trac-rpc/feed)WikiDiscussions master Synced today

READMEChangelog (4)DependenciesVersions (4)Used By (0)

### TracRPC

[](#tracrpc)

[![Latest Stable Version](https://camo.githubusercontent.com/c7a01cf335d63000fc9aeb2f65eddf04f592e6c5db38cb418f3abe9432851d64/68747470733a2f2f706f7365722e707567782e6f72672f6a616b6f63682f7068702d747261632d7270632f76657273696f6e2e706e67)](https://packagist.org/packages/jakoch/php-trac-rpc)[![Total Downloads](https://camo.githubusercontent.com/d55396eb722675e5acf0a702143201dbce4f3d52d889b75e6d7ab6b664c104ab/68747470733a2f2f706f7365722e707567782e6f72672f6a616b6f63682f7068702d747261632d7270632f642f746f74616c2e706e67)](https://packagist.org/packages/jakoch/php-trac-rpc)[![Build Status](https://camo.githubusercontent.com/3e26a0790cbe2ba1a8ecf1a083e8a644e50814012c4d186e0212e6b60fc0c376/68747470733a2f2f7472617669732d63692e6f72672f6a616b6f63682f504850547261635250432e706e67)](https://travis-ci.org/jakoch/PHPTracRPC)[![License](https://camo.githubusercontent.com/b4488d8c8a535961d840816bb6f58ae9ad33db445469e32dc5c8cf603dba684d/68747470733a2f2f706f7365722e707567782e6f72672f6a616b6f63682f7068702d747261632d7270632f6c6963656e73652e706e67)](https://packagist.org/packages/jakoch/php-trac-rpc)

The purpose of this class is to interact with the Trac API from a remote location by remote procedure calls.

Trac is a project management and bug/issue tracking system.

Trac by itself does not provide an API. You must install the XmlRpcPlugin. Trac then provides anonymous and authenticated access to the API via two protocols XML-RPC and JSON-RPC.

### Requirements

[](#requirements)

- PHP 5.3.0 or higher
- The PHP Extensions "JSON" and "cURL" are required.
- Trac with XmlRpcPlugin

### Features

[](#features)

- Make Requests to the TRAC API using the following [request methods](https://github.com/jakoch/PHPTracRPC/blob/master/README.md#request-methods).

### Installation

[](#installation)

a) Download the ZIP from Github, then extract the library file and include it.

b) Installation via Composer

To add PHPTracRPC as a local, per-project dependency to your project, simply add `jakoch/php-trac-rpc` to your project's `composer.json` file.

```
{
    "require": {
        "jakoch/php-trac-rpc": "dev-master"
    }
}

```

### Usage

[](#usage)

#### Step 1: include library

[](#step-1-include-library)

When you installed via Composer, please include the Composer Autoloader first and then instantiate the TracRPC class.

```
include __DIR__.'/vendor/autoload.php';

```

When you fetched the zip file, please include the lib directly.

```
include __DIR__.'/lib/TracRPC.php';

```

#### Step 2: setup credentials and instantiate TracRPC

[](#step-2-setup-credentials-and-instantiate-tracrpc)

```
$credentials = array('username' => 'username', 'password' => 'password');

$trac = new \TracRPC\TracRPC('http://trac.example.com/login/jsonrpc', $credentials);

```

#### Step 3: do some requests

[](#step-3-do-some-requests)

##### Single Call Example

[](#single-call-example)

```
$result = $trac->getTicket('32');

if ($result === false) {
    die('ERROR: '.$trac->getErrorMessage());
} else {
    var_dump($result);
}

```

##### Multi Call Example

[](#multi-call-example)

```
$trac->setMultiCall(true);

$ticket = $trac->getTicket('32');
$attachments = $trac->getTicketAttachments('list', '32');

$trac->doRequest();

$ticket = $trac->getResponse($ticket);
$attachments = $trac->getResonse($attachments);
var_dump($ticket, $attachments);

```

### Request Methods

[](#request-methods)

1. getRecentChangedWikiPages($date = 0)
2. getWikiPage($name = '', $version = 0, $raw = true)
3. getWikiPageInfo($name = '', $version = 0)
4. getWikiPages()
5. getRecentChangedTickets($date = 0)
6. getTicket($id = '')
7. getTicketFields()
8. getTicketChangelog($id = '', $when = 0)
9. getTicketActions($id = '')
10. getWikiAttachments($action = 'list', $name = '', $file = '')
11. getTicketAttachments($action = 'list', $id = '', $file = '', $desc = '', $replace = true)
12. getWikiUpdate($action = 'create', $name = '', $page = '', $data = array())
13. getTicketUpdate($action = 'create', $id = '', $data = array())
14. getTicketSearch($query = '')
15. getTicketComponent($action = 'get\_all', $name = '', $attr = array())
16. getTicketMilestone($action = 'get\_all', $name = '', $attr = array())
17. getTicketPriority($action = 'get\_all', $name = '', $attr = '')
18. getTicketResolution($action = 'get\_all', $name = '', $attr = '')
19. getTicketSeverity($action = 'get\_all', $name = '', $attr = '')
20. getTicketType($action = 'get\_all', $name = '', $attr = '')
21. getTicketVersion($action = 'get\_all', $name = '', $attr = array())
22. getTicketStatus()
23. getSearch($query = '', $filter = array())
24. getWikiTextToHTML($text = '')
25. getSearchFilters()
26. getApiVersion()

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance5

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 84.3% 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 ~6 days

Total

3

Last Release

3756d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a4ac38be149d29b9cd37b203a37d3f1684a6aeeb28779105c86f358e226a7f4?d=identicon)[jakoch](/maintainers/jakoch)

---

Top Contributors

[![jakoch](https://avatars.githubusercontent.com/u/85608?v=4)](https://github.com/jakoch "jakoch (43 commits)")[![mpedrummer](https://avatars.githubusercontent.com/u/1583702?v=4)](https://github.com/mpedrummer "mpedrummer (6 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

jsonapixmlcurlrpctrac

### Embed Badge

![Health badge](/badges/jakoch-php-trac-rpc/health.svg)

```
[![Health](https://phpackages.com/badges/jakoch-php-trac-rpc/health.svg)](https://phpackages.com/packages/jakoch-php-trac-rpc)
```

###  Alternatives

[tcdent/php-restclient

A generic REST API client for PHP

3533.1M29](/packages/tcdent-php-restclient)[vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClient

59302.6k11](/packages/vinelab-http)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4640.8k](/packages/ismaeltoe-osms)[hgg/pardot

Pardot API library for building custom CRM connectors

23101.7k](/packages/hgg-pardot)

PHPackages © 2026

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