PHPackages                             datingvip/etcd-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. datingvip/etcd-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

datingvip/etcd-php
==================

Etcd client library for PHP

2373PHPCI passing

Since Jun 30Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/DatingVIP/etcd-php)[ Packagist](https://packagist.org/packages/datingvip/etcd-php)[ RSS](/packages/datingvip-etcd-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Etcd PHP Client
===============

[](#etcd-php-client)

etcd is a distributed configuration system, part of the coreos project.

This repository provides a client library for etcd for PHP applications. Inspired by [linkorb/etcd-php](https://github.com/linkorb/etcd-php). For our purpose, we need a more elastic version for etcd client. It can use with predefined HTTP client (no matter what it is) and also supports PHP 7.1.

The etcd-php uses curl library as a default client and creates own instance of http client.

Installating etcd
-----------------

[](#installating-etcd)

To install etcd, follow instructions that etcd team posts on Releases page of the project:

Installing DatingVIP/etcd
-------------------------

[](#installing-datingvipetcd)

Easiest way is to install it using composer:

```
{
    "require" : {
        "DatingVIP/etcd": "^1.0"
    }
}
```

Using Client
------------

[](#using-client)

```
use use DatingVIP\Component\Etcd\Client;

$client = new Client('http://127.0.0.1:4001');

// If you have own http client object & if it has proper adapter
// proper means - need to implement DatingVIP\Component\Etcd\Client\HttpInterface)
$httpAdapter = new MyAdapter($myHttpClient);
$client->setHttpClient($httpAdapter);

// Get, set, update, remove key
if (!$client->keyExists('/key/name')) {
    $client->keySet('/key/name', 'value');
}
$client->set('/key/name', 'value', 10); // Set TTL
print $client->keyGet('/key/name');

$client->keyUpdate('/key/name', 'new value');

$client->keyRemove('/key/name');

// Working with dirs
if (!$client->dirExists('/dir/path')) {
    $client->dirCreate('/dir/path');
}
$client->dirUpdate('/dir/path', 10); // Set TTL
$client->dirRemove('/dir/path');

// Get dir info
$client->dirInfo('/dir/path');

// List subdirectories
$client->dirList('/dir/path');
```

SSL
---

[](#ssl)

Client can be configured not to verify SSL peer:

```
$client = (new Client('https://127.0.0.1:4001'))->verifySslPeer(false);
```

as well as to use a custom CA file:

```
$client = (new Client('https://127.0.0.1:4001'))->verifySslPeer(true, '/path/to/ca/file');
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance61

Regular maintenance activity

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 84% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/725986?v=4)[Boris Momčilović](/maintainers/kornrunner)[@kornrunner](https://github.com/kornrunner)

---

Top Contributors

[![kornrunner](https://avatars.githubusercontent.com/u/725986?v=4)](https://github.com/kornrunner "kornrunner (42 commits)")[![pmiroslawski](https://avatars.githubusercontent.com/u/2961647?v=4)](https://github.com/pmiroslawski "pmiroslawski (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

etcdetcd-php

### Embed Badge

![Health badge](/badges/datingvip-etcd-php/health.svg)

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

PHPackages © 2026

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