Browse Source

Remove deprecation warnings for commonly used TableRegistry methods.

Robert Pustułka 8 years ago
parent
commit
42eb337b9d
1 changed files with 2 additions and 27 deletions
  1. 2 27
      src/ORM/TableRegistry.php

+ 2 - 27
src/ORM/TableRegistry.php

@@ -116,13 +116,13 @@ class TableRegistry
      * @param string|null $alias Name of the alias
      * @param array|null $options list of options for the alias
      * @return array The config data.
-     * @deprecated 3.6.0 Use \Cake\ORM\Locator\TableLocator::config() instead.
+     * @deprecated 3.6.0 Use \Cake\ORM\Locator\TableLocator::getConfig()/setConfig() instead.
      */
     public static function config($alias = null, $options = null)
     {
         deprecationWarning(
             'TableRegistry::config() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::config() instead.'
+            'Use \Cake\ORM\Locator\TableLocator::getConfig()/setConfig() instead.'
         );
 
         return static::getTableLocator()->config($alias, $options);
@@ -140,11 +140,6 @@ class TableRegistry
      */
     public static function get($alias, array $options = [])
     {
-        deprecationWarning(
-            'TableRegistry::get() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::get() instead.'
-        );
-
         return static::getTableLocator()->get($alias, $options);
     }
 
@@ -157,11 +152,6 @@ class TableRegistry
      */
     public static function exists($alias)
     {
-        deprecationWarning(
-            'TableRegistry::exists() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::exists() instead.'
-        );
-
         return static::getTableLocator()->exists($alias);
     }
 
@@ -175,11 +165,6 @@ class TableRegistry
      */
     public static function set($alias, Table $object)
     {
-        deprecationWarning(
-            'TableRegistry::set() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::set() instead.'
-        );
-
         return static::getTableLocator()->set($alias, $object);
     }
 
@@ -192,11 +177,6 @@ class TableRegistry
      */
     public static function remove($alias)
     {
-        deprecationWarning(
-            'TableRegistry::remove() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::remove() instead.'
-        );
-
         static::getTableLocator()->remove($alias);
     }
 
@@ -208,11 +188,6 @@ class TableRegistry
      */
     public static function clear()
     {
-        deprecationWarning(
-            'TableRegistry::clear() is deprecated. ' .
-            'Use \Cake\ORM\Locator\TableLocator::clear() instead.'
-        );
-
         static::getTableLocator()->clear();
     }