Search by

it-pack / configure-it-symfony

tidal

Symfony integration for ConfigureIt — a bundle + DI extension that wires the ConfigurationBuilder and exposes the resolved snapshot as a service.

Package info

github.com/it-pack/configure-it-symfony

pkg:composer/it-pack/configure-it-symfony

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.1 2026-11-03 00:42 UTC

This package is auto-updated.

Last update: 2026-11-04 00:01:13 UTC


README

Symfony integration for ConfigureIt.

Provides a bundle + DI extension that wires the ConfigurationBuilder from your bundle configuration and exposes the resolved, immutable ConfigurationSnapshotInterface as a service — ready to be injected anywhere.

Install

composer require it-pack/configure-it-symfony

Register the bundle

// config/bundles.php
return [
    // ...
    ItPack\ConfigureItSymfony\ConfigureItBundle::class => ['all' => true],
];

Configure

# config/packages/configure_it.yaml
configure_it:
  sources:
    - '%kernel.project_dir%/config/app'
  environment: '%kernel.environment%'
  # schema: App\Config\AppSchema   # optional Nette\Schema definition
  # cache: '%kernel.cache_dir%/configure-it'  # optional compiled artifact

Consume

use ItPack\ConfigureIt\Contract\ConfigurationSnapshotInterface;

final class StatusController
{
    public function __construct(
        private readonly ConfigurationSnapshotInterface $config,
    ) {}

    public function index(): Response
    {
        $name = $this->config->string('service.name');
        // ...
    }
}

The configured ConfigurationBuilder is also available as a public service (ItPack\ConfigureIt\Core\ConfigurationBuilder) for advanced callers.

Quality gates

composer analyse      # PHPStan level 9
composer cs:check     # php-cs-fixer
composer test:unit    # PHPUnit