mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Correctly deprecation Sources.module_priority (#10711)
This config was deprecated back in #7154 and hasn't been used since
This commit is contained in:
parent
277e97a84f
commit
66561ccb49
@ -26,6 +26,7 @@ class Sources implements Resettable
|
|||||||
*
|
*
|
||||||
* @config
|
* @config
|
||||||
* @var array
|
* @var array
|
||||||
|
* @deprecated 4.0.0 Use SilverStripe\Core\Manifest\ModuleManifest.module_priority instead
|
||||||
*/
|
*/
|
||||||
private static $module_priority = [];
|
private static $module_priority = [];
|
||||||
|
|
||||||
@ -36,15 +37,7 @@ class Sources implements Resettable
|
|||||||
*/
|
*/
|
||||||
public function getSortedModules()
|
public function getSortedModules()
|
||||||
{
|
{
|
||||||
$i18nOrder = Sources::config()->uninherited('module_priority');
|
|
||||||
$sortedModules = [];
|
$sortedModules = [];
|
||||||
if ($i18nOrder) {
|
|
||||||
Deprecation::notice('5.0', sprintf(
|
|
||||||
'%s.module_priority is deprecated. Use %s.module_priority instead.',
|
|
||||||
__CLASS__,
|
|
||||||
ModuleManifest::class
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (ModuleLoader::inst()->getManifest()->getModules() as $module) {
|
foreach (ModuleLoader::inst()->getManifest()->getModules() as $module) {
|
||||||
$sortedModules[$module->getName()] = $module->getPath();
|
$sortedModules[$module->getName()] = $module->getPath();
|
||||||
|
Loading…
Reference in New Issue
Block a user