Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

[DEPRECATED] Inlined in Rector/ECS directly as just 1 class

License

Notifications You must be signed in to change notification settings

deprecated-packages/symfony-php-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony PHP Config

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'),
            ]),
        ]]);
};

About

[DEPRECATED] Inlined in Rector/ECS directly as just 1 class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages