PHPackages                             zolli/phabricator-php-api - 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. [API Development](/categories/api)
4. /
5. zolli/phabricator-php-api

AbandonedArchivedLibrary[API Development](/categories/api)

zolli/phabricator-php-api
=========================

PHP implementation for Phabricator conduit application

2.0.2(10y ago)2034.8k↓50%6[2 issues](https://github.com/Zolli/Phabricator-PHP-API/issues)[1 PRs](https://github.com/Zolli/Phabricator-PHP-API/pulls)MITPHPPHP &gt;=5.6

Since May 8Pushed 4y ago3 watchersCompare

[ Source](https://github.com/Zolli/Phabricator-PHP-API)[ Packagist](https://packagist.org/packages/zolli/phabricator-php-api)[ RSS](/packages/zolli-phabricator-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (6)Used By (0)

This repository is archived as 2021-07-01 because phabricator is no longer maintained.
======================================================================================

[](#this-repository-is-archived-as-2021-07-01-because-phabricator-is-no-longer-maintained)

---
===

[](#---)

[![Build Status](https://camo.githubusercontent.com/68e2e39fe34e4ea14a1058a2c033a071cb2175f9568e74ec690090cc2a8fa0aa/68747470733a2f2f63692e7a6f6c6c692e68752f6a6f622f5068616272696361746f724150492f62616467652f69636f6e)](https://ci.zolli.hu/job/PhabricatorAPI/)[![Build Stability](https://camo.githubusercontent.com/99cdcf336098c6b91bb0a1bad42c3c9a51c1b574627732d45f4dcba069c01beb/68747470733a2f2f7374617475732e6275696c64722d6672616d65776f726b2e696f2f6275696c647374617475732f7374617475735f6d6f64756c65732e7068703f6a6f624e616d653d5068616272696361746f724150492f26747970653d73746162696c697479)](https://ci.zolli.hu/job/PhabricatorAPI/)[![Code Coverage](https://camo.githubusercontent.com/246b75dc85447e38f50f935afaf685ab7eacd54d074a5ae687cd8e0cd4756847/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5a6f6c6c692f5068616272696361746f722d5048502d4150492f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Zolli/Phabricator-PHP-API/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cee15598dca34787f2889bb155679df9fd2968bd6878d5ef9e53d21e4b8a530f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5a6f6c6c692f5068616272696361746f722d5048502d4150492f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Zolli/Phabricator-PHP-API/?branch=master)[![Test Results](https://camo.githubusercontent.com/22c7414687a1b16e345890ac0bd5ea8c733ff15426916951d088ee5c2053fd5e/68747470733a2f2f7374617475732e6275696c64722d6672616d65776f726b2e696f2f6275696c647374617475732f7374617475735f6d6f64756c65732e7068703f6a6f624e616d653d5068616272696361746f7241504926747970653d7465737473)](https://ci.zolli.hu/job/PhabricatorAPI/)[![CRAP Report](https://camo.githubusercontent.com/19041f7881975f4360d1251bca0799872574c018435549e1f7ff73c1e3b85504/68747470733a2f2f7374617475732e6275696c64722d6672616d65776f726b2e696f2f6275696c647374617475732f7374617475735f6d6f64756c65732e7068703f6a6f624e616d653d5068616272696361746f7241504926747970653d63726170)](https://ci.zolli.hu/job/PhabricatorAPI/)[![Dependency Status](https://camo.githubusercontent.com/6ff8fb32c97a2607335b35126d2796a2b3a4ac8eb83ea1e97f333cbafab53d54/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536393465646337616637383962303034333030306330632f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/5694edc7af789b0043000c0c)[![PHP7 Status](https://camo.githubusercontent.com/abe232bf639c027c3576eb19ae6e2fe9a266568988ed98a59e0cea813007c692/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850372d7465737465642d3838393242462e737667)](https://github.com/BuildrPHP/Test-Tools)

Phabricator PHP API (Conduit client)
====================================

[](#phabricator-php-api-conduit-client)

This is a PHP based client for Phabricator API. [Phabricator](http://phabricator.org) is an open source, software engineering platform, built in PHP, and it has a very nice API called **Conduit**. For all available endpoint and method name, see the [Conduit Application](https://secure.phabricator.com/conduit/query/modern/) in the live Phabricator instance.

**Basic useful feature list:**

- Fully implemented all current API endpoint
- Ability to make custom Client implementation
- Custom handler class for each endpoint

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

[](#installation)

### With composer

[](#with-composer)

Run this command inside your project

```
composer require zolli/phabricator-php-api

```

Or past this dependency into your composer.json manually

```
{
  "require": {
        "zolli/phabricator-php-api": "2.0.*"
    }
}
```

Documentation
-------------

[](#documentation)

#### Initialization

[](#initialization)

```
//Initialization the instance
$api = new \Phabricator\Phabricator('http://phabricator.example.com', 'cli-exmapletoken')
```

The API is now ready to use. This class uses magic method to proxy the calls to the suitable endpoint handler. Phabricator methods should looks like this: `project.query`. In this package exploded into two parts.

The first is the endpoint (`Project` in this example) and the method (`query`);

With this example the call is looks like this:

```
$result = $api->Project('query', ['status' => 'status-open']);
```

In this example the `/api/project.query` API is called and the `status` argument is passed.

#### Using custom client

[](#using-custom-client)

This API of this package is allows you to make custom API clients that run the request for you. All client should implement the `Phabricator\Client\ClientInterface` interface.

Custom clients should be injected in two different way.

Injecting trough the constructor

```
$myClient = \Vendor\Package\MyAwesomeApiClient();

$api = new \Phabricator\Phabricator('http://phabricator.example.com', 'cli-exmapletoken', $myClient);
```

Or you can use the `Phabricator::setClient(ClientInterface $client)` method.

```
$myClient = \Vendor\Package\MyAwesomeApiClient();

$api = new \Phabricator\Phabricator('http://phabricator.example.com', 'cli-exmapletoken');
$api->setClient($myClient);
```

#### Custom endpoint handlers

[](#custom-endpoint-handlers)

Handlers are various classes that handle the execution and post-processing of endpoint methods. By default all API endpoint have handler, but only the default that no do any pre- or post-processing.

By example a custom handler can read and write files when using the `file.upload` or `file.download` method.

To achieve this create a class that implements the `\Phabricator\Endpoints\EndpointInterface` and extends the `\Phabricator\Endpoints\BaseEndpoint` class and you good to go.

The `BaseEndpoint` provides a `defaultExecutor()` method that executed when an endpoint method not has any specific executor.

When creating custom executor method this methods will be used when calling an endpoint method.

Look the `BaseEndpoint` and any endpoint handler for more information.

Suppose that you created and endpoint handler with this FQCN: `\Vendor\Package\Hander\FileHander`; You can push this handler like this:

Tha first argument is the endpoint name for this handler is listen and the second is the FQCN of the handler.

```
    $api = new \Phabricator\Phabricator('http://phabricator.example.com', 'cli-exmapletoken');

    $api->pushEndpointHandler('File', FileHandler::class);
```

Responses
---------

[](#responses)

The client is returning `\Phabricator\Response\ConduitResponse` as response. Look API documentation for methods.

Upgrading
---------

[](#upgrading)

### From 1.0.0

[](#from-100)

In the 2.0.0 release the API is changed significantly and the underlying API dramatically. So, this release probably not compatible with components that created for 1.0.0

Main API Differences:

- The `\Phabricator\Phabricator constructor` only take the baseUrl and the tokens as arguemnt
- Client registration in constructor is now optional
- Registering custom endpoint handler only require the handler Fully qualified class name, not instance
- Instead of `\stdClass` responses now `\Phabricator\Response\ConduitResponse` objects.
- The `\Phabricator\Client\ClientInterface` interface changed significantly.
- The arguments of endpoint handler methods (executors) changed.
- Now not using exceptions from global namespace, instead use `buildr/foundation` package exceptions
- Clients not responsible for request data formatting.

API Documentation
-----------------

[](#api-documentation)

The 2.0.0 release API documentation is available here: [API Documentation](https://ci.zolli.hu/job/Phabricator%20PHP%20API/4/artifact/build/output/release/Phabricator%20PHP%20API-doc-2.0.0.git-237.zip)

Contribution
------------

[](#contribution)

[Project link](https://project.zolli.hu/projects/PHA/issues/)

For contribution guide and coding standard please visit our [Coding Standard Repository](https://github.com/BuildrPHP/Coding-Standard)

Licensing
---------

[](#licensing)

This project licensed under [GNU - General Public License, version 3](http://www.gnu.org/licenses/lgpl.txt)

[![GPLv3 Logo](https://camo.githubusercontent.com/0ea1f8d9fc95d33ddd400cefd5ffe65ac8c911f1cf1abdeb53f2fb3fe98b4433/687474703a2f2f7777772e676e752e6f72672f67726170686963732f67706c76332d38387833312e706e67)](https://camo.githubusercontent.com/0ea1f8d9fc95d33ddd400cefd5ffe65ac8c911f1cf1abdeb53f2fb3fe98b4433/687474703a2f2f7777772e676e752e6f72672f67726170686963732f67706c76332d38387833312e706e67)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.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 ~173 days

Total

5

Last Release

3333d ago

Major Versions

1.0.0 → 2.0.02016-01-12

2.0.2 → v3.x-dev2017-03-30

PHP version history (2 changes)2.0.0PHP &gt;=5.6

v3.x-devPHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/803e0604c862f1a40b430d527ad4f553fe3421a761060760610a63b090a63aa7?d=identicon)[Zolli](/maintainers/Zolli)

---

Top Contributors

[![Zolli](https://avatars.githubusercontent.com/u/190008?v=4)](https://github.com/Zolli "Zolli (52 commits)")[![brianherbert](https://avatars.githubusercontent.com/u/106068?v=4)](https://github.com/brianherbert "brianherbert (1 commits)")[![lombartec](https://avatars.githubusercontent.com/u/3073746?v=4)](https://github.com/lombartec "lombartec (1 commits)")

---

Tags

apiclientphabricatorconduit

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zolli-phabricator-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/zolli-phabricator-php-api/health.svg)](https://phpackages.com/packages/zolli-phabricator-php-api)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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