Skip to content

Commit

Permalink
release version 2.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Jan 30, 2019
1 parent 768d590 commit ed64d65
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 101 deletions.
2 changes: 1 addition & 1 deletion build/controllers/PhpDocController.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ protected function generateClassPropertyDocs($fileName)
$ns = $this->match('#\nnamespace (?<name>[\w\\\\]+);\n#', $file);
$namespace = reset($ns);
$namespace = $namespace['name'];
$classes = $this->match('#\n(?:abstract )?class (?<name>\w+)( extends .+)?( implements .+)?\n\{(?<content>.*)\n\}(\n|$)#', $file);
$classes = $this->match('#\n(?:abstract )(?:final )?class (?<name>\w+)( extends .+)?( implements .+)?\n\{(?<content>.*)\n\}(\n|$)#', $file);

if (\count($classes) > 1) {
$this->stderr("[ERR] There should be only one class in a file: $fileName\n", Console::FG_RED);
Expand Down
2 changes: 1 addition & 1 deletion framework/BaseYii.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class BaseYii
*/
public static function getVersion()
{
return '2.0.16-dev';
return '2.0.16';
}

/**
Expand Down
164 changes: 82 additions & 82 deletions framework/CHANGELOG.md

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions framework/behaviors/OptimisticLockBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
use yii\helpers\ArrayHelper;

/**
* OptimisticLockBehavior automatically upgrades a model's lock version using the column name
* OptimisticLockBehavior automatically upgrades a model's lock version using the column name
* returned by [[\yii\db\BaseActiveRecord::optimisticLock()|optimisticLock()]].
*
* Optimistic locking allows multiple users to access the same record for edits and avoids
* potential conflicts. In case when a user attempts to save the record upon some staled data
* (because another user has modified the data), a [[StaleObjectException]] exception will be thrown,
* and the update or deletion is skipped.
*
* To use this behavior, first enable optimistic lock by following the steps listed in
* [[\yii\db\BaseActiveRecord::optimisticLock()|optimisticLock()]], remove the column name
* holding the lock version from the [[\yii\base\Model::rules()|rules()]] method of your
*
* To use this behavior, first enable optimistic lock by following the steps listed in
* [[\yii\db\BaseActiveRecord::optimisticLock()|optimisticLock()]], remove the column name
* holding the lock version from the [[\yii\base\Model::rules()|rules()]] method of your
* ActiveRecord class, then add the following code to it:
*
* ```php
Expand All @@ -41,16 +41,16 @@
* By default, OptimisticLockBehavior will use [[\yii\web\Request::getBodyParam()|getBodyParam()]] to parse
* the submitted value or set it to 0 on any fail. That means a request not holding the version attribute
* may achieve a first successful update to entity, but starting from there any further try should fail
* unless the request is holding the expected version number.
* Once attached, internal use of the model class should also fail to save the record if the version number
* isn't held by [[\yii\web\Request::getBodyParam()|getBodyParam()]]. It may be useful to extend your model class,
* enable optimistic lock in parent class by overriding [[\yii\db\BaseActiveRecord::optimisticLock()|optimisticLock()]],
* then attach the behavior to the child class so you can tie the parent model to internal use while linking the child model
* unless the request is holding the expected version number.
*
* Once attached, internal use of the model class should also fail to save the record if the version number
* isn't held by [[\yii\web\Request::getBodyParam()|getBodyParam()]]. It may be useful to extend your model class,
* enable optimistic lock in parent class by overriding [[\yii\db\BaseActiveRecord::optimisticLock()|optimisticLock()]],
* then attach the behavior to the child class so you can tie the parent model to internal use while linking the child model
* holding this behavior to the controllers responsible of receiving end user inputs.
* Alternatively, you can also configure the [[value]] property with a PHP callable to implement a different logic.
*
* OptimisticLockBehavior also provides a method named [[upgrade()]] that increases a model's
*
* OptimisticLockBehavior also provides a method named [[upgrade()]] that increases a model's
* version by one, that may be useful when you need to mark an entity as stale among connected clients
* and avoid any change to it until they load it again:
*
Expand All @@ -74,6 +74,7 @@ class OptimisticLockBehavior extends AttributeBehavior
* {@inheritdoc}
*/
public $skipUpdateOnClean = false;

/**
* @var string the attribute name holding the version value.
*/
Expand Down
1 change: 1 addition & 0 deletions framework/caching/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ abstract class Cache extends Component implements CacheInterface
*/
private $_igbinaryAvailable = false;


/**
* {@inheritdoc}
*/
Expand Down
2 changes: 2 additions & 0 deletions framework/classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
'yii\behaviors\AttributesBehavior' => YII2_PATH . '/behaviors/AttributesBehavior.php',
'yii\behaviors\BlameableBehavior' => YII2_PATH . '/behaviors/BlameableBehavior.php',
'yii\behaviors\CacheableWidgetBehavior' => YII2_PATH . '/behaviors/CacheableWidgetBehavior.php',
'yii\behaviors\OptimisticLockBehavior' => YII2_PATH . '/behaviors/OptimisticLockBehavior.php',
'yii\behaviors\SluggableBehavior' => YII2_PATH . '/behaviors/SluggableBehavior.php',
'yii\behaviors\TimestampBehavior' => YII2_PATH . '/behaviors/TimestampBehavior.php',
'yii\caching\ApcCache' => YII2_PATH . '/caching/ApcCache.php',
Expand Down Expand Up @@ -291,6 +292,7 @@
'yii\mutex\MysqlMutex' => YII2_PATH . '/mutex/MysqlMutex.php',
'yii\mutex\OracleMutex' => YII2_PATH . '/mutex/OracleMutex.php',
'yii\mutex\PgsqlMutex' => YII2_PATH . '/mutex/PgsqlMutex.php',
'yii\mutex\RetryAcquireTrait' => YII2_PATH . '/mutex/RetryAcquireTrait.php',
'yii\rbac\Assignment' => YII2_PATH . '/rbac/Assignment.php',
'yii\rbac\BaseManager' => YII2_PATH . '/rbac/BaseManager.php',
'yii\rbac\CheckAccessInterface' => YII2_PATH . '/rbac/CheckAccessInterface.php',
Expand Down
1 change: 1 addition & 0 deletions framework/db/mysql/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
Schema::TYPE_JSON => 'json'
];


