PHPackages                             s1lver/yii2-etcd - 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. s1lver/yii2-etcd

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

s1lver/yii2-etcd
================

Yii2 etcd component

1.1.0(2y ago)038[1 PRs](https://github.com/s1lver/yii2-etcd/pulls)BSD-3-ClausePHPPHP ^8.0CI passing

Since Apr 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/s1lver/yii2-etcd)[ Packagist](https://packagist.org/packages/s1lver/yii2-etcd)[ RSS](/packages/s1lver-yii2-etcd/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (12)Used By (0)

Yii2 etcd component
===================

[](#yii2-etcd-component)

[![Latest Stable Version](https://camo.githubusercontent.com/2d32257324abc8e73d7545cd58a4b621bfd3b2c22eefdcee71bf8b2d60171f89/68747470733a2f2f706f7365722e707567782e6f72672f73316c7665722f796969322d657463642f762f737461626c652e737667)](https://packagist.org/packages/s1lver/yii2-etcd)[![Total Downloads](https://camo.githubusercontent.com/5dac9e98cc0ec01ad2d2971f2387f314df031ca30148e4ab23820756b087478e/687474703a2f2f706f7365722e707567782e6f72672f73316c7665722f796969322d657463642f646f776e6c6f616473)](https://packagist.org/packages/s1lver/yii2-etcd)[![Reliability Rating](https://camo.githubusercontent.com/df874bed4730ff1f693afffb5947c5f07930917f6f837f439a0d791541bbbd80/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d73316c7665725f796969322d65746364266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=s1lver_yii2-etcd)[![Security Rating](https://camo.githubusercontent.com/ca57fa7bbf1a3ea754a304c690ba41a122dd22b72a7d8904c63d9c2b507c96c2/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d73316c7665725f796969322d65746364266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=s1lver_yii2-etcd)[![Maintainability Rating](https://camo.githubusercontent.com/cb2c708c0d923515a0f2b7109a0a7d57bb7f678171e5d3a979bf47bbc9b00582/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d73316c7665725f796969322d65746364266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=s1lver_yii2-etcd)[![Coverage](https://camo.githubusercontent.com/c6aba4fbcf9a96e5017e1a99d73f8f785850d230f391598adb13602991eca9fd/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d73316c7665725f796969322d65746364266d65747269633d636f766572616765)](https://sonarcloud.io/summary/new_code?id=s1lver_yii2-etcd)

Interaction component with `etcd` (A distributed, reliable key-value store for the most critical data of a distributed system) for `Yii2 Framework`.

Required
--------

[](#required)

- PHP: &gt;= 8.2
- `grpc`, `protobuf` - for RPC

Install
-------

[](#install)

```
composer require s1lver/yii2-etcd "^1.0.0"
```

or add

```
"s1lver/yii2-etcd": "^1.0.0"

```

to the require section of your composer.json file.

Supported etcd API version
--------------------------

[](#supported-etcd-api-version)

- v3

Supported etcd methods
----------------------

[](#supported-etcd-methods)

### Main

[](#main)

- `version`

### KV

[](#kv)

- `range`
- `put`

### Auth

[](#auth)

- `authenticate`

How to use
----------

[](#how-to-use)

Configure

```
$config = [
    'components' => [
        'etcd' => [
            'class' => \S1lver\Etcd\Etcd::class,
            'host' => 'etcd:2379',
            'user' => 'username',
            'password' => 'password',
        ],
    ],
];
```

Get key value

```
Yii::$app->etcd->getKey('hello')->firstKeyValue;

// Hello
```

Get etcd version

```
Yii::$app->etcd->version;

// {"etcdserver":"3.5.8","etcdcluster":"3.5.0"}
```

### Switch between supported protocol

[](#switch-between-supported-protocol)

> etcd v3 uses gRPC for its messaging protocol. For languages with no gRPC support, etcd provides a JSON gRPC gateway. This gateway serves a RESTful proxy that translates HTTP/JSON requests into gRPC messages.

```
$config = [
    'components' => [
        'etcd' => [
            'class' => \S1lver\Etcd\Etcd::class,
            ...
            'protocol' => '\S1lver\Etcd\EtcdProtocol::GRPC', // Default value \S1lver\Etcd\EtcdProtocol::HTTP
        ],
    ],
];
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance59

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.7% 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 ~5 days

Total

8

Last Release

1083d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fd42158975c75cf3cde65675178ac1b4abdb666d6f172e79e933aa6e6a37059?d=identicon)[s1lver](/maintainers/s1lver)

---

Top Contributors

[![s1lver](https://avatars.githubusercontent.com/u/4567634?v=4)](https://github.com/s1lver "s1lver (77 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

etcdphp8yii2-extension

### Embed Badge

![Health badge](/badges/s1lver-yii2-etcd/health.svg)

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

###  Alternatives

[alibaba/nacos

阿里巴巴nacos配置中心php客户端

19340.8k1](/packages/alibaba-nacos)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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