Download the PHP package grasmash/yaml-expander without Composer
On this page you can find all versions of the php package grasmash/yaml-expander. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download grasmash/yaml-expander
More information about grasmash/yaml-expander
Files in grasmash/yaml-expander
Package yaml-expander
Short Description Expands internal property references in a yaml file.
License MIT
Informations about the package yaml-expander
This tool expands property references in YAML files.
Requirements
- PHP 8.1+
Installation
composer require grasmash/yaml-expander
Example usage:
Example dune.yml:
Property references use dot notation to indicate array keys, and must be wrapped in ${}.
Expansion logic:
Unresolvable placeholders are left intact (and reported to the logger).
Invalid YAML throws Symfony\Component\Yaml\Exception\ParseException, and
YAML that parses to a non-array value (e.g., a bare scalar) throws
UnexpectedValueException.
Security
Only parse YAML from trusted sources. Placeholder expansion can reference any
value in the document or reference array, including environment variables via
${env.*}, and deeply self-referencing placeholders can expand to very large
strings. This library is designed for trusted configuration files, not for
arbitrary user-supplied input.
Resultant array:
Development
Local development commands:
composer install
composer test # lint + unit tests + code sniffer
composer unit # PHPUnit only
composer cs # code sniffer only
composer cbf # auto-fix code style
composer coverage # generate clover coverage reportAll versions of yaml-expander with dependencies
grasmash/expander Version ^3.0.1
psr/log Version ^2 || ^3
symfony/yaml Version ^6.4.40 || ^7.4.12 || ^8.0.12