/**
* {@inheritdoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion framework/i18n/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* Locale provides various locale information via convenient methods.
*
* The class requires [PHP intl extension](http://php.net/manual/en/book.intl.php) to be installed.
* @since 2.0.14
*
* @property string $currencySymbol This property is read-only.
*
* @since 2.0.14
*/
class Locale extends Component
{
Expand Down
2 changes: 0 additions & 2 deletions framework/log/Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ abstract class Target extends Component
'_SESSION',
'_SERVER',
];

/**
* @var array list of the PHP predefined variables that should NOT be logged "as is" and should always be replaced
* with a mask `***` before logging, when exist.
Expand All @@ -100,7 +99,6 @@ abstract class Target extends Component
'_SERVER.PHP_AUTH_USER',
'_SERVER.PHP_AUTH_PW',
];

/**
* @var callable a PHP callable that returns a string to be prefixed to every exported message.
*
Expand Down
1 change: 1 addition & 0 deletions framework/mutex/PgsqlMutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class PgsqlMutex extends DbMutex
{
use RetryAcquireTrait;


/**
* Initializes PgSQL specific mutex component implementation.
* @throws InvalidConfigException if [[db]] is not PgSQL connection.
Expand Down
1 change: 1 addition & 0 deletions framework/validators/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* For more details and usage information on Validator, see the [guide article on validators](guide:input-validation).
*
* @property array $attributeNames Attribute names. This property is read-only.
* @property array $validationAttributes List of attribute names. This property is read-only.
*
* @author Qiang Xue <[email protected]>
* @since 2.0
Expand Down
2 changes: 1 addition & 1 deletion framework/web/AssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function setConverter($value)
* discussion: http://code.google.com/p/yii/issues/detail?id=2579
*
* @param string $path the asset (file or directory) to be published
* @param array $options the options to be applied when publishing a directory.
* @param array $options the options to be applied when publishing a directory.
* The following options are supported:
*
* - only: array, list of patterns that the file paths should match if they want to be copied.
Expand Down

0 comments on commit ed64d65

Please sign in to comment.