PHPackages                             nuxeo/nuxeo-php-client - 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. nuxeo/nuxeo-php-client

ActiveLibrary[API Development](/categories/api)

nuxeo/nuxeo-php-client
======================

PHP Client Library for the Nuxeo Automation API

3.0.0(4y ago)99.7k26[2 issues](https://github.com/nuxeo/nuxeo-php-client/issues)[17 PRs](https://github.com/nuxeo/nuxeo-php-client/pulls)1Apache-2.0PHPPHP ~7.2 || ~8.0

Since Oct 15Pushed 4mo ago43 watchersCompare

[ Source](https://github.com/nuxeo/nuxeo-php-client)[ Packagist](https://packagist.org/packages/nuxeo/nuxeo-php-client)[ Docs](http://www.nuxeo.com)[ RSS](/packages/nuxeo-nuxeo-php-client/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (9)Versions (35)Used By (1)

[![Packagist Version](https://camo.githubusercontent.com/6d486642ece43c1d4eff081adf1653e7d96be960c4b14d049ea1ae12aa1b2a13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e7578656f2f6e7578656f2d7068702d636c69656e74)](https://camo.githubusercontent.com/6d486642ece43c1d4eff081adf1653e7d96be960c4b14d049ea1ae12aa1b2a13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e7578656f2f6e7578656f2d7068702d636c69656e74)[![Packagist Downloads](https://camo.githubusercontent.com/87021198718ad374c871cf03b961ebb8c51d4ee01be1c926e934ee032ebf4c36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e7578656f2f6e7578656f2d7068702d636c69656e74)](https://camo.githubusercontent.com/87021198718ad374c871cf03b961ebb8c51d4ee01be1c926e934ee032ebf4c36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e7578656f2f6e7578656f2d7068702d636c69656e74)[![GitHub](https://camo.githubusercontent.com/1b3b9b6f6ac5221f7ac13b3d17af642fbc2f5761b98ed5e4a51d02bb0105fe98/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e7578656f2f6e7578656f2d7068702d636c69656e74)](https://camo.githubusercontent.com/1b3b9b6f6ac5221f7ac13b3d17af642fbc2f5761b98ed5e4a51d02bb0105fe98/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e7578656f2f6e7578656f2d7068702d636c69656e74)

[![Dependencies checks](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/dependencies_check.yml/badge.svg)](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/dependencies_check.yml)[![Unit tests](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/unit_tests.yml)[![Functional tests](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/ftests.yml/badge.svg)](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/ftests.yml)[![Integration tests](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/integration_tests.yml/badge.svg)](https://github.com/nuxeo/nuxeo-php-client/actions/workflows/integration_tests.yml)

[![Quality Gate Status](https://camo.githubusercontent.com/54d6afac8fad1be5e62076d7bfca185cc75a7cd3dd5dd7116d1fd6d31a449c99/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)[![Security Rating](https://camo.githubusercontent.com/e59e2931d58a3c39368fa7a60a583aa01ff3d1c269aecf1d32ee6e231c80da9f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)[![Maintainability Rating](https://camo.githubusercontent.com/3d6a94c9b4e4389f2b42541ba2303440635ac03139d0eb43544e092b1230b586/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)[![Reliability Rating](https://camo.githubusercontent.com/6e16cc3b1f983d6b1aa6a04e799bf78e6963494537537e0c0e196a3a52d57e13/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)[![Coverage](https://camo.githubusercontent.com/6b087bbb12438f832d0bd74c097846e954843863a09493fdc55e3d5958019a80/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)[![Vulnerabilities](https://camo.githubusercontent.com/81c230593d2ea218cc552bc60f2a4468d24aa824668a384e7635bd6fec85158d/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6f72672e6e7578656f2533416e7578656f2d7068702d636c69656e74266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/dashboard?id=org.nuxeo%3Anuxeo-php-client)

Nuxeo PHP Client
================

[](#nuxeo-php-client)

The Nuxeo PHP Client is a PHP client library for Nuxeo Rest API.

This is supported by Nuxeo and compatible with Nuxeo LTS 2015 and latest Fast Tracks.

Code
====

[](#code)

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

[](#requirements)

- [![Packagist PHP Version Support](https://camo.githubusercontent.com/866a7c5c3deb5edec8aae0c39aa3d88ce8e899fe8e6a2cf229ae4ab817017b71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e7578656f2f6e7578656f2d7068702d636c69656e74)](https://camo.githubusercontent.com/866a7c5c3deb5edec8aae0c39aa3d88ce8e899fe8e6a2cf229ae4ab817017b71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e7578656f2f6e7578656f2d7068702d636c69656e74)
- [Composer](https://getcomposer.org/)

Stuck with an old PHP version ? Have a look at [v1.5](https://github.com/nuxeo/nuxeo-php-client/tree/1.5), it offers limited but effective support and requires PHP 5.3+

Getting Started
---------------

[](#getting-started)

### Server

[](#server)

- [Download a Nuxeo server](http://www.nuxeo.com/en/downloads) (the zip version)
- Unzip it
- Linux/Mac:

    - `NUXEO_HOME/bin/nuxeoctl start`
- Windows:

    - `NUXEO_HOME\bin\nuxeoctl.bat start`
- From your browser, go to `http://localhost:8080/nuxeo`
- Follow Nuxeo Wizard by clicking 'Next' buttons, re-start once completed
- Check Nuxeo correctly re-started `http://localhost:8080/nuxeo`

    - username: Administrator
    - password: Administrator

### Library import

[](#library-import)

Download the latest build [Nuxeo PHP Client main](https://github.com/nuxeo/nuxeo-php-client/archive/main.zip).

Download the latest stable [![GitHub release (latest SemVer)](https://camo.githubusercontent.com/cffe5ac91823cbfa8452f60271f0c9798fcd52091b9b1619ff62d607509946c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e7578656f2f6e7578656f2d7068702d636c69656e74)](https://camo.githubusercontent.com/cffe5ac91823cbfa8452f60271f0c9798fcd52091b9b1619ff62d607509946c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e7578656f2f6e7578656f2d7068702d636c69656e74).

Composer:

```
  "require": {
    "nuxeo/nuxeo-php-client": "~2.0"
  }

```

### Usage

[](#usage)

#### Creating a Client

[](#creating-a-client)

The following documentation and samples applies for the 1.5 and newer versions. Calls to the Automation API for previous versions of the client will require adjustments.

For a given `url`:

```
$url = 'http://localhost:8080/nuxeo';
```

And given credentials:

```
use Nuxeo\Client\NuxeoClient;

$client = new NuxeoClient($url, 'Administrator', 'Administrator');
```

##### Options

[](#options)

Options can be set on client or API objects. This ensure inheritance and isolation of options on the object whose options are applied. As it, the client gives its options to API objects.

```
// To define global schemas, global enrichers and global headers in general
$client = $client->schemas("dublincore", "common")
  ->enrichers('document', ['acls'])
```

```
// For defining all schemas
$client = $client->schemas("*");
```

```
// For changing authentication method

use Nuxeo\Client\Auth\PortalSSOAuthentication;
use Nuxeo\Client\Auth\TokenAuthentication;

// PortalSSOAuthentication with nuxeo-platform-login-portal-sso
$client = $client->setAuthenticationMethod(new PortalSSOAuthentication($secret, $username));

// TokenAuthentication
$client = $client->setAuthenticationMethod(new TokenAuthentication($token));

// OAuth2Authentication
// The PHP client doesn't implement OAuth2 authorization flow as
// it depends completely on the architecture choices of your app.
// To help understanding and implement, please find a sample SF4 app under intergation/oauth2.
// Once the authorization flow is ready and you have an access token,
// you can use the OAuth2Authentication in the PHP client:
$client = $client->setAuthenticationMethod(new OAuth2Authentication($accessToken));
```

#### APIs

[](#apis)

##### Automation API

[](#automation-api)

To use the Automation API, `Nuxeo\Client\NuxeoClient#automation()` is the entry point for all calls:

```
// Fetch the root document
$result = $client->automation('Repository.GetDocument')->param("value", "/")->execute();
// Type auto-detected and cast as Nuxeo\Client\Objects\Document
```

```
// Execute query
$operation = $client->automation('Repository.Query')->param('query', 'SELECT * FROM Document');
$result = $operation->execute();
// Type auto-detected and cast as Nuxeo\Client\Objects\Documents
```

```
use Nuxeo\Client\Objects\Blob\Blob;
use Nuxeo\Client\Objects\Blob\Blobs;

// To upload|download blob(s)

$fileBlob = Blob::fromFile('/local/file.txt', 'text/plain');
$blob = $client->automation('Blob.AttachOnDocument')->param('document', '/folder/file')->input($fileBlob)->execute(Blob::class);

$inputBlobs = new Blobs();
$inputBlobs->add('/local/file1.txt', 'text/plain');
$inputBlobs->add('/local/file2.txt', 'text/plain');
$blobs = $client->automation('Blob.AttachOnDocument')->param('xpath', 'files:files')->param('document', '/folder/file')->input($inputBlobs)->execute(Blobs::class);

$resultBlob = $client->automation('Document.GetBlob')->input('folder/file')->execute(Blob::class);
```

```
use Nuxeo\Client\Objects\Document;

class MyBusinessClass extends Nuxeo\Client\Objects\Document {
      ...
}

// Unserialize document in a custom class
$operation = $client->automation('Document.Fetch')->param('value', '0fa9d2a0-e69f-452d-87ff-0c5bd3b30d7d');
$result = $operation->execute(MyBusinessClass::class);
```

```
use Nuxeo\Client\Objects\Document;
use Nuxeo\Client\Objects\Operation\DocRef;

// Enforce type of a property
$doc = $client->automation('Document.Fetch')->param('value', '0fa9d2a0-e69f-452d-87ff-0c5bd3b30d7d')->execute(Document::class);
$property = $doc->getProperty('custom:related', DocRef::class);
```

##### Repository API

[](#repository-api)

```
// Fetch the root document
$document = $client->repository()->fetchDocumentRoot();
```

```
// Fetch document by path
$document = $client->repository()->fetchDocumentByPath('/folders_2');
```

```
// Create a document
$document = Objects\Document::create()
  ->setProperty('dc:title', 'Some title');
```

```
// Update a document
$repository = $client->repository();
$document = $repository->fetchDocumentByPath('/note_0');
document->setPropertyValue("dc:title", "note updated");
$repository->updateDocumentByPath('/note_0', $document);
```

```
// Delete a document
$client->repository()->deleteDocumentByPath('/note_2');
```

##### Users/Groups

[](#usersgroups)

```
// Get current user used to connect to Nuxeo Server
/** @var \Nuxeo\Client\Objects\User\User $user */
$user = $client->userManager()->fetchCurrentUser();
```

```
// Create User
$userManager->createUser((new User())
      ->setUsername('my_login')
      ->setCompany('Nuxeo')
      ->setEmail('user@company.com')
      ->setFirstName('Thomas A.')
      ->setLastName('Anderson')
      ->setPassword('passw0rd'));
```

```
//Update user
$userManager->updateUser($user);
```

```
//Attach user to group
$userManager->attachGroupToUser('username', 'group_name');
$userManager->attachUserToGroup('group_name', 'username');
```

##### Workflows

[](#workflows)

```
// Fetch current user workflow tasks
/** @var \Nuxeo\Client\Objects\Workflow\Tasks $tasks */
$tasks = $client->workflows()->fetchTasks();
```

#### Errors/Exceptions

[](#errorsexceptions)

The main exception type is `Nuxeo\Client\Spi\NuxeoClientException` and contains:

- The HTTP error status code (666 for internal errors)
- An info message

Docker
------

[](#docker)

We provide a [docker-compose.yml](https://github.com/nuxeo/nuxeo-php-client/blob/master/docker-compose.yml) for quick testing

Just install docker-compose and run `docker-compose up`, you'll have a nuxeo running on  and nginx on

You can access the samples with  for example.

Contributing / Reporting issues
===============================

[](#contributing--reporting-issues)

We are glad to welcome new developers, and even simple usage feedback is great

- Ask your questions on
- Report issues on this GitHub repository (see [issues link](https://github.com/nuxeo/nuxeo-php-client/issues) on the right)

License
=======

[](#license)

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

About Nuxeo
===========

[](#about-nuxeo)

The [Nuxeo Platform](http://www.nuxeo.com/products/content-management-platform/) is an open source customizable and extensible content management platform for building business applications. It provides the foundation for developing [document management](http://www.nuxeo.com/solutions/document-management/), [digital asset management](http://www.nuxeo.com/solutions/digital-asset-management/), [case management application](http://www.nuxeo.com/solutions/case-management/) and [knowledge management](http://www.nuxeo.com/solutions/advanced-knowledge-base/). You can easily add features using ready-to-use addons or by extending the platform using its extension point system.

The Nuxeo Platform is developed and supported by Nuxeo, with contributions from the community.

Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at [www.nuxeo.com](http://www.nuxeo.com).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance48

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 67.6% 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 ~149 days

Recently: every ~109 days

Total

17

Last Release

1517d ago

Major Versions

1.5.0 → 2.0.02018-05-30

1.5.x-dev → 2.0.12021-02-16

2.1.1 → 3.0.02022-04-29

PHP version history (3 changes)1.0.0PHP &gt;=5.3.2

2.0.0PHP ~7.1

3.0.0PHP ~7.2 || ~8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/715479?v=4)[Pierre-Gildas MILLON](/maintainers/pgmillon)[@pgmillon](https://github.com/pgmillon)

---

Top Contributors

[![pgmillon](https://avatars.githubusercontent.com/u/715479?v=4)](https://github.com/pgmillon "pgmillon (100 commits)")[![AGallouin](https://avatars.githubusercontent.com/u/638298?v=4)](https://github.com/AGallouin "AGallouin (35 commits)")[![ldoguin](https://avatars.githubusercontent.com/u/608902?v=4)](https://github.com/ldoguin "ldoguin (5 commits)")[![loopingz](https://avatars.githubusercontent.com/u/3437026?v=4)](https://github.com/loopingz "loopingz (3 commits)")[![mhetru](https://avatars.githubusercontent.com/u/11898775?v=4)](https://github.com/mhetru "mhetru (2 commits)")[![fredgess](https://avatars.githubusercontent.com/u/5979646?v=4)](https://github.com/fredgess "fredgess (1 commits)")[![sfermigier](https://avatars.githubusercontent.com/u/271079?v=4)](https://github.com/sfermigier "sfermigier (1 commits)")[![troger](https://avatars.githubusercontent.com/u/116786?v=4)](https://github.com/troger "troger (1 commits)")

---

Tags

clientautomationnuxeo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nuxeo-nuxeo-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/nuxeo-nuxeo-php-client/health.svg)](https://phpackages.com/packages/nuxeo-nuxeo-php-client)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67210.4M25](/packages/googleads-googleads-php-lib)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15311.8M36](/packages/magento-magento2-functional-testing-framework)

PHPackages © 2026

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