PHPackages                             wemakecustom/symfony-app-loader - 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. wemakecustom/symfony-app-loader

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

wemakecustom/symfony-app-loader
===============================

Composer script handling your ignored app\_loader.ini file

v2.0(10y ago)21.1k1MITPHPPHP &gt;=5.3.3

Since Jan 3Pushed 10y ago6 watchersCompare

[ Source](https://github.com/wemakecustom/symfony-app-loader)[ Packagist](https://packagist.org/packages/wemakecustom/symfony-app-loader)[ Docs](https://github.com/wemakecustom/symfony-app-loader)[ RSS](/packages/wemakecustom-symfony-app-loader/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Unified front controller for Symfony.
=====================================

[](#unified-front-controller-for-symfony)

This package provides a unified front controller for Symfony, merging all the options into a single AppLoader. The options are all overridable using a custom front controller or extending the AppLoader.

This tool uses a script that will ask for your parameters when running composer install or update, very similar to incenteev/composer-parameter-handler.

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

[](#installation)

Add the following in your root composer.json file:

```
{
    "require": {
        "wemakecustom/symfony-app-loader": "~1.0@dev"
    },
    "scripts": {
        "post-install-cmd": [
            "WMC\\AppLoader\\ScriptHandler::buildParameters",
        ],
        "post-update-cmd": [
            "WMC\\AppLoader\\ScriptHandler::buildParameters",
        ]
    }
}
```

Replace `web/app.php` with the one in this package. See the section **Overridding options using front controllers** for more details.

Replace `app/console` with the one in this package.

Ignore your ini file in .gitignore:

```
/app/config/app_loader.ini

```

Composer script configuration
-----------------------------

[](#composer-script-configuration)

### Different file and dist file

[](#different-file-and-dist-file)

The `app/config/app_loader.ini` will then be created or updated by the composer script, to match the structure of the dist file `app/config/app_loader.ini.dist`by asking you the missing parameters. If no `app/config/app_loader.ini.dist`is available in your Symfony installation, it will use a default one.

By default, the dist file is assumed to be in the same place than the parameters file, suffixed by `.dist`. This can be changed in the configuration:

```
{
    "extra": {
        "wmc-app-loader": {
            "file": "app/config/app_loader.ini",
            "dist-file": "some/other/folder/to/other/parameters/file/app_loader.ini.dist"
        }
    }
}
```

### Keep outdated parameters

[](#keep-outdated-parameters)

The script handler will ask you interactively for parameters which are missing in the parameters file, using the value of the dist file as default value. All prompted values are parsed as inline INI, to allow you to define `true`, `false` or numbers easily. If composer is run in a non-interactive mode, the values of the dist file will be used for missing parameters.

Warning: This script removes outdated params from `app_loader.ini` which are not in `app_loader.ini.dist`. If you need to keep outdated params you can use `keep-outdated` param in the configuration:

```
{
    "extra": {
        "wmc-app-loader": {
            "keep-outdated": true,
        }
    }
}
```

### Using environment variables to set the parameters

[](#using-environment-variables-to-set-the-parameters)

For your prod environment, using an interactive prompt may not be possible when deploying. In this case, you can rely on environment variables to provide the parameters. This is achieved by providing a map between environment variables and the parameters they should fill:

```
{
    "extra": {
        "wmc-app-loader": {
            "env-map": {
                "my_first_param": "MY_FIRST_PARAM",
                "my_second_param": "MY_SECOND_PARAM"
            }
        }
    }
}
```

If an environment variable is set, its value will always replace the value set in the existing parameters file.

As environment variables can only be strings, they are also parsed as inline INI values to allows specifying `false`, `true` or numbers easily.

Warning: This parameters handler will overwrite any comments or spaces into your app\_loader.ini file so handle with care. So if you want to give format and comments to your parameter's file you should do it on your dist version.

Customizing behavior
--------------------

[](#customizing-behavior)

### Overridding options using front controllers

[](#overridding-options-using-front-controllers)

You can find the standard controllers in `web/app*.php`. It is a good idea to copy them all for a development configuration. While not strictly required, it may be good to leave only web/app.php in a production environment.

As you can see in the examples, you can override any option after instantiating the AppLoader, but before `$app_loader->run();`

Available options are:

- `environment`: (dev|test|prod)
- `debug`: (true|false) guessed automatically on environment == dev
- `http_cache`: (true|false) whether or not to use Symfony HTTP reverse proxy
- `localhost_only`: (true|false) whether or not to limit request to localhost when in dev mode
- `umask_fix`: (true|false) whether or not to change the umask to 0000
- `apc_cache_id`: (false|string) if a valid string, use this as an APC id for the caches

### Overridding behavior by extending AppLoader

[](#overridding-behavior-by-extending-apploader)

The provided AppLoader is fully overridable. You can extend it and modify your fron controllers to use yours instead. See sample/AppLoader for an example.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 64.5% 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.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~181 days

Total

10

Last Release

3764d ago

Major Versions

v1.1.4 → v2.02016-03-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec3a0e0db3f9c250563b821407537b24bd3304c8bb3379c017d8ca4743b7b15c?d=identicon)[lavoiesl](/maintainers/lavoiesl)

---

Top Contributors

[![lemoinem](https://avatars.githubusercontent.com/u/234992?v=4)](https://github.com/lemoinem "lemoinem (20 commits)")[![lavoiesl](https://avatars.githubusercontent.com/u/1216046?v=4)](https://github.com/lavoiesl "lavoiesl (11 commits)")

---

Tags

parameters management

### Embed Badge

![Health badge](/badges/wemakecustom-symfony-app-loader/health.svg)

```
[![Health](https://phpackages.com/badges/wemakecustom-symfony-app-loader/health.svg)](https://phpackages.com/packages/wemakecustom-symfony-app-loader)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[yceruto/formflow-bundle

Create and manage multistep forms

2414.8k](/packages/yceruto-formflow-bundle)

PHPackages © 2026

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