From 5a786624aa13b9a275d6fdf48656d3bff71fe805 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 10 Sep 2016 11:13:23 +1200 Subject: [PATCH] FIX: Remove unnecessary manual includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Core.php can rely on composer’s autoloader now that classes are PSR-4 compliant. If you stuck to the core modules, you could even remove ClassLoader’s autoloader, but this would break any module that hasn’t been updated to support PSR-4, so I’ve left it in. In the future, it would be good to apply SilverStripe’s auto-loader only to those modules that aren’t coded to use PSR-4, as it would make class loading more predictable. --- Core/Core.php | 30 ------------------------------ ORM/{List.php => SS_List.php} | 0 2 files changed, 30 deletions(-) rename ORM/{List.php => SS_List.php} (100%) diff --git a/Core/Core.php b/Core/Core.php index 67e38671a..ff855db78 100644 --- a/Core/Core.php +++ b/Core/Core.php @@ -53,36 +53,6 @@ mb_regex_encoding('UTF-8'); */ gc_enable(); -// Include the files needed the initial manifest building, as well as any files -// that are needed for the boostrap process on every request. -require_once 'Core/Cache.php'; -require_once 'Core/CustomMethods.php'; -require_once 'Core/Extensible.php'; -require_once 'Core/Injector/Injectable.php'; -require_once 'Core/Config/Configurable.php'; -require_once 'Core/Object.php'; -require_once 'Core/ClassInfo.php'; -require_once 'Core/Config/DAG.php'; -require_once 'Core/Config/DAG_CyclicException.php'; -require_once 'Core/Config/DAG_Iterator.php'; -require_once 'Core/Config/Config.php'; -require_once 'View/TemplateGlobalProvider.php'; -require_once 'Control/Director.php'; -require_once 'Dev/Debug.php'; -require_once 'Dev/DebugView.php'; -require_once 'Dev/CliDebugView.php'; -require_once 'Dev/Backtrace.php'; -require_once 'Assets/FileFinder.php'; -require_once 'Core/Manifest/ManifestCache.php'; -require_once 'Core/Manifest/ClassLoader.php'; -require_once 'Core/Manifest/ConfigManifest.php'; -require_once 'Core/Manifest/ConfigStaticManifest.php'; -require_once 'Core/Manifest/ClassManifest.php'; -require_once 'Core/Manifest/ManifestFileFinder.php'; -require_once 'View/ThemeResourceLoader.php'; -require_once 'Core/Manifest/TokenisedRegularExpression.php'; -require_once 'Core/Injector/Injector.php'; - // Initialise the dependency injector as soon as possible, as it is // subsequently used by some of the following code $injector = new Injector(array('locator' => 'SilverStripe\\Core\\Injector\\SilverStripeServiceConfigurationLocator')); diff --git a/ORM/List.php b/ORM/SS_List.php similarity index 100% rename from ORM/List.php rename to ORM/SS_List.php