From 37dc0daacc11e5f7c7ce1dfd7b15660a07c1f0e1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 4 Aug 2022 11:36:27 +1200 Subject: [PATCH 1/2] API Remove deprecated ManifestFileFinder::RESOURCES_DIR const --- src/Core/Manifest/ManifestFileFinder.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Core/Manifest/ManifestFileFinder.php b/src/Core/Manifest/ManifestFileFinder.php index 75763e4ed65..f534469807c 100644 --- a/src/Core/Manifest/ManifestFileFinder.php +++ b/src/Core/Manifest/ManifestFileFinder.php @@ -25,11 +25,6 @@ class ManifestFileFinder extends FileFinder const TESTS_DIR = 'tests'; const VENDOR_DIR = 'vendor'; - /** - * @deprecated 4.4.0:5.0.0 Use global `RESOURCES_DIR` instead. - */ - const RESOURCES_DIR = RESOURCES_DIR; - protected static $default_options = [ 'include_themes' => false, 'ignore_tests' => true, From ee4144fc359d3a0226c19b33420ec4a8c0269f03 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 4 Aug 2022 11:36:54 +1200 Subject: [PATCH 2/2] ENH Set the default resources dir to "_resources" --- src/includes/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/constants.php b/src/includes/constants.php index 24968564d93..e0e720fe463 100644 --- a/src/includes/constants.php +++ b/src/includes/constants.php @@ -219,7 +219,7 @@ // Define the resource dir constant that will be use to exposed vendor assets if (!defined('RESOURCES_DIR')) { $project = new SilverStripe\Core\Manifest\Module(BASE_PATH, BASE_PATH); - $resourcesDir = $project->getResourcesDir() ?: 'resources'; + $resourcesDir = $project->getResourcesDir() ?: '_resources'; if (preg_match('/^[_\-a-z0-9]+$/i', $resourcesDir ?? '')) { define('RESOURCES_DIR', $resourcesDir); } else {