mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API Remove deprecated CIConfig functionality
This commit is contained in:
parent
a52c7795c7
commit
7860e461ed
@ -21,7 +21,6 @@ use SilverStripe\Core\Manifest\ClassManifest;
|
|||||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||||
use SilverStripe\Core\Manifest\ModuleManifest;
|
use SilverStripe\Core\Manifest\ModuleManifest;
|
||||||
use SilverStripe\Dev\DebugView;
|
use SilverStripe\Dev\DebugView;
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use SilverStripe\Logging\ErrorHandler;
|
use SilverStripe\Logging\ErrorHandler;
|
||||||
use SilverStripe\View\PublicThemes;
|
use SilverStripe\View\PublicThemes;
|
||||||
use SilverStripe\View\SSViewer;
|
use SilverStripe\View\SSViewer;
|
||||||
@ -179,26 +178,17 @@ abstract class BaseKernel implements Kernel
|
|||||||
*/
|
*/
|
||||||
protected function bootManifests($flush)
|
protected function bootManifests($flush)
|
||||||
{
|
{
|
||||||
// Setup autoloader
|
$this->getClassLoader()->init(
|
||||||
$ignoredCIConfigs = Deprecation::withNoReplacement(function () {
|
$this->getIncludeTests(),
|
||||||
return $this->getIgnoredCIConfigs();
|
$flush
|
||||||
});
|
);
|
||||||
|
|
||||||
Deprecation::withNoReplacement(function () use ($flush, $ignoredCIConfigs) {
|
|
||||||
$this->getClassLoader()->init(
|
|
||||||
$this->getIncludeTests(),
|
|
||||||
$flush,
|
|
||||||
$ignoredCIConfigs
|
|
||||||
);
|
|
||||||
|
|
||||||
// Find modules
|
|
||||||
$this->getModuleLoader()->init(
|
|
||||||
$this->getIncludeTests(),
|
|
||||||
$flush,
|
|
||||||
$ignoredCIConfigs
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// Find modules
|
||||||
|
$this->getModuleLoader()->init(
|
||||||
|
$this->getIncludeTests(),
|
||||||
|
$flush
|
||||||
|
);
|
||||||
|
|
||||||
// Flush config
|
// Flush config
|
||||||
if ($flush) {
|
if ($flush) {
|
||||||
$config = $this->getConfigLoader()->getManifest();
|
$config = $this->getConfigLoader()->getManifest();
|
||||||
@ -215,13 +205,10 @@ abstract class BaseKernel implements Kernel
|
|||||||
$defaultSet->setProject(
|
$defaultSet->setProject(
|
||||||
ModuleManifest::config()->get('project')
|
ModuleManifest::config()->get('project')
|
||||||
);
|
);
|
||||||
Deprecation::withNoReplacement(function () use ($defaultSet, $flush, $ignoredCIConfigs) {
|
$defaultSet->init(
|
||||||
$defaultSet->init(
|
$this->getIncludeTests(),
|
||||||
$this->getIncludeTests(),
|
$flush
|
||||||
$flush,
|
);
|
||||||
$ignoredCIConfigs
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,15 +217,8 @@ abstract class BaseKernel implements Kernel
|
|||||||
*/
|
*/
|
||||||
protected function bootConfigs()
|
protected function bootConfigs()
|
||||||
{
|
{
|
||||||
global $project;
|
|
||||||
$projectBefore = $project;
|
|
||||||
$config = ModuleManifest::config();
|
|
||||||
// After loading all other app manifests, include _config.php files
|
// After loading all other app manifests, include _config.php files
|
||||||
$this->getModuleLoader()->getManifest()->activateConfig();
|
$this->getModuleLoader()->getManifest()->activateConfig();
|
||||||
if ($project && $project !== $projectBefore) {
|
|
||||||
Deprecation::notice('5.0', '$project global is deprecated');
|
|
||||||
$config->set('project', $project);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Core\Manifest;
|
namespace SilverStripe\Core\Manifest;
|
||||||
|
|
||||||
use SilverStripe\Core\ClassInfo;
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that handles loading classes and interfaces from a class manifest
|
* A class that handles loading classes and interfaces from a class manifest
|
||||||
* instance.
|
* instance.
|
||||||
@ -126,24 +123,9 @@ class ClassLoader
|
|||||||
foreach ($this->manifests as $manifest) {
|
foreach ($this->manifests as $manifest) {
|
||||||
/** @var ClassManifest $instance */
|
/** @var ClassManifest $instance */
|
||||||
$instance = $manifest['instance'];
|
$instance = $manifest['instance'];
|
||||||
Deprecation::withNoReplacement(function () use ($instance, $includeTests, $forceRegen, $ignoredCIConfigs) {
|
$instance->init($includeTests, $forceRegen);
|
||||||
$instance->init($includeTests, $forceRegen, $ignoredCIConfigs);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->registerAutoloader();
|
$this->registerAutoloader();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if a class or interface name exists in the manifest.
|
|
||||||
*
|
|
||||||
* @param string $class
|
|
||||||
* @return bool
|
|
||||||
* @deprecated 4.0.1 Use ClassInfo::exists() instead
|
|
||||||
*/
|
|
||||||
public function classExists($class)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.1', 'Use ClassInfo::exists() instead');
|
|
||||||
return ClassInfo::exists($class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -291,9 +291,7 @@ class ClassManifest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build
|
// Build
|
||||||
Deprecation::withNoReplacement(function () use ($includeTests, $ignoredCIConfigs) {
|
$this->regenerate($includeTests);
|
||||||
$this->regenerate($includeTests, $ignoredCIConfigs);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user