From b05e01b2d4b7252a41935f1e59c132de4fc73330 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 14 Apr 2016 23:41:55 +0300 Subject: [PATCH] Remove deprecated methods and constants --- framework/base/Security.php | 10 -------- framework/caching/Cache.php | 52 -------------------------------------- framework/i18n/DbMessageSource.php | 6 ----- 3 files changed, 68 deletions(-) diff --git a/framework/base/Security.php b/framework/base/Security.php index 9afd777..25fd7b2 100644 --- a/framework/base/Security.php +++ b/framework/base/Security.php @@ -72,16 +72,6 @@ class Security extends Component */ public $derivationIterations = 100000; /** - * @var string strategy, which should be used to generate password hash. - * Available strategies: - * - 'password_hash' - use of PHP `password_hash()` function with PASSWORD_DEFAULT algorithm. - * This option is recommended, but it requires PHP version >= 5.5.0 - * - 'crypt' - use PHP `crypt()` function. - * @deprecated Since version 2.0.7, [[generatePasswordHash()]] ignores [[passwordHashStrategy]] and - * uses `password_hash()` when available or `crypt()` when not. - */ - public $passwordHashStrategy; - /** * @var integer Default cost used for password hashing. * Allowed value is between 4 and 31. * @see generatePasswordHash() diff --git a/framework/caching/Cache.php b/framework/caching/Cache.php index 2b23b9a..899fcaf 100644 --- a/framework/caching/Cache.php +++ b/framework/caching/Cache.php @@ -141,23 +141,6 @@ abstract class Cache extends Component implements \ArrayAccess * Some caches (such as memcache, apc) allow retrieving multiple cached values at the same time, * which may improve the performance. In case a cache does not support this feature natively, * this method will try to simulate it. - * - * @param string[] $keys list of string keys identifying the cached values - * @return array list of cached values corresponding to the specified keys. The array - * is returned in terms of (key, value) pairs. - * If a value is not cached or expired, the corresponding array value will be false. - * @deprecated This method is an alias for [[multiGet()]] and will be removed in 2.1.0. - */ - public function mget($keys) - { - return $this->multiGet($keys); - } - - /** - * Retrieves multiple values from cache with the specified keys. - * Some caches (such as memcache, apc) allow retrieving multiple cached values at the same time, - * which may improve the performance. In case a cache does not support this feature natively, - * this method will try to simulate it. * @param string[] $keys list of string keys identifying the cached values * @return array list of cached values corresponding to the specified keys. The array * is returned in terms of (key, value) pairs. @@ -231,24 +214,6 @@ abstract class Cache extends Component implements \ArrayAccess * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. * This parameter is ignored if [[serializer]] is false. * @return boolean whether the items are successfully stored into cache - * @deprecated This method is an alias for [[multiSet()]] and will be removed in 2.1.0. - */ - public function mset($items, $duration = 0, $dependency = null) - { - return $this->multiSet($items, $duration, $dependency); - } - - /** - * Stores multiple items in cache. Each item contains a value identified by a key. - * If the cache already contains such a key, the existing value and - * expiration time will be replaced with the new ones, respectively. - * - * @param array $items the items to be cached, as key-value pairs. - * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire. - * @param Dependency $dependency dependency of the cached items. If the dependency changes, - * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. - * This parameter is ignored if [[serializer]] is false. - * @return boolean whether the items are successfully stored into cache * @since 2.0.7 */ public function multiSet($items, $duration = 0, $dependency = null) @@ -282,23 +247,6 @@ abstract class Cache extends Component implements \ArrayAccess * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. * This parameter is ignored if [[serializer]] is false. * @return boolean whether the items are successfully stored into cache - * @deprecated This method is an alias for [[multiAdd()]] and will be removed in 2.1.0. - */ - public function madd($items, $duration = 0, $dependency = null) - { - return $this->multiAdd($items, $duration, $dependency); - } - - /** - * Stores multiple items in cache. Each item contains a value identified by a key. - * If the cache already contains such a key, the existing value and expiration time will be preserved. - * - * @param array $items the items to be cached, as key-value pairs. - * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire. - * @param Dependency $dependency dependency of the cached items. If the dependency changes, - * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. - * This parameter is ignored if [[serializer]] is false. - * @return boolean whether the items are successfully stored into cache * @since 2.0.7 */ public function multiAdd($items, $duration = 0, $dependency = null) diff --git a/framework/i18n/DbMessageSource.php b/framework/i18n/DbMessageSource.php index 21a93ad..f6ac442 100644 --- a/framework/i18n/DbMessageSource.php +++ b/framework/i18n/DbMessageSource.php @@ -40,12 +40,6 @@ use yii\db\Query; class DbMessageSource extends MessageSource { /** - * Prefix which would be used when generating cache key. - * @deprecated This constant has never been used and will be removed in 2.1.0. - */ - const CACHE_KEY_PREFIX = 'DbMessageSource'; - - /** * @var Connection|array|string the DB connection object or the application component ID of the DB connection. * * After the DbMessageSource object is created, if you want to change this property, you should only assign