Browse Source

Remove deprecated methods and constants

tags/3.0.0-alpha1
Alexander Makarov 9 years ago
parent
commit
b05e01b2d4
  1. 10
      framework/base/Security.php
  2. 52
      framework/caching/Cache.php
  3. 6
      framework/i18n/DbMessageSource.php

10
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()

52
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)

6
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

Loading…
Cancel
Save