From 08bb23823bef44fc0509dd786bb8cab556ca8f3c Mon Sep 17 00:00:00 2001 From: Silbinary Wolf Date: Tue, 5 Jan 2016 21:05:04 +1100 Subject: [PATCH] Adjusted code based on feedback on PR (Pull-request) --- core/Core.php | 7 ++++--- core/manifest/ConfigStaticManifest.php | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/Core.php b/core/Core.php index a0ba0bcdd..3a2e6b972 100644 --- a/core/Core.php +++ b/core/Core.php @@ -116,10 +116,11 @@ if(file_exists(BASE_PATH . '/vendor/autoload.php')) { require_once(BASE_PATH . '/framework/model/fieldtypes/compat/autoload.php'); // Now that the class manifest is up, load the static configuration -if (defined('SS_USE_OLD_CONFIGSTATICMANIFEST') && SS_USE_OLD_CONFIGSTATICMANIFEST) { - $configManifest = new SS_ConfigStaticManifest(BASE_PATH, false, $flush); +if (defined('SS_CONFIGSTATICMANIFEST')) { + $configManifest = SS_CONFIGSTATICMANIFEST; + $configManifest = new $configManifest(BASE_PATH, false, $flush); } else { - $configManifest = new SS_ConfigStaticManifest_40(BASE_PATH, false, $flush); + $configManifest = new SS_ConfigStaticManifest(BASE_PATH, false, $flush); } Config::inst()->pushConfigStaticManifest($configManifest); diff --git a/core/manifest/ConfigStaticManifest.php b/core/manifest/ConfigStaticManifest.php index 010cf1719..7a3873600 100644 --- a/core/manifest/ConfigStaticManifest.php +++ b/core/manifest/ConfigStaticManifest.php @@ -6,7 +6,7 @@ * @package framework * @subpackage manifest */ -class SS_ConfigStaticManifest_40 extends SS_ConfigStaticManifest { +class SS_ConfigStaticManifest_Reflection extends SS_ConfigStaticManifest { /** * Constructs and initialises a new config static manifest, either loading the data @@ -25,7 +25,7 @@ class SS_ConfigStaticManifest_40 extends SS_ConfigStaticManifest { * Completely regenerates the manifest file. */ public function regenerate($cache = true) { - Deprecation::notice('3.3', 'This is no longer available as SS_ConfigStaticManifest now uses Reflection. For backwards compatibility define SS_USE_OLD_CONFIGSTATICMANIFEST in your _ss_environment.php file.'); + Deprecation::notice('3.4', 'This is no longer available as SS_ConfigStaticManifest now uses Reflection. For backwards compatibility define SS_USE_OLD_CONFIGSTATICMANIFEST in your _ss_environment.php file.'); } /** @@ -46,7 +46,7 @@ class SS_ConfigStaticManifest_40 extends SS_ConfigStaticManifest { $property = $reflection->getProperty($name); if($property->isStatic()) { if(!$property->isPrivate()) { - Deprecation::notice('3.3', "Config static $class::\$$name must be marked as private", + Deprecation::notice('3.4', "Config static $class::\$$name must be marked as private", Deprecation::SCOPE_GLOBAL); return null; } @@ -61,7 +61,7 @@ class SS_ConfigStaticManifest_40 extends SS_ConfigStaticManifest { } public function getStatics() { - Deprecation::notice('3.3', 'This is no longer available as SS_ConfigStaticManifest now uses Reflection. For backwards compatibility define SS_USE_OLD_CONFIGSTATICMANIFEST in your _ss_environment.php file.'); + Deprecation::notice('3.4', 'This is no longer available as SS_ConfigStaticManifest now uses Reflection. For backwards compatibility define SS_USE_OLD_CONFIGSTATICMANIFEST in your _ss_environment.php file.'); return array(); } }