Browse Source

Remove deprecated code.

Refs #12336
Refs #12323
Refs #12321
Mark Story 7 years ago
parent
commit
0a251a96b1

+ 1 - 14
src/Core/Configure.php

@@ -260,23 +260,10 @@ class Configure
     /**
      * Gets the names of the configured Engine objects.
      *
-     * Checking if a specific engine has been configured with this method is deprecated.
-     * Use Configure::isConfigured() instead.
-     *
-     * @param string|null $name Engine name.
      * @return array|bool Array of the configured Engine objects, bool for specific name.
      */
-    public static function configured($name = null)
+    public static function configured()
     {
-        if ($name !== null) {
-            deprecationWarning(
-                'Checking for a named engine with configured() is deprecated. ' .
-                'Use Configure::isConfigured() instead.'
-            );
-
-            return isset(static::$_engines[$name]);
-        }
-
         return array_keys(static::$_engines);
     }
 

+ 1 - 14
src/Core/Plugin.php

@@ -298,24 +298,11 @@ class Plugin
     /**
      * Return a list of loaded plugins.
      *
-     * If a plugin name is provided, the return value will be a bool
-     * indicating whether or not the named plugin is loaded. This usage
-     * is deprecated. Instead you should use Plugin::isLoaded($name)
-     *
-     * @param string|null $plugin Plugin name.
      * @return bool|array Boolean true if $plugin is already loaded.
      *   If $plugin is null, returns a list of plugins that have been loaded
      */
-    public static function loaded($plugin = null)
+    public static function loaded()
     {
-        if ($plugin !== null) {
-            deprecationWarning(
-                'Checking a single plugin with Plugin::loaded() is deprecated. ' .
-                'Use Plugin::isLoaded() instead.'
-            );
-
-            return static::getCollection()->has($plugin);
-        }
         $names = [];
         foreach (static::getCollection() as $plugin) {
             $names[] = $plugin->getName();

+ 0 - 19
tests/TestCase/Core/ConfigureTest.php

@@ -493,25 +493,6 @@ class ConfigureTest extends TestCase
     }
 
     /**
-     * test deprecated behavior of configured
-     *
-     * @deprecated
-     * @return void
-     */
-    public function testConfigured()
-    {
-        $this->deprecated(function () {
-            $engine = new PhpConfig();
-            Configure::config('test', $engine);
-
-            $configured = Configure::configured();
-            $this->assertContains('test', $configured);
-            $this->assertTrue(Configure::configured('test'));
-            $this->assertTrue(Configure::configured('default'));
-        });
-    }
-
-    /**
      * Test that clear wipes all values.
      *
      * @return void

+ 0 - 15
tests/TestCase/Core/PluginTest.php

@@ -147,21 +147,6 @@ class PluginTest extends TestCase
     }
 
     /**
-     * Tests deprecated usage of loaded()
-     *
-     * @deprecated
-     * @return void
-     */
-    public function testIsLoaded()
-    {
-        $this->deprecated(function () {
-            Plugin::load('TestPlugin');
-            $this->assertTrue(Plugin::loaded('TestPlugin'));
-            $this->assertFalse(Plugin::loaded('Unknown'));
-        });
-    }
-
-    /**
      * Tests loading a plugin and its bootstrap file
      *
      * @return void