mergeModelConfig($config); return $this; } /** * Merges the given configuration into the builder's configuration. * * The builder's own configuration takes precedence for any overlapping settings, so that * explicitly configured values are never overwritten by defaults from another source. * * @since 1.4.0 * * @param ModelConfig $config The model configuration to merge. * @return void */ protected function mergeModelConfig(ModelConfig $config): void { // Merge arrays with builder config taking precedence $mergedArray = array_merge($config->toArray(), $this->modelConfig->toArray()); // Create new config from merged array $this->modelConfig = ModelConfig::fromArray($mergedArray); } }