symplify / symfony-php-config
This package is abandoned and no longer maintained.
The author suggests using the symplify/package-builder package instead.
Tools that easy work with Symfony PHP Configs
10.0.24
2022-02-19 17:41 UTC
Requires
- php: >=8.0
- symfony/dependency-injection: ^5.4|^6.0
- symplify/package-builder: ^10.0.24
- symplify/symplify-kernel: ^10.0.24
Requires (Dev)
- phpstan/phpstan: ^1.4.6
- phpunit/phpunit: ^9.5
Conflicts
- symplify/amnesia: <10.0.24
- symplify/astral: <10.0.24
- symplify/autowire-array-parameter: <10.0.24
- symplify/coding-standard: <10.0.24
- symplify/composer-json-manipulator: <10.0.24
- symplify/config-transformer: <10.0.24
- symplify/console-color-diff: <10.0.24
- symplify/easy-ci: <10.0.24
- symplify/easy-coding-standard: <10.0.24
- symplify/easy-parallel: <10.0.24
- symplify/easy-testing: <10.0.24
- symplify/git-wrapper: <10.0.24
- symplify/latte-phpstan-compiler: <10.0.24
- symplify/markdown-diff: <10.0.24
- symplify/monorepo-builder: <10.0.24
- symplify/neon-config-dumper: <10.0.24
- symplify/php-config-printer: <10.0.24
- symplify/phpstan-extensions: <10.0.24
- symplify/phpstan-latte-rules: <10.0.24
- symplify/phpstan-rules: <10.0.24
- symplify/rule-doc-generator: <10.0.24
- symplify/rule-doc-generator-contracts: <10.0.24
- symplify/simple-php-doc-parser: <10.0.24
- symplify/skipper: <10.0.24
- symplify/smart-file-system: <10.0.24
- symplify/symfony-static-dumper: <10.0.24
- symplify/template-phpstan-compiler: <10.0.24
- symplify/vendor-patches: <10.0.24
This package is auto-updated.
Last update: 2022-02-19 19:03:32 UTC
README
Tools that easy work with Symfony PHP Configs.
Read How to Inline Value Object in Symfony PHP Config to learn more.TagValueNodeReprintTest
1. Install
composer require symplify/symfony-php-config
2. Usage
Do you want to use value objects in Symfony configs?
Use Symplify\SymfonyPhpConfig\ValueObjectInliner::inline() method:
use Rector\Generic\Rector\FuncCall\FuncCallToStaticCallRector; use Rector\Transform\ValueObject\FuncCallToStaticCall; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\SymfonyPhpConfig\ValueObjectInliner; return static function (ContainerConfigurator $containerConfigurator): void { $services = $containerConfigurator->services(); $services->set(FuncCallToStaticCallRector::class) ->call('configure', [[ FuncCallToStaticCallRector::FUNC_CALLS_TO_STATIC_CALLS => ValueObjectInliner::inline([ new FuncCallToStaticCall('dump', 'Tracy\Debugger', 'dump'), // it handles multiple items without duplicated call new FuncCallToStaticCall('d', 'Tracy\Debugger', 'dump'), new FuncCallToStaticCall('dd', 'Tracy\Debugger', 'dump'), ]), ]]); };