Closed
Description
I have goe a ruleset.xml file with this line :
<arg name="tab-width" value="4"/>
If il load the Config twice, they will not both have this rule : the first yes, the second not :
$config1 = new Config();
$ruleset = new Ruleset($config);
$ruleset->populateTokenListeners();
// the tabWidth configuration is set to 4 : everything is ok
// here Config::$overriddenDefaults['tab-width'] is set to tue
$config2 = new Config();
$ruleset = new Ruleset($config);
$ruleset->populateTokenListeners();
// with $overriddenDefaults['tab-width'] set to true, the tabWidth configuration becomes 0 : BAD
I patched it with this one, but it is a dirty patch to ensure my Config object initializes always the same way :
// (...)
$property = new ReflectionProperty(Config::class, 'overriddenDefaults');
$property->setAccessible(true);
$property->setValue([]);
$property->setAccessible(false);
$config2 = new Config();
// everything will be alright now
Metadata
Metadata
Assignees
Labels
No labels