diff --git a/build/controllers/PhpDocController.php b/build/controllers/PhpDocController.php index 19ae5fb..872648f 100644 --- a/build/controllers/PhpDocController.php +++ b/build/controllers/PhpDocController.php @@ -650,7 +650,7 @@ class PhpDocController extends Controller $ns = $this->match('#\nnamespace (?[\w\\\\]+);\n#', $file); $namespace = reset($ns); $namespace = $namespace['name']; - $classes = $this->match('#\n(?:abstract )?class (?\w+)( extends .+)?( implements .+)?\n\{(?.*)\n\}(\n|$)#', $file); + $classes = $this->match('#\n(?:abstract )(?:final )?class (?\w+)( extends .+)?( implements .+)?\n\{(?.*)\n\}(\n|$)#', $file); if (\count($classes) > 1) { $this->stderr("[ERR] There should be only one class in a file: $fileName\n", Console::FG_RED); diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 85633e5..6251e27 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -93,7 +93,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.16-dev'; + return '2.0.16'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 1151acf..31dcbe4 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,120 +1,120 @@ Yii Framework 2 Change Log ========================== -2.0.16 under development ------------------------- +2.0.16 January 30, 2019 +----------------------- -- Bug #15482: AR::find()->with() missing data when using string identifiers for relations (rugabarbo) -- Bug #15167: Fixed loading of default value `current_timestamp()` for MariaDB >= 10.2.3 (rugabarbo, bloodrain777, Skinka) -- Bug #16253: Fixed empty checkboxlist validation (GHopperMSK) -- Bug #15286: Fixed incorrect formatting of time with timezone information (rugabarbo) -- Bug #17021: Fix to do not remove existing message category files in a subfolder (albertborsos) -- Bug #16991: Removed usage of `utf8_encode()` from `Request::resolvePathInfo()` (GHopperMSK) -- Bug #16974: Regular Expression Validator to include support for 'u' (UTF-8) modifier (Dzhuneyt) -- Chg #16941: Set `yii\console\controllers\MigrateController::useTablePrefix` to true as default value (GHopperMSK) -- Bug #16966: Fix ArrayExpression support in related tables (GHopperMSK) -- Bug #16891: Fixed Pagination::totalCount initialized incorrectly (taobig) -- Bug #16028: Fix serialization of complex cache keys that contain non-UTF sequences (rugabarbo) -- Bug #16945: Fixed RBAC DbManager ruleName fetching on the case of PDO::ATTR_ORACLE_NULLS => PDO::NULL_TO_STRING (razonyang) -- Bug #16081: Fixed composite IN using just one column (rugabarbo) -- Bug #15850: check basePath is writable on publish in AssetManager (Groonya) -- Bug #16910: Fix messages sorting on extract (Groonya) -- Bug #16969: Fix `yii\filters\PageCache` incorrectly storing empty data in some cases (sammousa) -- Bug #15683: Fixed file as array uploading in MultipartFormDataParser (Groonya) -- Bug #16822: Create config dir recursively in message/config (Groonya) -- Bug #16580: Delete unused php message files in MessageController if `$removeUnused` option is on (Groonya) -- Bug #16022: Fix UniqueValidator for PostgreSQL. Checks the uniqueness of keys in `jsonb` field (lav45) -- Bug #16903: Fixed 'yii\validators\NumberValidator' method 'isNotNumber' returns false for true/false value (annechko) -- Bug #16648: Html::strtolower() was corrupting UTF-8 strings (Kolyunya) -- Bug #13977: Skip validation if file input does not exist (RobinKamps, s1lver) -- Bug #16183: Fixed when `yii\helpers\BaseFileHelper` sometimes returned wrong value (samdark, SilverFire, OndrejVasicek) +- Bug #5341: HasMany via two relations (shirase, cebe) +- Bug #10843: Additional hidden input rendered by `yii\helpers\BaseHtml` methods inherits `disabled` HTML option if provided and set to `true` (bizley) +- Bug #11960: Fixed `checked` option ignore in `yii\helpers\BaseHtml::checkbox()` (misantron) - Bug #13932: Fix number validator attributes comparison (uaoleg, s1lver) +- Bug #13977: Skip validation if file input does not exist (RobinKamps, s1lver) - Bug #14039, #16636: Fixed validation for disabled inputs (s1lver, omzy83) -- Bug #16425: Check for additional values for disabled confirm dialog (Alex-Code, s1lver) -- Enh #14367: In `yii\db\mysql\QueryBuilder` added support fractional seconds for time types for MySQL >= 5.6.4 (konstantin-vl) -- Bug #16766: `yii\filters\ContentNegotiator` was not setting `Vary` header to inform cache recipients (koteq, cebe, samdark) -- Bug #11960: Fixed `checked` option ignore in `yii\helpers\BaseHtml::checkbox()` (misantron) -- Bug #14759: Fixed `yii\web\JsonResponseFormatter` output for `null` data (misantron) -- Bug #16490: Fix schema on rbac init (marcelodeandrade) -- Bug #16748: Fixed params when normalize data (marcelodeandrade) -- Bug #16752: Fix rotating files under Windows (samdark, nadirvishun) -- Bug #16716: The ability to filter by pressing the Enter key when the option `$filterOnFocusOut` off (s1lver) -- Bug #15791: Added a warning when the form names conflict (s1lver, rustamwin) -- Enh #16151: `ActiveQuery::getTableNameAndAlias()` is now protected (s1lver) -- Bug #16657: Ensure widgets after run event result contains the result of the rendered widget (AdeAttwood) - Bug #14230: Fixed `itemsOptions` ignored in `checkBoxList` and `radioList` (s1lver) -- Enh #16151: Change of scope for method `getTableNameAndAlias()` (s1lver) - Bug #14230: Fixed `itemsOptions` ignored in `checkBoxList` (s1lver) - Bug #14368: Added `role` attribute for active radio list (s1lver) -- Bug #16680: Fixed ActiveField 'text' input with maxlength (s1lver) -- Bug #5341: HasMany via two relations (shirase, cebe) -- Bug #16558: Added cloning `yii\data\ActiveDataProvider::query` property when ActiveDataProvider object is cloned (mgrechanik) +- Bug #14636: Views can now use relative paths even when using themed views (sammousa) +- Bug #14660: Fixed `yii\caching\DbCache` concurrency issue when set values with the same key (rugabarbo) +- Bug #14759: Fixed `yii\web\JsonResponseFormatter` output for `null` data (misantron) - Bug #14901: Fixed trim validation for radio/checkbox button (s1lver) -- Bug #16527: Fixed return content for `\yii\widgets\ActiveForm::run()` (carono) +- Bug #14950: Fixed `yii\i18n\Formatter` methods `asInteger`, `asDecimal`, `asPercent`, and `asCurrency` outputs for very big numbers (bizley) +- Bug #15117: Fixed `yii\db\Schema::getTableMetadata` cache refreshing (boboldehampsink) +- Bug #15167: Fixed loading of default value `current_timestamp()` for MariaDB >= 10.2.3 (rugabarbo, bloodrain777, Skinka) +- Bug #15204: `yii\helpers\BaseInflector::slug()` is not removing substrings matching provided replacement from given string anymore (bizley) +- Bug #15286: Fixed incorrect formatting of time with timezone information (rugabarbo) +- Bug #15482: AR::find()->with() missing data when using string identifiers for relations (rugabarbo) +- Bug #15528: Fix timestamp formatting to always use decimal notation in `yii\log\Target::getTime()` (rob006) +- Bug #15548: Fixed index names collision in RBAC (gonimar) +- Bug #15683: Fixed file as array uploading in MultipartFormDataParser (Groonya) +- Bug #15791: Added a warning when the form names conflict (s1lver, rustamwin) +- Bug #15798: Fixed render `yii\grid\RadioButtonColumn::$content` and `yii\grid\CheckboxColumn::$content` (lesha724) +- Bug #15802: Fixed exception class in yii\di\Container (vuchastyi, developeruz) - Bug #15826: Fixed JavaScript compareValidator in `yii.validation.js` for attributes not in rules (mgrechanik) -- Enh #16365: Added $filterOnFocusOut option for GridView (s1lver) -- Enh #14289: Added `yii\db\Command::executeResetSequence()` to work with Oracle (CedricYii) -- Enh #9133: Added `yii\behaviors\OptimisticLockBehavior` (tunecino) -- Bug #16104: Fixed `yii\db\pgsql\QueryBuilder::dropIndex()` to prepend index name with schema name (wapmorgan) -- Bug #16193: Fixed `yii\filters\Cors` to not reflect origin header value when configured to wildcard origins (Jianjun Chen) -- Bug #16068: Fixed `yii\web\CookieCollection::has` when an expiration param is set to 'until the browser is closed' (OndrejVasicek) +- Bug #15850: check basePath is writable on publish in AssetManager (Groonya) +- Bug #15875: afterSave for new models flushes unsaved data (shirase) +- Bug #15876: `yii\db\ActiveQuery::viaTable()` now throws `InvalidConfigException`, if query is not prepared correctly (silverfire) +- Bug #15889: Fixed override `yii\helpers\Html::setActivePlaceholder` (lesha724) +- Bug #15931: `yii\db\ActiveRecord::findOne()` now accepts quoted table and column names using curly and square braces respectively (silverfire) +- Bug #15988: Fixed bash completion (alekciy) - Bug #16006: Handle case when `X-Forwarded-Host` header have multiple hosts separated with a comma (pgaultier) - Bug #16010: Fixed `yii\filters\ContentNegotiator` behavior when GET parameters contain an array (rugabarbo) -- Bug #14660: Fixed `yii\caching\DbCache` concurrency issue when set values with the same key (rugabarbo) -- Bug #15802: Fixed exception class in yii\di\Container (vuchastyi, developeruz) -- Bug #15988: Fixed bash completion (alekciy) -- Bug #15798: Fixed render `yii\grid\RadioButtonColumn::$content` and `yii\grid\CheckboxColumn::$content` (lesha724) -- Bug #15548: Fixed index names collision in RBAC (gonimar) -- Bug #15117: Fixed `yii\db\Schema::getTableMetadata` cache refreshing (boboldehampsink) -- Bug #15875: afterSave for new models flushes unsaved data (shirase) +- Bug #16022: Fix UniqueValidator for PostgreSQL. Checks the uniqueness of keys in `jsonb` field (lav45) +- Bug #16028: Fix serialization of complex cache keys that contain non-UTF sequences (rugabarbo) +- Bug #16039: Fixed implicit conversion from `char` to `varbinnary` in MSSQL (vsivsivsi) +- Bug #16068: Fixed `yii\web\CookieCollection::has` when an expiration param is set to 'until the browser is closed' (OndrejVasicek) - Bug #16073: Fixed regression in Oracle `IN` condition builder for more than 1000 items (cebe) -- Bug #16120: FileCache: rebuild cache file before touch when different file owner (Slamdunk) +- Bug #16081: Fixed composite IN using just one column (rugabarbo) - Bug #16091: Make `yii\test\InitDbFixture` work with non-SQL DBMS (cebe) +- Bug #16101: Fixed Error Handler to clear registered meta tags, link tags, css/js scripts and files in error view (bizley) +- Bug #16104: Fixed `yii\db\pgsql\QueryBuilder::dropIndex()` to prepend index name with schema name (wapmorgan) +- Bug #16120: FileCache: rebuild cache file before touch when different file owner (Slamdunk) +- Bug #16183: Fixed when `yii\helpers\BaseFileHelper` sometimes returned wrong value (samdark, SilverFire, OndrejVasicek) - Bug #16184: Fixed `yii\base\Widget` to access `stack` property with `self` instead of `static` (yanggs07) -- Bug #16039: Fixed implicit conversion from `char` to `varbinnary` in MSSQL (vsivsivsi) +- Bug #16193: Fixed `yii\filters\Cors` to not reflect origin header value when configured to wildcard origins (Jianjun Chen) - Bug #16217: Fixed `yii\console\controllers\HelpController` to work well in Windows environment (samdark) -- Bug #14636: Views can now use relative paths even when using themed views (sammousa) - Bug #16245: Fixed `__isset()` in `BaseActiveRecord` not catching errors (sammousa) +- Bug #16252: Fixed `yii\base\DynamicModel` for checking exist property (vuongxuongminh) +- Bug #16253: Fixed empty checkboxlist validation (GHopperMSK) - Bug #16266: Fixed `yii\helpers\BaseStringHelper` where explode would not allow 0 as trim string (Thoulah) -- Bug #16278: Fixed drop existing views when console `migrate/fresh` command runs (developeruz) - Bug #16277: Fixed `yii\db\Query::from()` to respect `yii\db\ExpressionInterface` (noname007) +- Bug #16278: Fixed drop existing views when console `migrate/fresh` command runs (developeruz) - Bug #16280: Fixed `yii\base\Model::getActiveValidators()` to return correct validators for attribute on scenario (paweljankowiak06) -- Enh #16191: Enhanced `yii\helpers\Inflector` to work correctly with UTF-8 (silverfire) -- Bug #16252: Fixed `yii\base\DynamicModel` for checking exist property (vuongxuongminh) -- Bug: Fixed bad instanceof check in `yii\db\Schema::getTableMetadata()` (samdark) - Bug #16292: Fixed misconfigured CORS filter exception throwing. Now it throws `InvalidConfigException` in Debug mode (khvalov) - Bug #16301: Fixed `yii\web\User::setIdentity()` to clear access check cache while setting identity object to `null` (Izumi-kun) - Bug #16322: Fixed strings were not were not compared using timing attack resistant approach while CSRF token validation (samdark, Felix Wiedemann) -- Chg #16192: `yii\db\Command::logQuery()` is now protected, extracted `getCacheKey()` from `queryInternal()` (drlibra) - Bug #16331: Fixed console table without headers (rhertogh) - Bug #16377: Fixed `yii\base\Event:off()` undefined index error when event handler does not match (razvanphp) +- Bug #16424: `yii\db\Transaction::begin()` throws now `NotSupportedException` for nested transaction and DBMS not supporting savepoints (bizley) +- Bug #16425: Check for additional values for disabled confirm dialog (Alex-Code, s1lver) +- Bug #16469: Allow cache to be specified as interface and to be configured in DI container (alexeevdv) +- Bug #16490: Fix schema on rbac init (marcelodeandrade) - Bug #16514: Fixed `yii\di\Container::resolveCallableDependencies` to support callable object (wi1dcard) -- Bug #15889: Fixed override `yii\helpers\Html::setActivePlaceholder` (lesha724) -- Enh #16522: Allow jQuery 3.3 (Slamdunk) -- Enh #16603: Added `yii\mutex\FileMutex::$isWindows` for Windows file shares on Unix guest machines (brandonkelly) -- Bug #16666: Fixed `yii\helpers\ArrayHelper::merge` (rustamwin) -- Enh: `yii\helpers\UnsetArrayValue`, `yii\helpers\ReplaceArrayValue` object now can be restored after serialization using `var_export()` function (silvefire) +- Bug #16527: Fixed return content for `\yii\widgets\ActiveForm::run()` (carono) - Bug #16552: Added check in `yii\db\ActiveQuery::prepare()` to prevent populating already populated relation when another relation is requested with `via` (drlibra) -- Bug #10843: Additional hidden input rendered by `yii\helpers\BaseHtml` methods inherits `disabled` HTML option if provided and set to `true` (bizley) -- Bug #16424: `yii\db\Transaction::begin()` throws now `NotSupportedException` for nested transaction and DBMS not supporting savepoints (bizley) -- Bug #15204: `yii\helpers\BaseInflector::slug()` is not removing substrings matching provided replacement from given string anymore (bizley) -- Bug #15528: Fix timestamp formatting to always use decimal notation in `yii\log\Target::getTime()` (rob006) -- Bug #16101: Fixed Error Handler to clear registered meta tags, link tags, css/js scripts and files in error view (bizley) +- Bug #16558: Added cloning `yii\data\ActiveDataProvider::query` property when ActiveDataProvider object is cloned (mgrechanik) +- Bug #16580: Delete unused php message files in MessageController if `$removeUnused` option is on (Groonya) +- Bug #16648: Html::strtolower() was corrupting UTF-8 strings (Kolyunya) +- Bug #16657: Ensure widgets after run event result contains the result of the rendered widget (AdeAttwood) +- Bug #16666: Fixed `yii\helpers\ArrayHelper::merge` (rustamwin) +- Bug #16680: Fixed ActiveField 'text' input with maxlength (s1lver) +- Bug #16687: Add missing translations for `nl-NL` durations used in `yii\i18n\Formatter::asDuration()` (alexeevdv) +- Bug #16716: The ability to filter by pressing the Enter key when the option `$filterOnFocusOut` off (s1lver) +- Bug #16748: Fixed params when normalize data (marcelodeandrade) +- Bug #16752: Fix rotating files under Windows (samdark, nadirvishun) +- Bug #16766: `yii\filters\ContentNegotiator` was not setting `Vary` header to inform cache recipients (koteq, cebe, samdark) +- Bug #16822: Create config dir recursively in message/config (Groonya) +- Bug #16828: `yii\console\controllers\MessageController::translator` recognized object' methods and functions calls as identical sets of tokens (erickskrauch) - Bug #16836: Fix `yii\mutex\MysqlMutex` to handle locks with names longer than 64 characters (rob006) - Bug #16838: `yii\mutex\Mutex::acquire()` no longer returns `true` if lock is already acquired by the same component in the same process (rob006) -- Enh #16839: Increase frequency of lock tries for `yii\mutex\FileMutex::acquireLock()` when $timeout is provided (rob006) -- Enh #16839: Add support for `$timeout` in `yii\mutex\PgsqlMutex::acquire()` (rob006) -- Bug #16828: `yii\console\controllers\MessageController::translator` recognized object' methods and functions calls as identical sets of tokens (erickskrauch) - Bug #16858: Allow `\yii\console\widgets\Table` to render empty table when headers provided but no columns (damiandziaduch) -- Bug #14950: Fixed `yii\i18n\Formatter` methods `asInteger`, `asDecimal`, `asPercent`, and `asCurrency` outputs for very big numbers (bizley) +- Bug #16891: Fixed Pagination::totalCount initialized incorrectly (taobig) - Bug #16897: Fixed `yii\db\sqlite\Schema` missing primary key constraint detection in case of `INTEGER PRIMARY KEY` (bizley) -- Bug #16687: Add missing translations for `nl-NL` durations used in `yii\i18n\Formatter::asDuration()` (alexeevdv) -- Bug #16469: Allow cache to be specified as interface and to be configured in DI container (alexeevdv) +- Bug #16903: Fixed 'yii\validators\NumberValidator' method 'isNotNumber' returns false for true/false value (annechko) +- Bug #16910: Fix messages sorting on extract (Groonya) +- Bug #16945: Fixed RBAC DbManager ruleName fetching on the case of PDO::ATTR_ORACLE_NULLS => PDO::NULL_TO_STRING (razonyang) - Bug #16959: Fixed typo in if condition inside `yii\web\DbSession::typecastFields()` that caused problems with session overwriting (silverfire) -- Bug #15876: `yii\db\ActiveQuery::viaTable()` now throws `InvalidConfigException`, if query is not prepared correctly (silverfire) -- Bug #15931: `yii\db\ActiveRecord::findOne()` now accepts quoted table and column names using curly and square braces respectively (silverfire) +- Bug #16966: Fix ArrayExpression support in related tables (GHopperMSK) +- Bug #16969: Fix `yii\filters\PageCache` incorrectly storing empty data in some cases (sammousa) +- Bug #16974: Regular Expression Validator to include support for 'u' (UTF-8) modifier (Dzhuneyt) +- Bug #16991: Removed usage of `utf8_encode()` from `Request::resolvePathInfo()` (GHopperMSK) +- Bug #17021: Fix to do not remove existing message category files in a subfolder (albertborsos) +- Bug: Fixed bad instanceof check in `yii\db\Schema::getTableMetadata()` (samdark) - Bug: (CVE-2018-14578): Fixed CSRF token check bypassing in `\yii\web\Request::getMethod()` (silverfire) - Bug: (CVE-2018-19454): Fixed excess logging of sensitive information in `\yii\log\Target` (silverfire) +- Enh #9133: Added `yii\behaviors\OptimisticLockBehavior` (tunecino) +- Enh #14289: Added `yii\db\Command::executeResetSequence()` to work with Oracle (CedricYii) +- Enh #14367: In `yii\db\mysql\QueryBuilder` added support fractional seconds for time types for MySQL >= 5.6.4 (konstantin-vl) +- Enh #16151: `ActiveQuery::getTableNameAndAlias()` is now protected (s1lver) +- Enh #16151: Change of scope for method `getTableNameAndAlias()` (s1lver) +- Enh #16191: Enhanced `yii\helpers\Inflector` to work correctly with UTF-8 (silverfire) +- Enh #16365: Added $filterOnFocusOut option for GridView (s1lver) +- Enh #16522: Allow jQuery 3.3 (Slamdunk) +- Enh #16603: Added `yii\mutex\FileMutex::$isWindows` for Windows file shares on Unix guest machines (brandonkelly) +- Enh #16839: Increase frequency of lock tries for `yii\mutex\FileMutex::acquireLock()` when $timeout is provided (rob006) +- Enh #16839: Add support for `$timeout` in `yii\mutex\PgsqlMutex::acquire()` (rob006) +- Enh: `yii\helpers\UnsetArrayValue`, `yii\helpers\ReplaceArrayValue` object now can be restored after serialization using `var_export()` function (silvefire) +- Chg #16192: `yii\db\Command::logQuery()` is now protected, extracted `getCacheKey()` from `queryInternal()` (drlibra) +- Chg #16941: Set `yii\console\controllers\MigrateController::useTablePrefix` to true as default value (GHopperMSK) 2.0.15.1 March 21, 2018 diff --git a/framework/behaviors/OptimisticLockBehavior.php b/framework/behaviors/OptimisticLockBehavior.php index 026baef..fb01a1a 100644 --- a/framework/behaviors/OptimisticLockBehavior.php +++ b/framework/behaviors/OptimisticLockBehavior.php @@ -14,17 +14,17 @@ use yii\validators\NumberValidator; 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 @@ -41,16 +41,16 @@ use yii\helpers\ArrayHelper; * 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: * @@ -74,6 +74,7 @@ class OptimisticLockBehavior extends AttributeBehavior * {@inheritdoc} */ public $skipUpdateOnClean = false; + /** * @var string the attribute name holding the version value. */ diff --git a/framework/caching/Cache.php b/framework/caching/Cache.php index 6f03482..e87519e 100644 --- a/framework/caching/Cache.php +++ b/framework/caching/Cache.php @@ -84,6 +84,7 @@ abstract class Cache extends Component implements CacheInterface */ private $_igbinaryAvailable = false; + /** * {@inheritdoc} */ diff --git a/framework/classes.php b/framework/classes.php index 380b283..400f550 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -66,6 +66,7 @@ return [ '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', @@ -291,6 +292,7 @@ return [ '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', diff --git a/framework/db/mysql/QueryBuilder.php b/framework/db/mysql/QueryBuilder.php index 2394d45..a210760 100644 --- a/framework/db/mysql/QueryBuilder.php +++ b/framework/db/mysql/QueryBuilder.php @@ -46,6 +46,7 @@ class QueryBuilder extends \yii\db\QueryBuilder Schema::TYPE_JSON => 'json' ]; + /** * {@inheritdoc} */ diff --git a/framework/i18n/Locale.php b/framework/i18n/Locale.php index c2670a3..00a7fde 100644 --- a/framework/i18n/Locale.php +++ b/framework/i18n/Locale.php @@ -15,10 +15,10 @@ use yii\base\InvalidConfigException; * 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 { diff --git a/framework/log/Target.php b/framework/log/Target.php index 9675ddf..e39e72b 100644 --- a/framework/log/Target.php +++ b/framework/log/Target.php @@ -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. @@ -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. * diff --git a/framework/mutex/PgsqlMutex.php b/framework/mutex/PgsqlMutex.php index a7207cd..8c38c75 100644 --- a/framework/mutex/PgsqlMutex.php +++ b/framework/mutex/PgsqlMutex.php @@ -38,6 +38,7 @@ class PgsqlMutex extends DbMutex { use RetryAcquireTrait; + /** * Initializes PgSQL specific mutex component implementation. * @throws InvalidConfigException if [[db]] is not PgSQL connection. diff --git a/framework/validators/Validator.php b/framework/validators/Validator.php index 1f53f3f..f445789 100644 --- a/framework/validators/Validator.php +++ b/framework/validators/Validator.php @@ -49,6 +49,7 @@ use yii\base\NotSupportedException; * 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 * @since 2.0 diff --git a/framework/web/AssetManager.php b/framework/web/AssetManager.php index f6031a4..7c79081 100644 --- a/framework/web/AssetManager.php +++ b/framework/web/AssetManager.php @@ -425,7 +425,7 @@ class AssetManager extends Component * 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.