Skip to content

Commit ed64d65

Browse files
committed
release version 2.0.16
1 parent 768d590 commit ed64d65

File tree

12 files changed

+106
-101
lines changed

12 files changed

+106
-101
lines changed

Diff for: build/controllers/PhpDocController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ protected function generateClassPropertyDocs($fileName)
650650
$ns = $this->match('#\nnamespace (?<name>[\w\\\\]+);\n#', $file);
651651
$namespace = reset($ns);
652652
$namespace = $namespace['name'];
653-
$classes = $this->match('#\n(?:abstract )?class (?<name>\w+)( extends .+)?( implements .+)?\n\{(?<content>.*)\n\}(\n|$)#', $file);
653+
$classes = $this->match('#\n(?:abstract )(?:final )?class (?<name>\w+)( extends .+)?( implements .+)?\n\{(?<content>.*)\n\}(\n|$)#', $file);
654654

655655
if (\count($classes) > 1) {
656656
$this->stderr("[ERR] There should be only one class in a file: $fileName\n", Console::FG_RED);

Diff for: framework/BaseYii.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class BaseYii
9393
*/
9494
public static function getVersion()
9595
{
96-
return '2.0.16-dev';
96+
return '2.0.16';
9797
}
9898

9999
/**

Diff for: framework/CHANGELOG.md

+82-82
Large diffs are not rendered by default.

Diff for: framework/behaviors/OptimisticLockBehavior.php

+14-13
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
use yii\helpers\ArrayHelper;
1515

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

Diff for: framework/caching/Cache.php

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ abstract class Cache extends Component implements CacheInterface
8484
*/
8585
private $_igbinaryAvailable = false;
8686

87+
8788
/**
8889
* {@inheritdoc}
8990
*/

Diff for: framework/classes.php

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
'yii\behaviors\AttributesBehavior' => YII2_PATH . '/behaviors/AttributesBehavior.php',
6767
'yii\behaviors\BlameableBehavior' => YII2_PATH . '/behaviors/BlameableBehavior.php',
6868
'yii\behaviors\CacheableWidgetBehavior' => YII2_PATH . '/behaviors/CacheableWidgetBehavior.php',
69+
'yii\behaviors\OptimisticLockBehavior' => YII2_PATH . '/behaviors/OptimisticLockBehavior.php',
6970
'yii\behaviors\SluggableBehavior' => YII2_PATH . '/behaviors/SluggableBehavior.php',
7071
'yii\behaviors\TimestampBehavior' => YII2_PATH . '/behaviors/TimestampBehavior.php',
7172
'yii\caching\ApcCache' => YII2_PATH . '/caching/ApcCache.php',
@@ -291,6 +292,7 @@
291292
'yii\mutex\MysqlMutex' => YII2_PATH . '/mutex/MysqlMutex.php',
292293
'yii\mutex\OracleMutex' => YII2_PATH . '/mutex/OracleMutex.php',
293294
'yii\mutex\PgsqlMutex' => YII2_PATH . '/mutex/PgsqlMutex.php',
295+
'yii\mutex\RetryAcquireTrait' => YII2_PATH . '/mutex/RetryAcquireTrait.php',
294296
'yii\rbac\Assignment' => YII2_PATH . '/rbac/Assignment.php',
295297
'yii\rbac\BaseManager' => YII2_PATH . '/rbac/BaseManager.php',
296298
'yii\rbac\CheckAccessInterface' => YII2_PATH . '/rbac/CheckAccessInterface.php',

Diff for: framework/db/mysql/QueryBuilder.php

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
4646
Schema::TYPE_JSON => 'json'
4747
];
4848

49+
4950
/**
5051
* {@inheritdoc}
5152
*/

Diff for: framework/i18n/Locale.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
* Locale provides various locale information via convenient methods.
1616
*
1717
* The class requires [PHP intl extension](http://php.net/manual/en/book.intl.php) to be installed.
18-
* @since 2.0.14
1918
*
2019
* @property string $currencySymbol This property is read-only.
2120
*
21+
* @since 2.0.14
2222
*/
2323
class Locale extends Component
2424
{

Diff for: framework/log/Target.php

-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ abstract class Target extends Component
8181
'_SESSION',
8282
'_SERVER',
8383
];
84-
8584
/**
8685
* @var array list of the PHP predefined variables that should NOT be logged "as is" and should always be replaced
8786
* with a mask `***` before logging, when exist.
@@ -100,7 +99,6 @@ abstract class Target extends Component
10099
'_SERVER.PHP_AUTH_USER',
101100
'_SERVER.PHP_AUTH_PW',
102101
];
103-
104102
/**
105103
* @var callable a PHP callable that returns a string to be prefixed to every exported message.
106104
*

Diff for: framework/mutex/PgsqlMutex.php

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class PgsqlMutex extends DbMutex
3838
{
3939
use RetryAcquireTrait;
4040

41+
4142
/**
4243
* Initializes PgSQL specific mutex component implementation.
4344
* @throws InvalidConfigException if [[db]] is not PgSQL connection.

Diff for: framework/validators/Validator.php

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* For more details and usage information on Validator, see the [guide article on validators](guide:input-validation).
5050
*
5151
* @property array $attributeNames Attribute names. This property is read-only.
52+
* @property array $validationAttributes List of attribute names. This property is read-only.
5253
*
5354
* @author Qiang Xue <[email protected]>
5455
* @since 2.0

Diff for: framework/web/AssetManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function setConverter($value)
425425
* discussion: http://code.google.com/p/yii/issues/detail?id=2579
426426
*
427427
* @param string $path the asset (file or directory) to be published
428-
* @param array $options the options to be applied when publishing a directory.
428+
* @param array $options the options to be applied when publishing a directory.
429429
* The following options are supported:
430430
*
431431
* - only: array, list of patterns that the file paths should match if they want to be copied.

0 commit comments

Comments
 (0)