This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Simple YAML config provider for Silex 1.3+

0.1 2016-01-12 22:20 UTC

This package is auto-updated.

Last update: 2021-06-08 07:34:43 UTC



A very simple YAML config provider for Silex 1.3+ allowing you to read your configuration in from YAML files.


The easiest mechanism is via composer. Add the provider to your composer.json:

    "require": {
        "ronanchilvers/silex-yaml-config-provider": "dev-master"


To register the service provider you can do something like this:

$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(

You can add the provider multiple times if you want to parse multiple files and the configuration will be merged together.

$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(
$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(

Services Exposed

The YamlConfigServiceProvider exposes the following services.

  • config - The parsed configuration data as an array