From 89a0f59ef189e8c7b99b0f973768dc41106e0397 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 31 Aug 2022 13:50:33 +1200 Subject: [PATCH] FIX Remove accidental deprecation warnings. These were erroneously added via a merge-up from 4 to 5. --- src/Core/Manifest/ClassLoader.php | 4 ---- src/Core/Manifest/ClassManifest.php | 9 --------- src/Core/Manifest/ModuleLoader.php | 6 ------ src/Core/Manifest/ModuleManifest.php | 9 --------- src/Dev/Constraint/SSListContains.php | 3 --- src/Dev/Constraint/SSListContainsOnlyMatchingItems.php | 2 -- src/Dev/FunctionalTest.php | 2 -- src/Dev/SapphireTest.php | 2 -- src/View/ThemeManifest.php | 9 --------- 9 files changed, 46 deletions(-) diff --git a/src/Core/Manifest/ClassLoader.php b/src/Core/Manifest/ClassLoader.php index b4cafe027..c791808d4 100644 --- a/src/Core/Manifest/ClassLoader.php +++ b/src/Core/Manifest/ClassLoader.php @@ -123,10 +123,6 @@ class ClassLoader */ public function init($includeTests = false, $forceRegen = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - foreach ($this->manifests as $manifest) { /** @var ClassManifest $instance */ $instance = $manifest['instance']; diff --git a/src/Core/Manifest/ClassManifest.php b/src/Core/Manifest/ClassManifest.php index e72b10694..9d406620d 100644 --- a/src/Core/Manifest/ClassManifest.php +++ b/src/Core/Manifest/ClassManifest.php @@ -11,7 +11,6 @@ use PhpParser\ParserFactory; use PhpParser\ErrorHandler\ErrorHandler; use Psr\SimpleCache\CacheInterface; use SilverStripe\Core\Cache\CacheFactory; -use SilverStripe\Dev\Deprecation; use SilverStripe\Dev\TestOnly; /** @@ -280,10 +279,6 @@ class ClassManifest */ public function init($includeTests = false, $forceRegen = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - $this->cache = $this->buildCache($includeTests); // Check if cache is safe to use @@ -546,10 +541,6 @@ class ClassManifest */ public function regenerate($includeTests) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - // Reset the manifest so stale info doesn't cause errors. $this->loadState([]); $this->roots = []; diff --git a/src/Core/Manifest/ModuleLoader.php b/src/Core/Manifest/ModuleLoader.php index 09acf03fb..10dbe948b 100644 --- a/src/Core/Manifest/ModuleLoader.php +++ b/src/Core/Manifest/ModuleLoader.php @@ -2,8 +2,6 @@ namespace SilverStripe\Core\Manifest; -use SilverStripe\Dev\Deprecation; - /** * Module manifest holder */ @@ -96,10 +94,6 @@ class ModuleLoader */ public function init($includeTests = false, $forceRegen = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - foreach ($this->manifests as $manifest) { $manifest->init($includeTests, $forceRegen); } diff --git a/src/Core/Manifest/ModuleManifest.php b/src/Core/Manifest/ModuleManifest.php index 74ced5290..0c5d117f5 100644 --- a/src/Core/Manifest/ModuleManifest.php +++ b/src/Core/Manifest/ModuleManifest.php @@ -7,7 +7,6 @@ use Psr\SimpleCache\CacheInterface; use SilverStripe\Core\Cache\CacheFactory; use SilverStripe\Core\Config\Configurable; use SilverStripe\Core\Injector\Injector; -use SilverStripe\Dev\Deprecation; /** * A utility class which builds a manifest of configuration items @@ -125,10 +124,6 @@ class ModuleManifest */ public function init($includeTests = false, $forceRegen = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - // build cache from factory if ($this->cacheFactory) { $this->cache = $this->cacheFactory->create( @@ -170,10 +165,6 @@ class ModuleManifest */ public function regenerate($includeTests = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - $this->modules = []; $finder = new ManifestFileFinder(); diff --git a/src/Dev/Constraint/SSListContains.php b/src/Dev/Constraint/SSListContains.php index f47aa7ec4..bb3b0b9dd 100644 --- a/src/Dev/Constraint/SSListContains.php +++ b/src/Dev/Constraint/SSListContains.php @@ -4,7 +4,6 @@ namespace SilverStripe\Dev\Constraint; use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\ExpectationFailedException; -use SilverStripe\Dev\Deprecation; use SilverStripe\Dev\SSListExporter; use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\SS_List; @@ -30,8 +29,6 @@ class SSListContains extends Constraint implements TestOnly public function __construct(array $matches) { - Deprecation::notice('5.0.0', 'This class will be removed in CMS 5', Deprecation::SCOPE_CLASS); - $this->exporter = new SSListExporter(); $this->matches = $matches; diff --git a/src/Dev/Constraint/SSListContainsOnlyMatchingItems.php b/src/Dev/Constraint/SSListContainsOnlyMatchingItems.php index e2a7063ae..f093b3e01 100644 --- a/src/Dev/Constraint/SSListContainsOnlyMatchingItems.php +++ b/src/Dev/Constraint/SSListContainsOnlyMatchingItems.php @@ -4,7 +4,6 @@ namespace SilverStripe\Dev\Constraint; use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\ExpectationFailedException; -use SilverStripe\Dev\Deprecation; use SilverStripe\Dev\SSListExporter; use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\SS_List; @@ -27,7 +26,6 @@ class SSListContainsOnlyMatchingItems extends Constraint implements TestOnly public function __construct($match) { - Deprecation::notice('5.0.0', 'This class will be removed in CMS 5', Deprecation::SCOPE_CLASS); $this->exporter = new SSListExporter(); $this->constraint = new ViewableDataContains($match); diff --git a/src/Dev/FunctionalTest.php b/src/Dev/FunctionalTest.php index 34635b8c2..56a4e7334 100644 --- a/src/Dev/FunctionalTest.php +++ b/src/Dev/FunctionalTest.php @@ -83,8 +83,6 @@ abstract class FunctionalTest extends SapphireTest implements TestOnly protected function setUp(): void { - Deprecation::notice('5.0.0', 'This class will be removed in CMS 5', Deprecation::SCOPE_CLASS); - parent::setUp(); // Skip calling FunctionalTest directly. diff --git a/src/Dev/SapphireTest.php b/src/Dev/SapphireTest.php index ecf9ff6f3..965111b12 100644 --- a/src/Dev/SapphireTest.php +++ b/src/Dev/SapphireTest.php @@ -264,8 +264,6 @@ abstract class SapphireTest extends TestCase implements TestOnly */ protected function setUp(): void { - Deprecation::notice('5.0.0', 'This class will be removed in CMS 5', Deprecation::SCOPE_CLASS); - if (!defined('FRAMEWORK_PATH')) { trigger_error( 'Missing constants, did you remember to include the test bootstrap in your phpunit.xml file?', diff --git a/src/View/ThemeManifest.php b/src/View/ThemeManifest.php index e43a304fa..f764d71a1 100644 --- a/src/View/ThemeManifest.php +++ b/src/View/ThemeManifest.php @@ -6,7 +6,6 @@ use Psr\SimpleCache\CacheInterface; use SilverStripe\Core\Cache\CacheFactory; use SilverStripe\Core\Manifest\ManifestFileFinder; use SilverStripe\Core\Manifest\ModuleLoader; -use SilverStripe\Dev\Deprecation; /** * A class which builds a manifest of all themes (which is really just a directory called "templates") @@ -77,10 +76,6 @@ class ThemeManifest implements ThemeList */ public function init($includeTests = false, $forceRegen = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - // build cache from factory if ($this->cacheFactory) { $this->cache = $this->cacheFactory->create( @@ -137,10 +132,6 @@ class ThemeManifest implements ThemeList */ public function regenerate($includeTests = false) { - if (!empty($ignoredCIConfigs)) { - Deprecation::notice('5.0.0', 'The $ignoredCIConfigs parameter will be removed in CMS 5'); - } - $finder = new ManifestFileFinder(); $finder->setOptions([ 'include_themes' => false,