Skip to content
PHP Ecosystem
Explore

IniMergeStrategy

API reference › Scaffold › Merge › IniMergeStrategy

final classPHPForge\Scaffold\Merge\IniMergeStrategy
ExtendsAbstractLineMergeStrategy
ImplementsMergeStrategy
Sourcesrc/Merge/IniMergeStrategy.php

Merges EditorConfig and INI files section by section; existing keys always keep the consumer value.

See also: https://spec.editorconfig.org/.

MethodDescriptionDefined by
merge()Adds the provider entries missing from the consumer.AbstractLineMergeStrategy
plan() protectedPlans missing preamble keys, missing keys inside existing sections and missing sections appended whole.IniMergeStrategy
protected function plan(list<string> $provider, list<string> $consumer): PHPForge\Scaffold\Merge\MergePlan

Plans missing preamble keys, missing keys inside existing sections and missing sections appended whole.

Parameters

ParameterTypeDescription
$providerlist<string>Provider lines.
$consumerlist<string>Consumer lines without terminators.

Returns

PHPForge\Scaffold\Merge\MergePlan: Lines to insert after a consumer line index and blocks to append; both empty when satisfied.