PHPackages                             setono/variable-resolver - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. setono/variable-resolver

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

setono/variable-resolver
========================

Replace variables in strings with real values

10[1 PRs](https://github.com/Setono/variable-resolver/pulls)PHP

Since May 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Setono/variable-resolver)[ Packagist](https://packagist.org/packages/setono/variable-resolver)[ RSS](/packages/setono-variable-resolver/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Variable Resolver - Replace variables in strings with real values
=================================================================

[](#variable-resolver---replace-variables-in-strings-with-real-values)

[![Latest Version](https://camo.githubusercontent.com/8f23e6ef0e6fac2575b6ed5ed1da9eec00f840882b02b8a9e998baeb2849ca05/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f7661726961626c652d7265736f6c7665722f762f737461626c65)](https://packagist.org/packages/setono/variable-resolver)[![Latest Unstable Version](https://camo.githubusercontent.com/1d62b1cb3b8eb101c9da40d2339e3c03e47ff663f98d5bbdc2c090fee270240f/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f7661726961626c652d7265736f6c7665722f762f756e737461626c65)](https://packagist.org/packages/setono/variable-resolver)[![Software License](https://camo.githubusercontent.com/4f50ba56d54a0995107bd7d3f7b36394c959880120a78e54399876aa053cfff6/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f7661726961626c652d7265736f6c7665722f6c6963656e7365)](LICENSE)[![Build Status](https://github.com/Setono/variable-resolver/workflows/build/badge.svg)](https://github.com/Setono/variable-resolver/actions)[![Coverage Status](https://camo.githubusercontent.com/06e91f8824fbc0ebf304e9f41e1e73e6011f861b287215c678e59315ebf69288/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5365746f6e6f2f7661726961626c652d7265736f6c7665722e737667)](https://scrutinizer-ci.com/g/Setono/variable-resolver/code-structure)[![Quality Score](https://camo.githubusercontent.com/bccc0b69af5d2ab878067d59a5cf4c52d52e32a41e21dae3317790ae290abf9a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5365746f6e6f2f7661726961626c652d7265736f6c7665722e737667)](https://scrutinizer-ci.com/g/Setono/variable-resolver)

This is a library that replaces variables like `%PHP%` or `%APP_ENV%` with their real values. This is typically used for deployment purposes.

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

[](#installation)

```
$ composer require setono/variable-resolver
```

Basic usage
-----------

[](#basic-usage)

```
use Setono\VariableResolver\VariableResolver;
use Setono\VariableResolver\Parser\PercentageWrappingParser;
use Setono\VariableResolver\Variable\Value\PhpBinValue;

$str = '%PHP% bin/console run:command';

$variableResolver = new VariableResolver(new PercentageWrappingParser());
$variableResolver->addValue('PHP', new PhpBinValue());

echo $variableResolver->resolve($str); // output: /usr/bin/php bin/console run:command
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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://avatars.githubusercontent.com/u/2412177?v=4)[Joachim Løvgaard](/maintainers/loevgaard)[@loevgaard](https://github.com/loevgaard)

---

Top Contributors

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

---

Tags

deploymentphp

### Embed Badge

![Health badge](/badges/setono-variable-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/setono-variable-resolver/health.svg)](https://phpackages.com/packages/setono-variable-resolver)
```

###  Alternatives

[in2code/in2publish_core

Content publishing extension to connect stage and production server

40143.4k](/packages/in2code-in2publish-core)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4778.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

106.6k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

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