diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 002b0f61ed8..b15445a2cf0 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -93,7 +93,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.44-dev'; + return '2.0.44'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 4929689114e..b08f3561d67 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,43 +1,43 @@ Yii Framework 2 Change Log ========================== -2.0.44 under development +2.0.44 December 30, 2021 ------------------------ +- Bug #17119: Fix `yii\caching\Cache::multiSet()` to use `yii\caching\Cache::$defaultDuration` when no duration is passed (OscarBarrett) +- Bug #18646: Remove stale identity data from session if `IdentityInterface::findIdentity()` returns `null` (mikehaertl) - Bug #18660: Fix database migration template does not work with namespaced migrations when migration name does not include namespace (iridance) -- Enh #13105: Add yiiActiveForm `validate_only` property for skipping form auto-submission (ptolomaues) -- Enh #18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` (AnkIF) - Bug #18798: Fix `StringHelper::dirname()` when passing string with a trailing slash (perlexed) -- Enh #18328: Raise warning when trying to register a file after `View::endPage()` has been called (perlexed) -- Enh #18812: Add error messages and optimize "error" methods in `yii\helpers\BaseJson` (WinterSilence, samdark) -- Chg #18823: Rollback changes from #18806 in `yii\validators\ExistValidator::checkTargetRelationExistence()` (WinterSilence) -- Enh #18826: Add ability to turn the sorting off for a clicked column in GridView with multisort (ditibal) -- Bug #18646: Remove stale identity data from session if `IdentityInterface::findIdentity()` returns `null` (mikehaertl) - Bug #18832: Fix `Inflector::camel2words()` adding extra spaces (brandonkelly) -- Enh #18762: Add `yii\helpers\Json::$keepObjectType` and `yii\web\JsonResponseFormatter::$keepObjectType` in order to avoid changing zero-indexed objects to array in `yii\helpers\Json::encode()` (zebraf1) -- Enh #18783: Add support for URI namespaced tags in `XmlResponseFormatter` (WinterSilence, samdark) -- Enh #18783: Add `XmlResponseFormatter::$objectTagToLowercase` option to lowercase object tags (WinterSilence, samdark) -- Bug #18845: Fix duplicating `id` in `MigrateController::addDefaultPrimaryKey()` (WinterSilence, samdark) -- Bug #17119: Fix `yii\caching\Cache::multiSet()` to use `yii\caching\Cache::$defaultDuration` when no duration is passed (OscarBarrett) - Bug #18842: Fix `yii\base\Controller::bindInjectedParams()` to not throw error when argument of `ReflectionUnionType` type is passed (bizley) -- Enh #18858: Reduce memory usage in `yii\base\View::afterRender` method (LeoOnTheEarth) +- Bug #18845: Fix duplicating `id` in `MigrateController::addDefaultPrimaryKey()` (WinterSilence, samdark) - Bug #18880: Fix `yii\helpers\ArrayHelper::toArray()` for `DateTime` objects in PHP >= 7.4 (rhertogh) - Bug #18883: Fix `yii\web\HeaderCollection::fromArray()` now ensures lower case keys (rhertogh) -- Enh #18899: Replace usages of `strpos` with `strncmp` and remove redundant usage of `array_merge` and `array_values` (AlexGx) - Bug #18898: Fix `yii\helpers\Inflector::camel2words()` to work with words ending with 0 (michaelarnauts) -- Enh #18904: Improve Captcha client-side validation (hexkir) -- Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg) - Bug #18909: Fix bug with binding default action parameters for controllers (bizley) +- Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg) - Bug #18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` (WinterSilence) - Bug #18988: Fix default value of `yii\console\controllers\MessageController::$translator` (WinterSilence) -- Enh #19005: Add `yii\base\Module::setControllerPath()` (WinterSilence) - Bug #18993: Load defaults by `attributes()` in `yii\db\ActiveRecord::loadDefaultValues()` (WinterSilence) - Bug #19021: Fix return type in PhpDoc `yii\db\Migration` functions `up()`, `down()`, `safeUp()` and `safeDown()` (WinterSilence, rhertogh) -- Bug #19031: Fix displaying console help for parameters with declared types (WinterSilence) - Bug #19030: Add DI container usage to `yii\base\Widget::end()` (papppeter) +- Bug #19031: Fix displaying console help for parameters with declared types (WinterSilence) - Bug #19096: Fix `Request::getIsConsoleRequest()` may return erroneously when testing a Web application in Codeception (WinterSilence) +- Enh #13105: Add yiiActiveForm `validate_only` property for skipping form auto-submission (ptolomaues) +- Enh #18328: Raise warning when trying to register a file after `View::endPage()` has been called (perlexed) +- Enh #18762: Add `yii\helpers\Json::$keepObjectType` and `yii\web\JsonResponseFormatter::$keepObjectType` in order to avoid changing zero-indexed objects to array in `yii\helpers\Json::encode()` (zebraf1) +- Enh #18783: Add support for URI namespaced tags in `XmlResponseFormatter` (WinterSilence, samdark) +- Enh #18783: Add `XmlResponseFormatter::$objectTagToLowercase` option to lowercase object tags (WinterSilence, samdark) +- Enh #18812: Add error messages and optimize "error" methods in `yii\helpers\BaseJson` (WinterSilence, samdark) +- Enh #18826: Add ability to turn the sorting off for a clicked column in GridView with multisort (ditibal) +- Enh #18858: Reduce memory usage in `yii\base\View::afterRender` method (LeoOnTheEarth) +- Enh #18899: Replace usages of `strpos` with `strncmp` and remove redundant usage of `array_merge` and `array_values` (AlexGx) +- Enh #18904: Improve Captcha client-side validation (hexkir) +- Enh #18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` (AnkIF) +- Enh #19005: Add `yii\base\Module::setControllerPath()` (WinterSilence) - Enh #19098: Add `yii\helper\BaseHtml::$normalizeClassAttribute` to fix duplicate classes (WinterSilence) - Enh #19108: Optimize `Component::hasEventHandlers()` and `Component::trigger()` (WinterSilence) +- Chg #18823: Rollback changes from #18806 in `yii\validators\ExistValidator::checkTargetRelationExistence()` (WinterSilence) 2.0.43 August 09, 2021 diff --git a/framework/base/Action.php b/framework/base/Action.php index 5a9413cf296..0088f908d33 100644 --- a/framework/base/Action.php +++ b/framework/base/Action.php @@ -30,8 +30,7 @@ * * For more details and usage information on Action, see the [guide article on actions](guide:structure-controllers). * - * @property-read string $uniqueId The unique ID of this action among the whole application. This property is - * read-only. + * @property-read string $uniqueId The unique ID of this action among the whole application. * * @author Qiang Xue * @since 2.0 diff --git a/framework/base/Application.php b/framework/base/Application.php index 3e095447c17..edb63de3db2 100644 --- a/framework/base/Application.php +++ b/framework/base/Application.php @@ -14,40 +14,32 @@ * * For more details and usage information on Application, see the [guide article on applications](guide:structure-applications). * - * @property-read \yii\web\AssetManager $assetManager The asset manager application component. This property - * is read-only. - * @property-read \yii\rbac\ManagerInterface $authManager The auth manager application component. Null is - * returned if auth manager is not configured. This property is read-only. + * @property-read \yii\web\AssetManager $assetManager The asset manager application component. + * @property-read \yii\rbac\ManagerInterface|null $authManager The auth manager application component or null + * if it's not configured. * @property string $basePath The root directory of the application. * @property-read \yii\caching\CacheInterface $cache The cache application component. Null if the component is - * not enabled. This property is read-only. - * @property-write array $container Values given in terms of name-value pairs. This property is write-only. - * @property-read \yii\db\Connection $db The database connection. This property is read-only. + * not enabled. + * @property-write array $container Values given in terms of name-value pairs. + * @property-read \yii\db\Connection $db The database connection. * @property-read \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application - * component. This property is read-only. - * @property-read \yii\i18n\Formatter $formatter The formatter application component. This property is - * read-only. - * @property-read \yii\i18n\I18N $i18n The internationalization application component. This property is - * read-only. - * @property-read \yii\log\Dispatcher $log The log dispatcher application component. This property is - * read-only. - * @property-read \yii\mail\MailerInterface $mailer The mailer application component. This property is - * read-only. - * @property-read \yii\web\Request|\yii\console\Request $request The request component. This property is - * read-only. - * @property-read \yii\web\Response|\yii\console\Response $response The response component. This property is - * read-only. + * component. + * @property-read \yii\i18n\Formatter $formatter The formatter application component. + * @property-read \yii\i18n\I18N $i18n The internationalization application component. + * @property-read \yii\log\Dispatcher $log The log dispatcher application component. + * @property-read \yii\mail\MailerInterface $mailer The mailer application component. + * @property-read \yii\web\Request|\yii\console\Request $request The request component. + * @property-read \yii\web\Response|\yii\console\Response $response The response component. * @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime" * subdirectory under [[basePath]]. - * @property-read \yii\base\Security $security The security application component. This property is read-only. + * @property-read \yii\base\Security $security The security application component. * @property string $timeZone The time zone used by this application. - * @property-read string $uniqueId The unique ID of the module. This property is read-only. - * @property-read \yii\web\UrlManager $urlManager The URL manager for this application. This property is - * read-only. + * @property-read string $uniqueId The unique ID of the module. + * @property-read \yii\web\UrlManager $urlManager The URL manager for this application. * @property string $vendorPath The directory that stores vendor files. Defaults to "vendor" directory under * [[basePath]]. * @property-read View|\yii\web\View $view The view application component that is used to render various view - * files. This property is read-only. + * files. * * @author Qiang Xue * @since 2.0 diff --git a/framework/base/Component.php b/framework/base/Component.php index bd09925f8b8..93df0262b87 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -93,8 +93,7 @@ * * For more details and usage information on Component, see the [guide article on components](guide:concept-components). * - * @property-read Behavior[] $behaviors List of behaviors attached to this component. This property is - * read-only. + * @property-read Behavior[] $behaviors List of behaviors attached to this component. * * @author Qiang Xue * @since 2.0 diff --git a/framework/base/Controller.php b/framework/base/Controller.php index 0c79060ceff..fe605307443 100644 --- a/framework/base/Controller.php +++ b/framework/base/Controller.php @@ -16,12 +16,9 @@ * * For more details and usage information on Controller, see the [guide article on controllers](guide:structure-controllers). * - * @property-read Module[] $modules All ancestor modules that this controller is located within. This property - * is read-only. + * @property-read Module[] $modules All ancestor modules that this controller is located within. * @property-read string $route The route (module ID, controller ID and action ID) of the current request. - * This property is read-only. - * @property-read string $uniqueId The controller ID that is prefixed with the module ID (if any). This - * property is read-only. + * @property-read string $uniqueId The controller ID that is prefixed with the module ID (if any). * @property View|\yii\web\View $view The view object that can be used to render views or view files. * @property string $viewPath The directory containing the view files for this controller. * diff --git a/framework/base/Model.php b/framework/base/Model.php index 204242143c1..e957a96c31e 100644 --- a/framework/base/Model.php +++ b/framework/base/Model.php @@ -38,19 +38,18 @@ * For more details and usage information on Model, see the [guide article on models](guide:structure-models). * * @property-read \yii\validators\Validator[] $activeValidators The validators applicable to the current - * [[scenario]]. This property is read-only. + * [[scenario]]. * @property array $attributes Attribute values (name => value). - * @property-read array $errors An array of errors for all attributes. Empty array is returned if no error. - * The result is a two-dimensional array. See [[getErrors()]] for detailed description. This property is - * read-only. + * @property-read array $errors Errors for all attributes or the specified attribute. Empty array is returned + * if no error. See [[getErrors()]] for detailed description. Note that when returning errors for all attributes, + * the result is a two-dimensional array, like the following: ```php [ 'username' => [ 'Username is required.', + * 'Username must contain only word characters.', ], 'email' => [ 'Email address is invalid.', ] ] ``` . * @property-read array $firstErrors The first errors. The array keys are the attribute names, and the array - * values are the corresponding error messages. An empty array will be returned if there is no error. This - * property is read-only. - * @property-read ArrayIterator $iterator An iterator for traversing the items in the list. This property is - * read-only. + * values are the corresponding error messages. An empty array will be returned if there is no error. + * @property-read ArrayIterator $iterator An iterator for traversing the items in the list. * @property string $scenario The scenario that this model is in. Defaults to [[SCENARIO_DEFAULT]]. * @property-read ArrayObject|\yii\validators\Validator[] $validators All the validators declared in the - * model. This property is read-only. + * model. * * @author Qiang Xue * @since 2.0 @@ -561,7 +560,7 @@ public function hasErrors($attribute = null) /** * Returns the errors for all attributes or a single attribute. - * @param string|null $attribute attribute name. Use null to retrieve errors for all attributes. + * @param string|null $attribute attribute name. Use null to retrieve errors for all attributes. * @return array errors for all attributes or the specified attribute. Empty array is returned if no error. * See [[getErrors()]] for detailed description. * Note that when returning errors for all attributes, the result is a two-dimensional array, like the following: diff --git a/framework/base/Module.php b/framework/base/Module.php index 184eada4d62..03f1a02a4df 100644 --- a/framework/base/Module.php +++ b/framework/base/Module.php @@ -25,12 +25,12 @@ * * @property-write array $aliases List of path aliases to be defined. The array keys are alias names (must * start with `@`) and the array values are the corresponding paths or aliases. See [[setAliases()]] for an - * example. This property is write-only. + * example. * @property string $basePath The root directory of the module. - * @property string $controllerPath The root directory that contains the controller classes. + * @property string $controllerPath The directory that contains the controller classes. * @property string $layoutPath The root directory of layout files. Defaults to "[[viewPath]]/layouts". * @property array $modules The modules (indexed by their IDs). - * @property-read string $uniqueId The unique ID of the module. This property is read-only. + * @property-read string $uniqueId The unique ID of the module. * @property string $version The version of this module. Note that the type of this property differs in getter * and setter. See [[getVersion()]] and [[setVersion()]] for details. * @property string $viewPath The root directory of view files. Defaults to "[[basePath]]/views". @@ -130,7 +130,6 @@ class Module extends ServiceLocator * @var array child modules of this module */ private $_modules = []; - /** * @var string|callable the version of this module. * Version can be specified as a PHP callback, which can accept module instance as an argument and should diff --git a/framework/base/View.php b/framework/base/View.php index 1cb79cfcf92..130845f268a 100644 --- a/framework/base/View.php +++ b/framework/base/View.php @@ -21,7 +21,7 @@ * For more details and usage information on View, see the [guide article on views](guide:structure-views). * * @property-read string|bool $viewFile The view file currently being rendered. False if no view file is being - * rendered. This property is read-only. + * rendered. * * @author Qiang Xue * @since 2.0 diff --git a/framework/base/Widget.php b/framework/base/Widget.php index 2f34a26ead0..696b803d8e4 100644 --- a/framework/base/Widget.php +++ b/framework/base/Widget.php @@ -19,8 +19,7 @@ * setter. See [[getId()]] and [[setId()]] for details. * @property \yii\web\View $view The view object that can be used to render views or view files. Note that the * type of this property differs in getter and setter. See [[getView()]] and [[setView()]] for details. - * @property-read string $viewPath The directory containing the view files for this widget. This property is - * read-only. + * @property-read string $viewPath The directory containing the view files for this widget. * * @author Qiang Xue * @since 2.0 diff --git a/framework/caching/MemCache.php b/framework/caching/MemCache.php index 9c1e1791a3f..c37e5b0e5ca 100644 --- a/framework/caching/MemCache.php +++ b/framework/caching/MemCache.php @@ -56,7 +56,7 @@ * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). * * @property-read \Memcache|\Memcached $memcache The memcache (or memcached) object used by this cache - * component. This property is read-only. + * component. * @property MemCacheServer[] $servers List of memcache server configurations. Note that the type of this * property differs in getter and setter. See [[getServers()]] and [[setServers()]] for details. * diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php index c3b9c420e27..0f0d7d32652 100644 --- a/framework/captcha/CaptchaAction.php +++ b/framework/captcha/CaptchaAction.php @@ -31,7 +31,7 @@ * to be validated by the 'captcha' validator. * 3. In the controller view, insert a [[Captcha]] widget in the form. * - * @property-read string $verifyCode The verification code. This property is read-only. + * @property-read string $verifyCode The verification code. * * @author Qiang Xue * @since 2.0 diff --git a/framework/console/Application.php b/framework/console/Application.php index 4ee2535249d..ffe506eebe9 100644 --- a/framework/console/Application.php +++ b/framework/console/Application.php @@ -50,10 +50,9 @@ * yii help * ``` * - * @property-read ErrorHandler $errorHandler The error handler application component. This property is - * read-only. - * @property-read Request $request The request component. This property is read-only. - * @property-read Response $response The response component. This property is read-only. + * @property-read ErrorHandler $errorHandler The error handler application component. + * @property-read Request $request The request component. + * @property-read Response $response The response component. * * @author Qiang Xue * @since 2.0 diff --git a/framework/console/Controller.php b/framework/console/Controller.php index 09495686a3d..55fb31bb2a0 100644 --- a/framework/console/Controller.php +++ b/framework/console/Controller.php @@ -28,6 +28,7 @@ * where `` is a route to a controller action and the params will be populated as properties of a command. * See [[options()]] for details. * + * @property-read string $help The help information for this controller. * @property-read string $helpSummary The one-line short summary describing this controller. * @property-read array $passedOptionValues The properties corresponding to the passed options. * @property-read array $passedOptions The names of the options passed during execution. diff --git a/framework/console/controllers/HelpController.php b/framework/console/controllers/HelpController.php index 712fa76028a..f61875f00a2 100644 --- a/framework/console/controllers/HelpController.php +++ b/framework/console/controllers/HelpController.php @@ -30,7 +30,7 @@ * In the above, if the command name is not provided, all * available commands will be displayed. * - * @property-read array $commands All available command names. This property is read-only. + * @property-read array $commands All available command names. * * @author Qiang Xue * @since 2.0 diff --git a/framework/console/widgets/Table.php b/framework/console/widgets/Table.php index 99fd5d23234..537bd31fbcf 100644 --- a/framework/console/widgets/Table.php +++ b/framework/console/widgets/Table.php @@ -40,8 +40,8 @@ * ], * ]); * - * @property-write string $listPrefix List prefix. This property is write-only. - * @property-write int $screenWidth Screen width. This property is write-only. + * @property-write string $listPrefix List prefix. + * @property-write int $screenWidth Screen width. * * @author Daniel Gomez Pan * @since 2.0.13 diff --git a/framework/data/BaseDataProvider.php b/framework/data/BaseDataProvider.php index 5be48a17712..4bd8cc393a4 100644 --- a/framework/data/BaseDataProvider.php +++ b/framework/data/BaseDataProvider.php @@ -16,7 +16,7 @@ * * For more details and usage information on BaseDataProvider, see the [guide article on data providers](guide:output-data-providers). * - * @property-read int $count The number of data models in the current page. This property is read-only. + * @property-read int $count The number of data models in the current page. * @property array $keys The list of key values corresponding to [[models]]. Each data model in [[models]] is * uniquely identified by the corresponding key value in this array. * @property array $models The list of data models in the current page. diff --git a/framework/data/Pagination.php b/framework/data/Pagination.php index 247d907aa8a..2f5acf5781f 100644 --- a/framework/data/Pagination.php +++ b/framework/data/Pagination.php @@ -60,13 +60,13 @@ * * @property-read int $limit The limit of the data. This may be used to set the LIMIT value for a SQL * statement for fetching the current page of data. Note that if the page size is infinite, a value -1 will be - * returned. This property is read-only. + * returned. * @property-read array $links The links for navigational purpose. The array keys specify the purpose of the - * links (e.g. [[LINK_FIRST]]), and the array values are the corresponding URLs. This property is read-only. + * links (e.g. [[LINK_FIRST]]), and the array values are the corresponding URLs. * @property-read int $offset The offset of the data. This may be used to set the OFFSET value for a SQL - * statement for fetching the current page of data. This property is read-only. + * statement for fetching the current page of data. * @property int $page The zero-based current page number. - * @property-read int $pageCount Number of pages. This property is read-only. + * @property-read int $pageCount Number of pages. * @property int $pageSize The number of items per page. If it is less than 1, it means the page size is * infinite, and thus a single page contains all items. * diff --git a/framework/data/Sort.php b/framework/data/Sort.php index bbb1ce9b336..3ce65af3427 100644 --- a/framework/data/Sort.php +++ b/framework/data/Sort.php @@ -72,7 +72,7 @@ * `SORT_ASC` for ascending order or `SORT_DESC` for descending order. Note that the type of this property * differs in getter and setter. See [[getAttributeOrders()]] and [[setAttributeOrders()]] for details. * @property-read array $orders The columns (keys) and their corresponding sort directions (values). This can - * be passed to [[\yii\db\Query::orderBy()]] to construct a DB query. This property is read-only. + * be passed to [[\yii\db\Query::orderBy()]] to construct a DB query. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php index d5675479c10..8ae060221a8 100644 --- a/framework/db/BaseActiveRecord.php +++ b/framework/db/BaseActiveRecord.php @@ -23,19 +23,17 @@ * * See [[\yii\db\ActiveRecord]] for a concrete implementation. * - * @property-read array $dirtyAttributes The changed attribute values (name-value pairs). This property is - * read-only. + * @property-read array $dirtyAttributes The changed attribute values (name-value pairs). * @property bool $isNewRecord Whether the record is new and should be inserted when calling [[save()]]. * @property array $oldAttributes The old attribute values (name-value pairs). Note that the type of this * property differs in getter and setter. See [[getOldAttributes()]] and [[setOldAttributes()]] for details. * @property-read mixed $oldPrimaryKey The old primary key value. An array (column name => column value) is * returned if the primary key is composite. A string is returned otherwise (null will be returned if the key - * value is null). This property is read-only. + * value is null). * @property-read mixed $primaryKey The primary key value. An array (column name => column value) is returned * if the primary key is composite. A string is returned otherwise (null will be returned if the key value is - * null). This property is read-only. - * @property-read array $relatedRecords An array of related records indexed by relation names. This property - * is read-only. + * null). + * @property-read array $relatedRecords An array of related records indexed by relation names. * * @author Qiang Xue * @author Carsten Brandt diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 74b954ffa43..65fb8f7d7bf 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -111,24 +111,22 @@ * ``` * * @property string $driverName Name of the DB driver. - * @property-read bool $isActive Whether the DB connection is established. This property is read-only. + * @property-read bool $isActive Whether the DB connection is established. * @property-read string $lastInsertID The row ID of the last row inserted, or the last value retrieved from - * the sequence object. This property is read-only. + * the sequence object. * @property-read Connection $master The currently active master connection. `null` is returned if there is no - * master available. This property is read-only. - * @property-read PDO $masterPdo The PDO instance for the currently active master connection. This property is - * read-only. + * master available. + * @property-read PDO $masterPdo The PDO instance for the currently active master connection. * @property QueryBuilder $queryBuilder The query builder for the current DB connection. Note that the type of * this property differs in getter and setter. See [[getQueryBuilder()]] and [[setQueryBuilder()]] for details. - * @property-read Schema $schema The schema information for the database opened by this connection. This - * property is read-only. - * @property-read string $serverVersion Server version as a string. This property is read-only. + * @property-read Schema $schema The schema information for the database opened by this connection. + * @property-read string $serverVersion Server version as a string. * @property-read Connection $slave The currently active slave connection. `null` is returned if there is no - * slave available and `$fallbackToMaster` is false. This property is read-only. + * slave available and `$fallbackToMaster` is false. * @property-read PDO $slavePdo The PDO instance for the currently active slave connection. `null` is returned - * if no slave connection is available and `$fallbackToMaster` is false. This property is read-only. + * if no slave connection is available and `$fallbackToMaster` is false. * @property-read Transaction|null $transaction The currently active transaction. Null if no active - * transaction. This property is read-only. + * transaction. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/DataReader.php b/framework/db/DataReader.php index a8c875606d1..99427f96430 100644 --- a/framework/db/DataReader.php +++ b/framework/db/DataReader.php @@ -40,10 +40,10 @@ * [[fetchMode]]. See the [PHP manual](https://www.php.net/manual/en/function.PDOStatement-setFetchMode.php) * for more details about possible fetch mode. * - * @property-read int $columnCount The number of columns in the result set. This property is read-only. - * @property-write int $fetchMode Fetch mode. This property is write-only. - * @property-read bool $isClosed Whether the reader is closed or not. This property is read-only. - * @property-read int $rowCount Number of rows contained in the result. This property is read-only. + * @property-read int $columnCount The number of columns in the result set. + * @property-write int $fetchMode Fetch mode. + * @property-read bool $isClosed Whether the reader is closed or not. + * @property-read int $rowCount Number of rows contained in the result. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/Query.php b/framework/db/Query.php index d23893b3bc7..857339f95dd 100644 --- a/framework/db/Query.php +++ b/framework/db/Query.php @@ -42,7 +42,7 @@ * * A more detailed usage guide on how to work with Query can be found in the [guide article on Query Builder](guide:db-query-builder). * - * @property-read string[] $tablesUsedInFrom Table names indexed by aliases. This property is read-only. + * @property-read string[] $tablesUsedInFrom Table names indexed by aliases. * * @author Qiang Xue * @author Carsten Brandt diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php index bb032d78830..c5e27e83102 100644 --- a/framework/db/QueryBuilder.php +++ b/framework/db/QueryBuilder.php @@ -23,9 +23,9 @@ * For more details and usage information on QueryBuilder, see the [guide article on query builders](guide:db-query-builder). * * @property-write string[] $conditionClasses Map of condition aliases to condition classes. For example: - * ```php ['LIKE' => yii\db\condition\LikeCondition::class] ``` . This property is write-only. + * ```php ['LIKE' => yii\db\condition\LikeCondition::class] ``` . * @property-write string[] $expressionBuilders Array of builders that should be merged with the pre-defined - * ones in [[expressionBuilders]] property. This property is write-only. + * ones in [[expressionBuilders]] property. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/Schema.php b/framework/db/Schema.php index 71a6ea57759..524a12ce04f 100644 --- a/framework/db/Schema.php +++ b/framework/db/Schema.php @@ -22,19 +22,17 @@ * Schema represents the database schema information that is DBMS specific. * * @property-read string $lastInsertID The row ID of the last row inserted, or the last value retrieved from - * the sequence object. This property is read-only. - * @property-read QueryBuilder $queryBuilder The query builder for this connection. This property is - * read-only. - * @property-read string[] $schemaNames All schema names in the database, except system schemas. This property - * is read-only. - * @property-read string $serverVersion Server version as a string. This property is read-only. - * @property-read string[] $tableNames All table names in the database. This property is read-only. + * the sequence object. + * @property-read QueryBuilder $queryBuilder The query builder for this connection. + * @property-read string[] $schemaNames All schema names in the database, except system schemas. + * @property-read string $serverVersion Server version as a string. + * @property-read string[] $tableNames All table names in the database. * @property-read TableSchema[] $tableSchemas The metadata for all tables in the database. Each array element - * is an instance of [[TableSchema]] or its child class. This property is read-only. + * is an instance of [[TableSchema]] or its child class. * @property-write string $transactionIsolationLevel The transaction isolation level to use for this * transaction. This can be one of [[Transaction::READ_UNCOMMITTED]], [[Transaction::READ_COMMITTED]], * [[Transaction::REPEATABLE_READ]] and [[Transaction::SERIALIZABLE]] but also a string containing DBMS specific - * syntax to be used after `SET TRANSACTION ISOLATION LEVEL`. This property is write-only. + * syntax to be used after `SET TRANSACTION ISOLATION LEVEL`. * * @author Qiang Xue * @author Sergey Makinen diff --git a/framework/db/SqlToken.php b/framework/db/SqlToken.php index fa570689cc3..2fc46d88799 100644 --- a/framework/db/SqlToken.php +++ b/framework/db/SqlToken.php @@ -13,10 +13,9 @@ * SqlToken represents SQL tokens produced by [[SqlTokenizer]] or its child classes. * * @property SqlToken[] $children Child tokens. - * @property-read bool $hasChildren Whether the token has children. This property is read-only. - * @property-read bool $isCollection Whether the token represents a collection of tokens. This property is - * read-only. - * @property-read string $sql SQL code. This property is read-only. + * @property-read bool $hasChildren Whether the token has children. + * @property-read bool $isCollection Whether the token represents a collection of tokens. + * @property-read string $sql SQL code. * * @author Sergey Makinen * @since 2.0.13 diff --git a/framework/db/TableSchema.php b/framework/db/TableSchema.php index 71a2350baec..c4b86e1a7f5 100644 --- a/framework/db/TableSchema.php +++ b/framework/db/TableSchema.php @@ -13,7 +13,7 @@ /** * TableSchema represents the metadata of a database table. * - * @property-read array $columnNames List of column names. This property is read-only. + * @property-read array $columnNames List of column names. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/Transaction.php b/framework/db/Transaction.php index 87e72dd18d1..15186c09544 100644 --- a/framework/db/Transaction.php +++ b/framework/db/Transaction.php @@ -40,12 +40,11 @@ * > since PHP 7.0, so you can skip the part with `\Exception` if your app uses only PHP 7.0 and higher. * * @property-read bool $isActive Whether this transaction is active. Only an active transaction can - * [[commit()]] or [[rollBack()]]. This property is read-only. + * [[commit()]] or [[rollBack()]]. * @property-write string $isolationLevel The transaction isolation level to use for this transaction. This * can be one of [[READ_UNCOMMITTED]], [[READ_COMMITTED]], [[REPEATABLE_READ]] and [[SERIALIZABLE]] but also a - * string containing DBMS specific syntax to be used after `SET TRANSACTION ISOLATION LEVEL`. This property is - * write-only. - * @property-read int $level The current nesting level of the transaction. This property is read-only. + * string containing DBMS specific syntax to be used after `SET TRANSACTION ISOLATION LEVEL`. + * @property-read int $level The current nesting level of the transaction. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/mssql/ColumnSchemaBuilder.php b/framework/db/mssql/ColumnSchemaBuilder.php index f95d9dd98eb..5543a7963c8 100644 --- a/framework/db/mssql/ColumnSchemaBuilder.php +++ b/framework/db/mssql/ColumnSchemaBuilder.php @@ -13,9 +13,8 @@ /** * ColumnSchemaBuilder is the schema builder for MSSQL databases. * - * @property-read string|null $checkValue The `CHECK` constraint for the column. This property is read-only. - * @property-read string|Expression|null $defaultValue Default value of the column. This property is - * read-only. + * @property-read string|null $checkValue The `CHECK` constraint for the column. + * @property-read string|Expression|null $defaultValue Default value of the column. * * @author Valerii Gorbachev * @since 2.0.42 diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php index cba0b206a76..abf7f149cfc 100644 --- a/framework/db/oci/Schema.php +++ b/framework/db/oci/Schema.php @@ -25,7 +25,7 @@ * Schema is the class for retrieving metadata from an Oracle database. * * @property-read string $lastInsertID The row ID of the last row inserted, or the last value retrieved from - * the sequence object. This property is read-only. + * the sequence object. * * @author Qiang Xue * @since 2.0 diff --git a/framework/db/sqlite/Schema.php b/framework/db/sqlite/Schema.php index 0b5a0cc8ec9..7f608399d0b 100644 --- a/framework/db/sqlite/Schema.php +++ b/framework/db/sqlite/Schema.php @@ -25,8 +25,7 @@ * Schema is the class for retrieving metadata from a SQLite (2/3) database. * * @property-write string $transactionIsolationLevel The transaction isolation level to use for this - * transaction. This can be either [[Transaction::READ_UNCOMMITTED]] or [[Transaction::SERIALIZABLE]]. This - * property is write-only. + * transaction. This can be either [[Transaction::READ_UNCOMMITTED]] or [[Transaction::SERIALIZABLE]]. * * @author Qiang Xue * @since 2.0 diff --git a/framework/di/Container.php b/framework/di/Container.php index 8917754016b..5d36b69ff5a 100644 --- a/framework/di/Container.php +++ b/framework/di/Container.php @@ -95,9 +95,8 @@ * For more details and usage information on Container, see the [guide article on di-containers](guide:concept-di-container). * * @property-read array $definitions The list of the object definitions or the loaded shared objects (type or - * ID => definition or instance). This property is read-only. - * @property-write bool $resolveArrays Whether to attempt to resolve elements in array dependencies. This - * property is write-only. + * ID => definition or instance). + * @property-write bool $resolveArrays Whether to attempt to resolve elements in array dependencies. * * @author Qiang Xue * @since 2.0 diff --git a/framework/helpers/BaseFileHelper.php b/framework/helpers/BaseFileHelper.php index 8dd20649e76..a9c24341a40 100644 --- a/framework/helpers/BaseFileHelper.php +++ b/framework/helpers/BaseFileHelper.php @@ -509,7 +509,7 @@ public static function findFiles($dir, $options = []) * * `false`: the directory will NOT be returned * * - `recursive`: boolean, whether the files under the subdirectories should also be looked for. Defaults to `true`. - * See [[findFiles()]] for more options. + * See [[findFiles()]] for more options. * @return array directories found under the directory, in no particular order. Ordering depends on the files system used. * @throws InvalidArgumentException if the dir is invalid. * @since 2.0.14 diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 156e34fe97e..1e66c31f310 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -101,8 +101,8 @@ class BaseHtml * @since 2.0.44 */ public static $normalizeClassAttribute = false; - - + + /** * Encodes special characters into HTML entities. * The [[\yii\base\Application::charset|application charset]] will be used for encoding. diff --git a/framework/helpers/BaseJson.php b/framework/helpers/BaseJson.php index ad41de7f714..72dbcf12f16 100644 --- a/framework/helpers/BaseJson.php +++ b/framework/helpers/BaseJson.php @@ -30,7 +30,6 @@ class BaseJson * @since 2.0.43 */ public static $prettyPrint; - /** * @var bool Avoids objects with zero-indexed keys to be encoded as array * `Json::encode((object)['test'])` will be encoded as an object not as an array. This matches the behaviour of `json_encode()`. @@ -40,7 +39,6 @@ class BaseJson * @since 2.0.44 */ public static $keepObjectType = false; - /** * @var array List of JSON Error messages assigned to constant names for better handling of PHP <= 5.5. * @since 2.0.7 diff --git a/framework/i18n/Locale.php b/framework/i18n/Locale.php index a0e1a1b48cf..b8e5dc2184a 100644 --- a/framework/i18n/Locale.php +++ b/framework/i18n/Locale.php @@ -16,7 +16,7 @@ * * The class requires [PHP intl extension](https://www.php.net/manual/en/book.intl.php) to be installed. * - * @property-read string $currencySymbol This property is read-only. + * @property-read string $currencySymbol * * @since 2.0.14 */ diff --git a/framework/i18n/MessageFormatter.php b/framework/i18n/MessageFormatter.php index 47e4246fd21..e92696c0ee2 100644 --- a/framework/i18n/MessageFormatter.php +++ b/framework/i18n/MessageFormatter.php @@ -36,8 +36,8 @@ * Also messages that are working with the fallback implementation are not necessarily compatible with the * PHP intl MessageFormatter so do not rely on the fallback if you are able to install intl extension somehow. * - * @property-read string $errorCode Code of the last error. This property is read-only. - * @property-read string $errorMessage Description of the last error. This property is read-only. + * @property-read string $errorCode Code of the last error. + * @property-read string $errorMessage Description of the last error. * * @author Alexander Makarov * @author Carsten Brandt diff --git a/framework/log/Dispatcher.php b/framework/log/Dispatcher.php index 9b4136c04f3..16f22be92be 100644 --- a/framework/log/Dispatcher.php +++ b/framework/log/Dispatcher.php @@ -52,7 +52,7 @@ * * @property int $flushInterval How many messages should be logged before they are sent to targets. This * method returns the value of [[Logger::flushInterval]]. - * @property Logger $logger The logger. If not set, [[\Yii::getLogger()]] will be used. Note that the type of + * @property Logger $logger The logger. If not set, [[Yii::getLogger()]] will be used. Note that the type of * this property differs in getter and setter. See [[getLogger()]] and [[setLogger()]] for details. * @property int $traceLevel How many application call stacks should be logged together with each message. * This method returns the value of [[Logger::traceLevel]]. Defaults to 0. @@ -123,7 +123,7 @@ public function getLogger() * Sets the connected logger. * @param Logger|string|array $value the logger to be used. This can either be a logger instance * or a configuration that will be used to create one using [[Yii::createObject()]]. - * If you are providing custom logger configuration and would like it to be used for the whole application + * If you are providing custom logger configuration and would like it to be used for the whole application * and not just for the dispatcher you should use [[Yii::setLogger()]] instead. */ public function setLogger($value) diff --git a/framework/log/Logger.php b/framework/log/Logger.php index a4f21dd4aa7..a81f271abc4 100644 --- a/framework/log/Logger.php +++ b/framework/log/Logger.php @@ -31,12 +31,11 @@ * or [[DbTarget|database]], with the help of the [[dispatcher]]. * * @property-read array $dbProfiling The first element indicates the number of SQL statements executed, and - * the second element the total time spent in SQL execution. This property is read-only. - * @property-read float $elapsedTime The total elapsed time in seconds for current request. This property is - * read-only. + * the second element the total time spent in SQL execution. + * @property-read float $elapsedTime The total elapsed time in seconds for current request. * @property-read array $profiling The profiling results. Each element is an array consisting of these * elements: `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`. The `memory` - * and `memoryDiff` values are available since version 2.0.11. This property is read-only. + * and `memoryDiff` values are available since version 2.0.11. * * @author Qiang Xue * @since 2.0 diff --git a/framework/rbac/BaseManager.php b/framework/rbac/BaseManager.php index 48d7b3f3182..4e475c8bcbf 100644 --- a/framework/rbac/BaseManager.php +++ b/framework/rbac/BaseManager.php @@ -17,8 +17,7 @@ * * For more details and usage information on DbManager, see the [guide article on security authorization](guide:security-authorization). * - * @property-read Role[] $defaultRoleInstances Default roles. The array is indexed by the role names. This - * property is read-only. + * @property-read Role[] $defaultRoleInstances Default roles. The array is indexed by the role names. * @property string[] $defaultRoles Default roles. Note that the type of this property differs in getter and * setter. See [[getDefaultRoles()]] and [[setDefaultRoles()]] for details. * diff --git a/framework/test/ActiveFixture.php b/framework/test/ActiveFixture.php index 7021fc9509f..cdb847a8e53 100644 --- a/framework/test/ActiveFixture.php +++ b/framework/test/ActiveFixture.php @@ -26,7 +26,7 @@ * For more details and usage information on ActiveFixture, see the [guide article on fixtures](guide:test-fixtures). * * @property-read TableSchema $tableSchema The schema information of the database table associated with this - * fixture. This property is read-only. + * fixture. * * @author Qiang Xue * @since 2.0 diff --git a/framework/validators/FileValidator.php b/framework/validators/FileValidator.php index 7a7f5c5c42b..b86b6c45dbf 100644 --- a/framework/validators/FileValidator.php +++ b/framework/validators/FileValidator.php @@ -20,7 +20,7 @@ * * Note that you should enable `fileinfo` PHP extension. * - * @property-read int $sizeLimit The size limit for uploaded files. This property is read-only. + * @property-read int $sizeLimit The size limit for uploaded files. * * @author Qiang Xue * @since 2.0 diff --git a/framework/validators/Validator.php b/framework/validators/Validator.php index 5b808acd271..cb034b96523 100644 --- a/framework/validators/Validator.php +++ b/framework/validators/Validator.php @@ -48,8 +48,8 @@ * * For more details and usage information on Validator, see the [guide article on validators](guide:input-validation). * - * @property-read array $attributeNames Attribute names. This property is read-only. - * @property-read array $validationAttributes List of attribute names. This property is read-only. + * @property-read array $attributeNames Attribute names. + * @property-read array $validationAttributes List of attribute names. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/Application.php b/framework/web/Application.php index 6a052f19d3d..2b3ffed233b 100644 --- a/framework/web/Application.php +++ b/framework/web/Application.php @@ -16,13 +16,12 @@ * * For more details and usage information on Application, see the [guide article on applications](guide:structure-applications). * - * @property-read ErrorHandler $errorHandler The error handler application component. This property is - * read-only. + * @property-read ErrorHandler $errorHandler The error handler application component. * @property string $homeUrl The homepage URL. - * @property-read Request $request The request component. This property is read-only. - * @property-read Response $response The response component. This property is read-only. - * @property-read Session $session The session component. This property is read-only. - * @property-read User $user The user component. This property is read-only. + * @property-read Request $request The request component. + * @property-read Response $response The response component. + * @property-read Session $session The session component. + * @property-read User $user The user component. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/CacheSession.php b/framework/web/CacheSession.php index ecb14b782a1..1fc83c8570c 100644 --- a/framework/web/CacheSession.php +++ b/framework/web/CacheSession.php @@ -31,7 +31,7 @@ * ] * ``` * - * @property-read bool $useCustomStorage Whether to use custom storage. This property is read-only. + * @property-read bool $useCustomStorage Whether to use custom storage. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/CompositeUrlRule.php b/framework/web/CompositeUrlRule.php index 550a6d7e738..59886d82f4c 100644 --- a/framework/web/CompositeUrlRule.php +++ b/framework/web/CompositeUrlRule.php @@ -14,7 +14,7 @@ * CompositeUrlRule is the base class for URL rule classes that consist of multiple simpler rules. * * @property-read null|int $createUrlStatus Status of the URL creation after the last [[createUrl()]] call. - * `null` if rule does not provide info about create status. This property is read-only. + * `null` if rule does not provide info about create status. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/CookieCollection.php b/framework/web/CookieCollection.php index aaedd9b8393..2e9bef28b3c 100644 --- a/framework/web/CookieCollection.php +++ b/framework/web/CookieCollection.php @@ -17,9 +17,8 @@ * * For more details and usage information on CookieCollection, see the [guide article on handling cookies](guide:runtime-sessions-cookies). * - * @property-read int $count The number of cookies in the collection. This property is read-only. - * @property-read ArrayIterator $iterator An iterator for traversing the cookies in the collection. This - * property is read-only. + * @property-read int $count The number of cookies in the collection. + * @property-read ArrayIterator $iterator An iterator for traversing the cookies in the collection. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/HeaderCollection.php b/framework/web/HeaderCollection.php index 0e03214511e..b7a33240967 100644 --- a/framework/web/HeaderCollection.php +++ b/framework/web/HeaderCollection.php @@ -13,9 +13,8 @@ /** * HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers. * - * @property-read int $count The number of headers in the collection. This property is read-only. - * @property-read \ArrayIterator $iterator An iterator for traversing the headers in the collection. This - * property is read-only. + * @property-read int $count The number of headers in the collection. + * @property-read \ArrayIterator $iterator An iterator for traversing the headers in the collection. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/JsonResponseFormatter.php b/framework/web/JsonResponseFormatter.php index 2218ca0d9ab..2e64740990a 100644 --- a/framework/web/JsonResponseFormatter.php +++ b/framework/web/JsonResponseFormatter.php @@ -82,7 +82,6 @@ class JsonResponseFormatter extends Component implements ResponseFormatterInterf * @since 2.0.7 */ public $prettyPrint = false; - /** * @var bool Avoids objects with zero-indexed keys to be encoded as array * Json::encode((object)['test']) will be encoded as an object not array. This matches the behaviour of json_encode(). @@ -91,6 +90,7 @@ class JsonResponseFormatter extends Component implements ResponseFormatterInterf */ public $keepObjectType; + /** * Formats the specified response. * @param Response $response the response to be formatted. diff --git a/framework/web/MultiFieldSession.php b/framework/web/MultiFieldSession.php index 1b73e6d583e..de3556f329c 100644 --- a/framework/web/MultiFieldSession.php +++ b/framework/web/MultiFieldSession.php @@ -22,7 +22,7 @@ * While extending this class you should use [[composeFields()]] method - while writing the session data into the storage and * [[extractData()]] - while reading session data from the storage. * - * @property-read bool $useCustomStorage Whether to use custom storage. This property is read-only. + * @property-read bool $useCustomStorage Whether to use custom storage. * * @author Paul Klimov * @since 2.0.6 diff --git a/framework/web/Request.php b/framework/web/Request.php index bcaeb03af51..3d41c9e43aa 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -23,7 +23,7 @@ * * For more details and usage information on Request, see the [guide article on requests](guide:runtime-requests). * - * @property-read string $absoluteUrl The currently requested absolute URL. This property is read-only. + * @property-read string $absoluteUrl The currently requested absolute URL. * @property array $acceptableContentTypes The content types ordered by the quality score. Types with the * highest scores will be returned first. The array keys are the content types, while the array values are the * corresponding quality score and other parameters as given in the header. @@ -31,65 +31,59 @@ * represents the most preferred language. * @property-read array $authCredentials That contains exactly two elements: - 0: the username sent via HTTP * authentication, `null` if the username is not given - 1: the password sent via HTTP authentication, `null` if - * the password is not given. This property is read-only. + * the password is not given. * @property-read string|null $authPassword The password sent via HTTP authentication, `null` if the password - * is not given. This property is read-only. + * is not given. * @property-read string|null $authUser The username sent via HTTP authentication, `null` if the username is - * not given. This property is read-only. + * not given. * @property string $baseUrl The relative URL for the application. - * @property array $bodyParams The request parameters given in the request body. + * @property array|object $bodyParams The request parameters given in the request body. Note that the type of + * this property differs in getter and setter. See [[getBodyParams()]] and [[setBodyParams()]] for details. * @property-read string $contentType Request content-type. Null is returned if this information is not - * available. This property is read-only. - * @property-read CookieCollection $cookies The cookie collection. This property is read-only. - * @property-read string $csrfToken The token used to perform CSRF validation. This property is read-only. + * available. + * @property-read CookieCollection $cookies The cookie collection. + * @property-read string $csrfToken The token used to perform CSRF validation. * @property-read string $csrfTokenFromHeader The CSRF token sent via [[CSRF_HEADER]] by browser. Null is - * returned if no such header is sent. This property is read-only. - * @property-read array $eTags The entity tags. This property is read-only. - * @property-read HeaderCollection $headers The header collection. This property is read-only. + * returned if no such header is sent. + * @property-read array $eTags The entity tags. + * @property-read HeaderCollection $headers The header collection. * @property string|null $hostInfo Schema and hostname part (with port number if needed) of the request URL * (e.g. `http://www.yiiframework.com`), null if can't be obtained from `$_SERVER` and wasn't set. See * [[getHostInfo()]] for security related notes on this property. - * @property-read string|null $hostName Hostname part of the request URL (e.g. `www.yiiframework.com`). This - * property is read-only. - * @property-read bool $isAjax Whether this is an AJAX (XMLHttpRequest) request. This property is read-only. - * @property-read bool $isDelete Whether this is a DELETE request. This property is read-only. - * @property-read bool $isFlash Whether this is an Adobe Flash or Adobe Flex request. This property is - * read-only. - * @property-read bool $isGet Whether this is a GET request. This property is read-only. - * @property-read bool $isHead Whether this is a HEAD request. This property is read-only. - * @property-read bool $isOptions Whether this is a OPTIONS request. This property is read-only. - * @property-read bool $isPatch Whether this is a PATCH request. This property is read-only. - * @property-read bool $isPjax Whether this is a PJAX request. This property is read-only. - * @property-read bool $isPost Whether this is a POST request. This property is read-only. - * @property-read bool $isPut Whether this is a PUT request. This property is read-only. - * @property-read bool $isSecureConnection If the request is sent via secure channel (https). This property is - * read-only. + * @property-read string|null $hostName Hostname part of the request URL (e.g. `www.yiiframework.com`). + * @property-read bool $isAjax Whether this is an AJAX (XMLHttpRequest) request. + * @property-read bool $isDelete Whether this is a DELETE request. + * @property-read bool $isFlash Whether this is an Adobe Flash or Adobe Flex request. + * @property-read bool $isGet Whether this is a GET request. + * @property-read bool $isHead Whether this is a HEAD request. + * @property-read bool $isOptions Whether this is a OPTIONS request. + * @property-read bool $isPatch Whether this is a PATCH request. + * @property-read bool $isPjax Whether this is a PJAX request. + * @property-read bool $isPost Whether this is a POST request. + * @property-read bool $isPut Whether this is a PUT request. + * @property-read bool $isSecureConnection If the request is sent via secure channel (https). * @property-read string $method Request method, such as GET, POST, HEAD, PUT, PATCH, DELETE. The value - * returned is turned into upper case. This property is read-only. - * @property-read string|null $origin URL origin of a CORS request, `null` if not available. This property is - * read-only. + * returned is turned into upper case. + * @property-read string|null $origin URL origin of a CORS request, `null` if not available. * @property string $pathInfo Part of the request URL that is after the entry script and before the question * mark. Note, the returned path info is already URL-decoded. * @property int $port Port number for insecure requests. * @property array $queryParams The request GET parameter values. - * @property-read string $queryString Part of the request URL that is after the question mark. This property - * is read-only. + * @property-read string $queryString Part of the request URL that is after the question mark. * @property string $rawBody The request body. - * @property-read string|null $referrer URL referrer, null if not available. This property is read-only. - * @property-read string|null $remoteHost Remote host name, `null` if not available. This property is - * read-only. - * @property-read string|null $remoteIP Remote IP address, `null` if not available. This property is - * read-only. + * @property-read string|null $referrer URL referrer, null if not available. + * @property-read string|null $remoteHost Remote host name, `null` if not available. + * @property-read string|null $remoteIP Remote IP address, `null` if not available. * @property string $scriptFile The entry script file path. * @property string $scriptUrl The relative URL of the entry script. * @property int $securePort Port number for secure requests. - * @property-read string $serverName Server name, null if not available. This property is read-only. - * @property-read int|null $serverPort Server port number, null if not available. This property is read-only. + * @property-read string $serverName Server name, null if not available. + * @property-read int|null $serverPort Server port number, null if not available. * @property string $url The currently requested relative URL. Note that the URI returned may be URL-encoded * depending on the client. - * @property-read string|null $userAgent User agent, null if not available. This property is read-only. - * @property-read string|null $userHost User host name, null if not available. This property is read-only. - * @property-read string|null $userIP User IP address, null if not available. This property is read-only. + * @property-read string|null $userAgent User agent, null if not available. + * @property-read string|null $userHost User host name, null if not available. + * @property-read string|null $userIP User IP address, null if not available. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/Response.php b/framework/web/Response.php index a08f764df1f..4928eaf4c80 100644 --- a/framework/web/Response.php +++ b/framework/web/Response.php @@ -37,27 +37,22 @@ * * For more details and usage information on Response, see the [guide article on responses](guide:runtime-responses). * - * @property-read CookieCollection $cookies The cookie collection. This property is read-only. - * @property-write string $downloadHeaders The attachment file name. This property is write-only. - * @property-read HeaderCollection $headers The header collection. This property is read-only. - * @property-read bool $isClientError Whether this response indicates a client error. This property is - * read-only. - * @property-read bool $isEmpty Whether this response is empty. This property is read-only. - * @property-read bool $isForbidden Whether this response indicates the current request is forbidden. This - * property is read-only. - * @property-read bool $isInformational Whether this response is informational. This property is read-only. - * @property-read bool $isInvalid Whether this response has a valid [[statusCode]]. This property is - * read-only. + * @property-read CookieCollection $cookies The cookie collection. + * @property-write string $downloadHeaders The attachment file name. + * @property-read HeaderCollection $headers The header collection. + * @property-read bool $isClientError Whether this response indicates a client error. + * @property-read bool $isEmpty Whether this response is empty. + * @property-read bool $isForbidden Whether this response indicates the current request is forbidden. + * @property-read bool $isInformational Whether this response is informational. + * @property-read bool $isInvalid Whether this response has a valid [[statusCode]]. * @property-read bool $isNotFound Whether this response indicates the currently requested resource is not - * found. This property is read-only. - * @property-read bool $isOk Whether this response is OK. This property is read-only. - * @property-read bool $isRedirection Whether this response is a redirection. This property is read-only. - * @property-read bool $isServerError Whether this response indicates a server error. This property is - * read-only. - * @property-read bool $isSuccessful Whether this response is successful. This property is read-only. + * found. + * @property-read bool $isOk Whether this response is OK. + * @property-read bool $isRedirection Whether this response is a redirection. + * @property-read bool $isServerError Whether this response indicates a server error. + * @property-read bool $isSuccessful Whether this response is successful. * @property int $statusCode The HTTP status code to send with the response. - * @property-write \Exception|\Error|\Throwable $statusCodeByException The exception object. This property is - * write-only. + * @property-write \Exception|\Error|\Throwable $statusCodeByException The exception object. * * @author Qiang Xue * @author Carsten Brandt diff --git a/framework/web/Session.php b/framework/web/Session.php index 5ac99277f50..e121ea1a12c 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -45,28 +45,26 @@ * * For more details and usage information on Session, see the [guide article on sessions](guide:runtime-sessions-cookies). * - * @property-read array $allFlashes Flash messages (key => message or key => [message1, message2]). This - * property is read-only. - * @property-read string $cacheLimiter Current cache limiter. This property is read-only. - * @property-read array $cookieParams The session cookie parameters. This property is read-only. - * @property-read int $count The number of session variables. This property is read-only. + * @property-read array $allFlashes Flash messages (key => message or key => [message1, message2]). + * @property-read string $cacheLimiter Current cache limiter. + * @property-read array $cookieParams The session cookie parameters. + * @property-read int $count The number of session variables. * @property-write string $flash The key identifying the flash message. Note that flash messages and normal * session variables share the same name space. If you have a normal session variable using the same name, its - * value will be overwritten by this method. This property is write-only. + * value will be overwritten by this method. * @property float $gCProbability The probability (percentage) that the GC (garbage collection) process is * started on every session initialization. * @property bool $hasSessionId Whether the current request has sent the session ID. * @property string $id The current session ID. - * @property-read bool $isActive Whether the session has started. This property is read-only. - * @property-read SessionIterator $iterator An iterator for traversing the session variables. This property is - * read-only. + * @property-read bool $isActive Whether the session has started. + * @property-read SessionIterator $iterator An iterator for traversing the session variables. * @property string $name The current session name. * @property string $savePath The current session save path, defaults to '/tmp'. * @property int $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up. The * default value is 1440 seconds (or the value of "session.gc_maxlifetime" set in php.ini). * @property bool|null $useCookies The value indicating whether cookies should be used to store session IDs. - * @property-read bool $useCustomStorage Whether to use custom storage. This property is read-only. - * @property-read bool $useStrictMode Whether strict mode is enabled or not. This property is read-only. + * @property-read bool $useCustomStorage Whether to use custom storage. + * @property bool $useStrictMode Whether strict mode is enabled or not. * @property bool $useTransparentSessionID Whether transparent sid support is enabled or not, defaults to * false. * diff --git a/framework/web/UploadedFile.php b/framework/web/UploadedFile.php index a6609703cd5..fb4220ab8c4 100644 --- a/framework/web/UploadedFile.php +++ b/framework/web/UploadedFile.php @@ -22,10 +22,10 @@ * * For more details and usage information on UploadedFile, see the [guide article on handling uploads](guide:input-file-upload). * - * @property-read string $baseName Original file base name. This property is read-only. - * @property-read string $extension File extension. This property is read-only. + * @property-read string $baseName Original file base name. + * @property-read string $extension File extension. * @property-read bool $hasError Whether there is an error with the uploaded file. Check [[error]] for - * detailed error code information. This property is read-only. + * detailed error code information. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/UrlRule.php b/framework/web/UrlRule.php index 84719ecdad9..f5c96e8a2c9 100644 --- a/framework/web/UrlRule.php +++ b/framework/web/UrlRule.php @@ -25,7 +25,7 @@ * ``` * * @property-read null|int $createUrlStatus Status of the URL creation after the last [[createUrl()]] call. - * `null` if rule does not provide info about create status. This property is read-only. + * `null` if rule does not provide info about create status. * * @author Qiang Xue * @since 2.0 diff --git a/framework/web/User.php b/framework/web/User.php index 010987e1351..7aef2f4d4b2 100644 --- a/framework/web/User.php +++ b/framework/web/User.php @@ -48,10 +48,9 @@ * ``` * * @property-read string|int $id The unique identifier for the user. If `null`, it means the user is a guest. - * This property is read-only. * @property IdentityInterface|null $identity The identity object associated with the currently logged-in * user. `null` is returned if the user is not logged in (not authenticated). - * @property-read bool $isGuest Whether the current user is a guest. This property is read-only. + * @property-read bool $isGuest Whether the current user is a guest. * @property string $returnUrl The URL that the user should be redirected to after login. Note that the type * of this property differs in getter and setter. See [[getReturnUrl()]] and [[setReturnUrl()]] for details. * diff --git a/framework/web/View.php b/framework/web/View.php index 15a8f7b12df..56aa62929fb 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -132,7 +132,6 @@ class View extends \yii\base\View public $jsFiles = []; private $_assetManager; - /** * Whether [[endPage()]] has been called and all files have been registered * @var bool diff --git a/framework/widgets/ActiveField.php b/framework/widgets/ActiveField.php index 9d86aeebab0..2c7ddd52a13 100644 --- a/framework/widgets/ActiveField.php +++ b/framework/widgets/ActiveField.php @@ -20,8 +20,6 @@ * * For more details and usage information on ActiveField, see the [guide article on forms](guide:input-forms). * - * @property-read string $inputId The attribute `id` of the input element - * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/widgets/FragmentCache.php b/framework/widgets/FragmentCache.php index e30e997218c..9cccd947820 100644 --- a/framework/widgets/FragmentCache.php +++ b/framework/widgets/FragmentCache.php @@ -19,7 +19,7 @@ * FragmentCache is used by [[\yii\base\View]] to provide caching of page fragments. * * @property-read string|false $cachedContent The cached content. False is returned if valid content is not - * found in the cache. This property is read-only. + * found in the cache. * * @author Qiang Xue * @since 2.0