PHPackages                             linkorb/hiera-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. linkorb/hiera-php

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

linkorb/hiera-php
=================

A PHP implementation of Hiera

3541PHP

Since Mar 30Pushed 11y ago3 watchersCompare

[ Source](https://github.com/linkorb/hiera-php)[ Packagist](https://packagist.org/packages/linkorb/hiera-php)[ RSS](/packages/linkorb-hiera-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Hiera implemented in PHP
========================

[](#hiera-implemented-in-php)

What is Hiera?
--------------

[](#what-is-hiera)

According to the [Hiera website](http://docs.puppetlabs.com/hiera/):

```
Hiera is a key/value lookup tool for configuration data.

```

Hiera uses a configurable hierarchy to enable "Cascading Configuration".

It's great for infrastructure configuration (which is why it's used in Puppet), but it also applies to multi-tenancy applications.

Hiera-PHP tries to be as much of a direct port as possible, maintaining support for original configuration files, and even internal classnames and interfaces.

Usage
-----

[](#usage)

hiera-php can be used both as a library, and as a console-tool

### Library

[](#library)

```
use Hiera\Hiera;
use Hiera\Scope;
use Hiera\ConfigLoader\YamlConfigLoader;

$scope = new Scope();
$scope->setVariable('::environment', 'production');
$scope->setVariable('::clientcert', 'web01.dc1.example.webx');
$scope->setVariable('::country', 'nl');
$hiera = new Hiera();
$loader = new YamlConfigLoader();
$loader->load($hiera, $path_to_hiera_yaml_file);

$key = 'some_configuration_key';
$answer = $hiera->lookup($key, '#default#', $scope);
```

### Console tool

[](#console-tool)

```
vendor/bin/hiera-php hiera:lookup some_configuration_key

```

Features
--------

[](#features)

- Supports loading original `hiera.yaml` files
- Supports pluggable backends
- Yaml backend included (supporting original configuration yaml files)
- Command line utility to perform lookups
- Embeddable as a library
- Json backend
- Database (PDO, Redis, etc) backends
- Memcached backend
- Array merge strategies

Contributions are very welcome!

License
-------

[](#license)

MIT (see [LICENSE.md](LICENSE.md))

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (4 commits)")

### Embed Badge

![Health badge](/badges/linkorb-hiera-php/health.svg)

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

###  Alternatives

[gherkins/regexpbuilderphp

PHP port of thebinarysearchtree/regexpbuilderjs

1.4k163.0k1](/packages/gherkins-regexpbuilderphp)[sunrise/vin

VIN decoder for PHP 7.1+ based on ISO-3779

83127.0k](/packages/sunrise-vin)[creocoder/yii2-translateable

The translateable behavior for the Yii framework

9967.7k5](/packages/creocoder-yii2-translateable)

PHPackages © 2026

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