PHPackages                             symplify/php-config-printer - 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. symplify/php-config-printer

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

symplify/php-config-printer
===========================

Print Symfony services array with configuration to to plain PHP file format thanks to this simple php-parser wrapper

12.1.1(10mo ago)322.3M↓19.1%2[1 issues](https://github.com/symplify/php-config-printer/issues)MITPHPPHP &gt;=8.2CI passing

Since Aug 18Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/symplify/php-config-printer)[ Packagist](https://packagist.org/packages/symplify/php-config-printer)[ RSS](/packages/symplify-php-config-printer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (17)Versions (338)Used By (0)

PHP Config Printer
==================

[](#php-config-printer)

[![Downloads total](https://camo.githubusercontent.com/ff8fafbb808c3e1fc3887633011abf3188a87beeab42631c32357cd9d4779361/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f7068702d636f6e6669672d7072696e7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/php-config-printer/stats)

Print Symfony services array with configuration to to plain PHP file format using [nikic/php-parser](https://github.com/nikic/PHP-Parser)

Install
-------

[](#install)

```
composer require symplify/php-config-printer --dev
```

Register config in your services:

```
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\PhpConfigPrinter\ValueObject\PhpConfigPrinterConfig;

return static function (ContainerConfigurator $containerConfigurator): void {
    $containerConfigurator->import(PhpConfigPrinterConfig::FILE_PATH);
};
```

Use
---

[](#use)

### 1. Only Configured Services

[](#1-only-configured-services)

```
use Symplify\PhpConfigPrinter\Printer\SmartPhpConfigPrinter;

/** @var SmartPhpConfigPrinter $smartConfigPrinter */
$config = [
    'SomeService' => [
        'key' => 'value',
    ],
];

$smartConfigPrinter->printConfiguredServices($config);
```

### 2. Full Config

[](#2-full-config)

```
use Symplify\ConfigTransformer\Converter\YamlToPhpConverter;

class SomeClass
{
    /**
     * @var YamlToPhpConverter
     */
    private $yamlToPhpConverter;

    public function __construct(YamlToPhpConverter $yamlToPhpConverter)
    {
        $this->yamlToPhpConverter = $yamlToPhpConverter;
    }

    public function run(): void
    {
        $phpFileContent = $this->yamlToPhpConverter->convertYamlArray([
            'parameters' => [
                'key' => 'value',
            ],
            'services' => [
                '_defaults' => [
                    'autowire' => true,
                    'autoconfigure' => true,
                ],
            ],
        ]);

        // dump the $phpFileContent file
        // ...
    }
}
```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance54

Moderate activity, may be stable

Popularity49

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.2% 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 ~5 days

Recently: every ~44 days

Total

337

Last Release

307d ago

Major Versions

0.4.2 → 9.0.0-BETA22020-11-22

9.4.70 → 10.0.0-beta12021-11-02

10.3.3 → 11.0.02022-06-13

11.3.8 → 12.0.02025-01-18

PHP version history (7 changes)v0.3.27PHP ^7.2

v0.3.32PHP ^7.2|^8.0

0.3.34PHP &gt;=7.2

9.0.0-rc1PHP &gt;=7.3

v9.3.27PHP &gt;=8.0

11.1.11PHP &gt;=8.1

12.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (534 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (80 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (12 commits)")[![leoloso](https://avatars.githubusercontent.com/u/1981996?v=4)](https://github.com/leoloso "leoloso (1 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/symplify-php-config-printer/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-php-config-printer/health.svg)](https://phpackages.com/packages/symplify-php-config-printer)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)

PHPackages © 2026

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