PHPackages                             cubicmushroom-symfony/wildcard-config-loader-bundle - 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. cubicmushroom-symfony/wildcard-config-loader-bundle

ActiveLibrary

cubicmushroom-symfony/wildcard-config-loader-bundle
===================================================

Symfony bundle to include config files using wildcard patterns

011PHP

Since Mar 12Pushed 10y ago1 watchersCompare

[ Source](https://github.com/cubicmushroom/symfony-wildcard-config-loader-bundle)[ Packagist](https://packagist.org/packages/cubicmushroom-symfony/wildcard-config-loader-bundle)[ RSS](/packages/cubicmushroom-symfony-wildcard-config-loader-bundle/feed)WikiDiscussions develop Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Symfony Wildcard Config Loader Bundle
=====================================

[](#symfony-wildcard-config-loader-bundle)

This bundle provides an easy way to load in multiple config files using a glob pattern to match files.

Usage
-----

[](#usage)

To use the config loader, you need to update your AppKernel to add a new instance of \\CubicMushroom\\Symfony\\WildcardConfigLoaderBundle\\ConfigLoader as a config loader by overriding the AppKernel::getContainerLoader() method as follows...

```
use CubicMushroom\Symfony\WildcardConfigLoaderBundle\ConfigLoader;
use CubicMushroom\Symfony\WildcardConfigLoaderBundle\GlobFileLocator;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\DependencyInjection\ContainerInterface;

class AppKernel
{
    // ...

    /**
     * Add loader to load client config files (app/config/clients/*)
     *
     * @param ContainerInterface $container
     *
     * @return DelegatingLoader
     *
     * @throws RuntimeException
     */
    protected function getContainerLoader(ContainerInterface $container)
    {
        // Container must be an instance of ContainerBuilder
        if (!$container instanceof ContainerBuilder) {
            throw new \RuntimeException(
                sprintf(
                    'Expected loader to be instance of %s, but got %s',
                    ContainerBuilder::class,
                    get_class($container)
                )
            );
        }

        $cl = parent::getContainerLoader($container);

        // Add additional loader to the resolver
        $resolver = $cl->getResolver();

        if (!$resolver instanceof LoaderResolver) {
            throw new \RuntimeException(
                sprintf(
                    'Expected container to be instance of %s, but got %s',
                    LoaderResolver::class,
                    get_class($resolver)
                )
            );
        }

        $resolver->addLoader(new ConfigLoader($container, new GlobFileLocator([])));

        return $cl;
    }
}

```

Which files to handle
---------------------

[](#which-files-to-handle)

By default this config loader will handle any file strings containing an asterisk (\*). If you'd like to change which files the class handles, simply extends the class and override the supports() method.

Config values
-------------

[](#config-values)

Config values found in the files will be stored in array parameters. For example, yml config file content like this...

```
client:
    here:
        this: 123
        that: 456
    now:
        something: else

```

... would translate to the following parameters...

```
client = [
    'here' => [
        'this' => 123,
        'that' => 456,
    ],
    'something' => 'else',
]

```

This is using the details ConfigLoader::PARAMETER\_TYPE\_ARRAY option. You can change this if you prefer flat parameter, by calling the `setParameterOutput()` method with `ConfigLoader::FLAT` as the only argument.

```
client.here.this = 123
client.here.that = 456
client.now.something = else

```

### Overriding the default parameter storage

[](#overriding-the-default-parameter-storage)

If you'd like to override the default storing of the config variables you can extend the `ConfigLoader` class and override the setParameters() method.

###  Health Score

20

—

LowBetter than 16% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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/b156769d704438a2a9e79cd9f7b7a01c8a7b17a191b389469ae55de8f0c982a6?d=identicon)[ToG](/maintainers/ToG)

---

Top Contributors

[![toby-griffiths](https://avatars.githubusercontent.com/u/4817007?v=4)](https://github.com/toby-griffiths "toby-griffiths (24 commits)")

### Embed Badge

![Health badge](/badges/cubicmushroom-symfony-wildcard-config-loader-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/cubicmushroom-symfony-wildcard-config-loader-bundle/health.svg)](https://phpackages.com/packages/cubicmushroom-symfony-wildcard-config-loader-bundle)
```

PHPackages © 2026

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