56 $schema = $schemaSource->load();
59 foreach ( $schema[
'config-schema'] as $key => $sch ) {
60 if ( array_key_exists(
'default', $sch ) ) {
61 $defaults[$key] = $sch[
'default'];
65 $benches[
'DefaultSettings.php'] = [
66 'setup' =>
static function () {
68 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
70 'function' =>
static function () {
71 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
75 $benches[
'DefaultSettings.php + config-merge-strategies.php'] = [
76 'setup' =>
static function () {
78 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
80 'function' =>
function () {
81 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
82 $settingsBuilder = $this->newSettingsBuilder();
83 $settingsBuilder->load(
85 MW_INSTALL_PATH .
'/includes/config-merge-strategies.php'
88 $settingsBuilder->apply();
92 $benches[
'config-schema.php'] = [
93 'function' =>
function () {
94 $settingsBuilder = $this->newSettingsBuilder();
95 $settingsBuilder->load(
98 $settingsBuilder->apply();
102 $benches[
'config-schema.php + merge'] = [
103 'function' =>
function () use ( $defaults ) {
104 $settingsBuilder = $this->newSettingsBuilder();
107 $settingsBuilder->loadArray( [
'config' => $defaults ] );
108 $settingsBuilder->load(
111 $settingsBuilder->apply();
115 $benches[
'MainConfigSchema::class'] = [
116 'function' =>
function () {
117 $settingsBuilder = $this->newSettingsBuilder();
119 $settingsBuilder->apply();
123 $benches[
'DefaultSettings.php + SetupDynamicConfig.php'] = [
124 'function' =>
static function () {
125 $IP = MW_INSTALL_PATH;
126 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
130 include MW_INSTALL_PATH .
'/includes/SetupDynamicConfig.php';
134 $benches[
'config-schema.php + finalize'] = [
135 'function' =>
function () {
136 $settingsBuilder = $this->newSettingsBuilder();
137 $settingsBuilder->load(
140 $settingsBuilder->finalize();
147 include MW_INSTALL_PATH .
'/includes/SetupDynamicConfig.php';
151 $this->
bench( $benches );