mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Adjusted code based on feedback on PR (Pull-request)
This commit is contained in:
parent
8f65c44865
commit
08bb23823b
@ -116,10 +116,11 @@ if(file_exists(BASE_PATH . '/vendor/autoload.php')) {
|
|||||||
require_once(BASE_PATH . '/framework/model/fieldtypes/compat/autoload.php');
|
require_once(BASE_PATH . '/framework/model/fieldtypes/compat/autoload.php');
|
||||||
|
|
||||||
// Now that the class manifest is up, load the static configuration
|
// Now that the class manifest is up, load the static configuration
|
||||||
if (defined('SS_USE_OLD_CONFIGSTATICMANIFEST') && SS_USE_OLD_CONFIGSTATICMANIFEST) {
|
if (defined('SS_CONFIGSTATICMANIFEST')) {
|
||||||
$configManifest = new SS_ConfigStaticManifest(BASE_PATH, false, $flush);
|
$configManifest = SS_CONFIGSTATICMANIFEST;
|
||||||
|
$configManifest = new $configManifest(BASE_PATH, false, $flush);
|
||||||
} else {
|
} else {
|
||||||
$configManifest = new SS_ConfigStaticManifest_40(BASE_PATH, false, $flush);
|
$configManifest = new SS_ConfigStaticManifest(BASE_PATH, false, $flush);
|
||||||
}
|
}
|
||||||
Config::inst()->pushConfigStaticManifest($configManifest);
|
Config::inst()->pushConfigStaticManifest($configManifest);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @package framework
|
* @package framework
|
||||||
* @subpackage manifest
|
* @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
|
* 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.
|
* Completely regenerates the manifest file.
|
||||||
*/
|
*/
|
||||||
public function regenerate($cache = true) {
|
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);
|
$property = $reflection->getProperty($name);
|
||||||
if($property->isStatic()) {
|
if($property->isStatic()) {
|
||||||
if(!$property->isPrivate()) {
|
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);
|
Deprecation::SCOPE_GLOBAL);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ class SS_ConfigStaticManifest_40 extends SS_ConfigStaticManifest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getStatics() {
|
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();
|
return array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user