mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT 2x increase in scanning of files for ConfigManifest
This commit is contained in:
parent
322d3e18fd
commit
085c8f5a43
@ -165,6 +165,10 @@ pair in the mask is removed
|
||||
|
||||
## Configuration YAML Syntax and Rules
|
||||
|
||||
<div class="alert" markdown="1">
|
||||
As of Silverstripe 4, YAML files can no longer be placed any deeper than 2 directories deep. As this was an unintended bug, this change will only affect you if you nest your modules deeper than the top level of your project.
|
||||
</div>
|
||||
|
||||
Each module can have a directory immediately underneath the main module directory called `_config/`. Inside this
|
||||
directory you can add YAML files that contain values for the configuration system.
|
||||
|
||||
|
@ -244,7 +244,9 @@ class ConfigManifest
|
||||
'min_depth' => 0,
|
||||
'name_regex' => '/(^|[\/\\\\])_config.php$/',
|
||||
'ignore_tests' => !$includeTests,
|
||||
'file_callback' => array($this, 'addSourceConfigFile')
|
||||
'file_callback' => array($this, 'addSourceConfigFile'),
|
||||
// Cannot be max_depth: 1 due to "/framework/admin/_config.php"
|
||||
'max_depth' => 2
|
||||
));
|
||||
$finder->find($this->base);
|
||||
|
||||
@ -252,7 +254,8 @@ class ConfigManifest
|
||||
$finder->setOptions(array(
|
||||
'name_regex' => '/\.ya?ml$/',
|
||||
'ignore_tests' => !$includeTests,
|
||||
'file_callback' => array($this, 'addYAMLConfigFile')
|
||||
'file_callback' => array($this, 'addYAMLConfigFile'),
|
||||
'max_depth' => 2
|
||||
));
|
||||
$finder->find($this->base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user