symplify/symfony-php-config
最新稳定版本:10.0.24
Composer 安装命令:
composer require symplify/symfony-php-config
包简介
Tools that easy work with Symfony PHP Configs
README 文档
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'), ]), ]]); };
统计信息
- 总下载量: 1.55M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-26