opensky/runtime-config-bundle
OpenSky RuntimeConfigBundle lets Symfony applications manage configuration at runtime, enabling settings to change without redeploying. It integrates with Symfony’s configuration system and supports editable, database-backed runtime values.
~2.x project):
composer require opensky/runtime-config-bundle
app/AppKernel.php:
new OpenSky\Bundle\RuntimeConfigBundle\OpenSkyRuntimeConfigBundle(),
opensky_runtime_config in app/config/config.yml. Pick where values live:
Resources/config/runtime.yml) for small overrides, orDependencyInjection/ first. The extension is where the provider service id and parameter names are wired; the boot-time listener is where values are pushed into the container. Those two files tell you exactly which service ids and config keys your version supports.site_name / maintenance_mode setting stored in the DB and edited from an admin controller, consumed in a controller or Twig global — no redeploy or cache clear needed when the value changes.$container->getParameter('site_name') or through the bundle's runtime config service. This is the core value proposition: marketing/ops change a value in the UI, the next request sees it.Settings/RuntimeConfig service that reads the parameter bag on each call, or via a Twig extension/global, rather than through constructor %param% arguments.feature_x_enabled) and branch in controllers or listeners. Cast string values from the DB to the expected type before using them.test environment, swap the provider for a YAML fixture provider so integration tests are deterministic and don't need a settings table.%param% references in service definitions are baked in at compile time. Runtime injection only affects parameters read after boot via getParameter() or the bundle's service. Design around that instead of fighting it.kernel.boot listener. If your own boot listener reads settings, make sure it runs after the runtime config listener (adjust listener priority), or you'll read stale/default values.cache:clear, assets:install, and other console commands — may try to connect. Guard against a missing/unmigrated table and fall back to defaults so installs and CLI don't explode.prod with the cache warm.'0' is truthy in PHP. Cast to bool/int/array explicitly in your settings service.debug:container and exception dumps — don't put API keys there. Prefer environment variables for secrets.$container->getParameterBag()->all()) or run debug:container --parameters to confirm what was injected; check that your provider service is actually the one the extension registered.%env()%, secrets, feature-flag bundles) are the better long-term answer — treat this package as a stopgap, and isolate access behind your own Settings interface so you can swap it out later.How can I help you explore Laravel packages today?