Skip to content

Commit 03088fa

Browse files
committed
[dx] check only non-configurable rules
1 parent 43c1c8b commit 03088fa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Configuration/RectorConfigBuilder.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,12 @@ public function withRules(array $rules): self
787787
$this->rules = array_merge($this->rules, $rules);
788788

789789
// log all explicitly registered rules
790-
SimpleParameterProvider::addParameter(Option::ROOT_STANDALONE_REGISTERED_RULES, $rules);
790+
// we only check the non-configurable rules, as the configurable ones might override them
791+
$nonConfigurableRules = array_filter(
792+
$rules,
793+
fn (string $rule): bool => ! is_a($rule, ConfigurableRectorInterface::class)
794+
);
795+
SimpleParameterProvider::addParameter(Option::ROOT_STANDALONE_REGISTERED_RULES, $nonConfigurableRules);
791796

792797
return $this;
793798
}

0 commit comments

Comments
 (0)