59 $schema = $schemaSource->load();
62 foreach ( $schema[
'config-schema'] as $key => $sch ) {
63 if ( array_key_exists(
'default', $sch ) ) {
64 $defaults[$key] = $sch[
'default'];
68 $benches[
'DefaultSettings.php'] = [
69 'setup' =>
static function () {
71 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
73 'function' =>
static function () {
74 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
78 $benches[
'config-schema.php'] = [
79 'function' =>
function () {
80 $settingsBuilder = $this->newSettingsBuilder();
81 $settingsBuilder->load(
84 $settingsBuilder->apply();
88 $benches[
'config-schema.php + merge'] = [
89 'function' =>
function () use ( $defaults ) {
90 $settingsBuilder = $this->newSettingsBuilder();
93 $settingsBuilder->loadArray( [
'config' => $defaults ] );
94 $settingsBuilder->load(
97 $settingsBuilder->apply();
101 $benches[
'MainConfigSchema::class'] = [
102 'function' =>
function () {
103 $settingsBuilder = $this->newSettingsBuilder();
105 $settingsBuilder->apply();
109 $benches[
'DefaultSettings.php + SetupDynamicConfig.php'] = [
110 'function' =>
static function () {
111 $IP = MW_INSTALL_PATH;
112 include MW_INSTALL_PATH .
'/includes/DefaultSettings.php';
116 include MW_INSTALL_PATH .
'/includes/SetupDynamicConfig.php';
120 $benches[
'config-schema.php + finalize'] = [
121 'function' =>
function () {
122 $settingsBuilder = $this->newSettingsBuilder();
123 $settingsBuilder->load(
126 $settingsBuilder->enterRegistrationStage();
133 include MW_INSTALL_PATH .
'/includes/SetupDynamicConfig.php';
137 $this->bench( $benches );