Skip to content

Commit 655786b

Browse files
committed
release version 2.0.44
1 parent fe7f5ed commit 655786b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+203
-254
lines changed

Diff for: framework/BaseYii.php

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

9999
/**

Diff for: framework/CHANGELOG.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
Yii Framework 2 Change Log
22
==========================
33

4-
2.0.44 under development
4+
2.0.44 December 30, 2021
55
------------------------
66

7+
- Bug #17119: Fix `yii\caching\Cache::multiSet()` to use `yii\caching\Cache::$defaultDuration` when no duration is passed (OscarBarrett)
8+
- Bug #18646: Remove stale identity data from session if `IdentityInterface::findIdentity()` returns `null` (mikehaertl)
79
- Bug #18660: Fix database migration template does not work with namespaced migrations when migration name does not include namespace (iridance)
8-
- Enh #13105: Add yiiActiveForm `validate_only` property for skipping form auto-submission (ptolomaues)
9-
- Enh #18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` (AnkIF)
1010
- Bug #18798: Fix `StringHelper::dirname()` when passing string with a trailing slash (perlexed)
11-
- Enh #18328: Raise warning when trying to register a file after `View::endPage()` has been called (perlexed)
12-
- Enh #18812: Add error messages and optimize "error" methods in `yii\helpers\BaseJson` (WinterSilence, samdark)
13-
- Chg #18823: Rollback changes from #18806 in `yii\validators\ExistValidator::checkTargetRelationExistence()` (WinterSilence)
14-
- Enh #18826: Add ability to turn the sorting off for a clicked column in GridView with multisort (ditibal)
15-
- Bug #18646: Remove stale identity data from session if `IdentityInterface::findIdentity()` returns `null` (mikehaertl)
1611
- Bug #18832: Fix `Inflector::camel2words()` adding extra spaces (brandonkelly)
17-
- 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)
18-
- Enh #18783: Add support for URI namespaced tags in `XmlResponseFormatter` (WinterSilence, samdark)
19-
- Enh #18783: Add `XmlResponseFormatter::$objectTagToLowercase` option to lowercase object tags (WinterSilence, samdark)
20-
- Bug #18845: Fix duplicating `id` in `MigrateController::addDefaultPrimaryKey()` (WinterSilence, samdark)
21-
- Bug #17119: Fix `yii\caching\Cache::multiSet()` to use `yii\caching\Cache::$defaultDuration` when no duration is passed (OscarBarrett)
2212
- Bug #18842: Fix `yii\base\Controller::bindInjectedParams()` to not throw error when argument of `ReflectionUnionType` type is passed (bizley)
23-
- Enh #18858: Reduce memory usage in `yii\base\View::afterRender` method (LeoOnTheEarth)
13+
- Bug #18845: Fix duplicating `id` in `MigrateController::addDefaultPrimaryKey()` (WinterSilence, samdark)
2414
- Bug #18880: Fix `yii\helpers\ArrayHelper::toArray()` for `DateTime` objects in PHP >= 7.4 (rhertogh)
2515
- Bug #18883: Fix `yii\web\HeaderCollection::fromArray()` now ensures lower case keys (rhertogh)
26-
- Enh #18899: Replace usages of `strpos` with `strncmp` and remove redundant usage of `array_merge` and `array_values` (AlexGx)
2716
- Bug #18898: Fix `yii\helpers\Inflector::camel2words()` to work with words ending with 0 (michaelarnauts)
28-
- Enh #18904: Improve Captcha client-side validation (hexkir)
29-
- Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg)
3017
- Bug #18909: Fix bug with binding default action parameters for controllers (bizley)
18+
- Bug #18913: Add filename validation for `MessageSource::getMessageFilePath()` (uaoleg)
3119
- Bug #18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` (WinterSilence)
3220
- Bug #18988: Fix default value of `yii\console\controllers\MessageController::$translator` (WinterSilence)
33-
- Enh #19005: Add `yii\base\Module::setControllerPath()` (WinterSilence)
3421
- Bug #18993: Load defaults by `attributes()` in `yii\db\ActiveRecord::loadDefaultValues()` (WinterSilence)
3522
- Bug #19021: Fix return type in PhpDoc `yii\db\Migration` functions `up()`, `down()`, `safeUp()` and `safeDown()` (WinterSilence, rhertogh)
36-
- Bug #19031: Fix displaying console help for parameters with declared types (WinterSilence)
3723
- Bug #19030: Add DI container usage to `yii\base\Widget::end()` (papppeter)
24+
- Bug #19031: Fix displaying console help for parameters with declared types (WinterSilence)
3825
- Bug #19096: Fix `Request::getIsConsoleRequest()` may return erroneously when testing a Web application in Codeception (WinterSilence)
26+
- Enh #13105: Add yiiActiveForm `validate_only` property for skipping form auto-submission (ptolomaues)
27+
- Enh #18328: Raise warning when trying to register a file after `View::endPage()` has been called (perlexed)
28+
- 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)
29+
- Enh #18783: Add support for URI namespaced tags in `XmlResponseFormatter` (WinterSilence, samdark)
30+
- Enh #18783: Add `XmlResponseFormatter::$objectTagToLowercase` option to lowercase object tags (WinterSilence, samdark)
31+
- Enh #18812: Add error messages and optimize "error" methods in `yii\helpers\BaseJson` (WinterSilence, samdark)
32+
- Enh #18826: Add ability to turn the sorting off for a clicked column in GridView with multisort (ditibal)
33+
- Enh #18858: Reduce memory usage in `yii\base\View::afterRender` method (LeoOnTheEarth)
34+
- Enh #18899: Replace usages of `strpos` with `strncmp` and remove redundant usage of `array_merge` and `array_values` (AlexGx)
35+
- Enh #18904: Improve Captcha client-side validation (hexkir)
36+
- Enh #18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` (AnkIF)
37+
- Enh #19005: Add `yii\base\Module::setControllerPath()` (WinterSilence)
3938
- Enh #19098: Add `yii\helper\BaseHtml::$normalizeClassAttribute` to fix duplicate classes (WinterSilence)
4039
- Enh #19108: Optimize `Component::hasEventHandlers()` and `Component::trigger()` (WinterSilence)
40+
- Chg #18823: Rollback changes from #18806 in `yii\validators\ExistValidator::checkTargetRelationExistence()` (WinterSilence)
4141

4242

4343
2.0.43 August 09, 2021

Diff for: framework/base/Action.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
*
3131
* For more details and usage information on Action, see the [guide article on actions](guide:structure-controllers).
3232
*
33-
* @property-read string $uniqueId The unique ID of this action among the whole application. This property is
34-
* read-only.
33+
* @property-read string $uniqueId The unique ID of this action among the whole application.
3534
*
3635
* @author Qiang Xue <[email protected]>
3736
* @since 2.0

Diff for: framework/base/Application.php

+17-25
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,32 @@
1414
*
1515
* For more details and usage information on Application, see the [guide article on applications](guide:structure-applications).
1616
*
17-
* @property-read \yii\web\AssetManager $assetManager The asset manager application component. This property
18-
* is read-only.
19-
* @property-read \yii\rbac\ManagerInterface $authManager The auth manager application component. Null is
20-
* returned if auth manager is not configured. This property is read-only.
17+
* @property-read \yii\web\AssetManager $assetManager The asset manager application component.
18+
* @property-read \yii\rbac\ManagerInterface|null $authManager The auth manager application component or null
19+
* if it's not configured.
2120
* @property string $basePath The root directory of the application.
2221
* @property-read \yii\caching\CacheInterface $cache The cache application component. Null if the component is
23-
* not enabled. This property is read-only.
24-
* @property-write array $container Values given in terms of name-value pairs. This property is write-only.
25-
* @property-read \yii\db\Connection $db The database connection. This property is read-only.
22+
* not enabled.
23+
* @property-write array $container Values given in terms of name-value pairs.
24+
* @property-read \yii\db\Connection $db The database connection.
2625
* @property-read \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application
27-
* component. This property is read-only.
28-
* @property-read \yii\i18n\Formatter $formatter The formatter application component. This property is
29-
* read-only.
30-
* @property-read \yii\i18n\I18N $i18n The internationalization application component. This property is
31-
* read-only.
32-
* @property-read \yii\log\Dispatcher $log The log dispatcher application component. This property is
33-
* read-only.
34-
* @property-read \yii\mail\MailerInterface $mailer The mailer application component. This property is
35-
* read-only.
36-
* @property-read \yii\web\Request|\yii\console\Request $request The request component. This property is
37-
* read-only.
38-
* @property-read \yii\web\Response|\yii\console\Response $response The response component. This property is
39-
* read-only.
26+
* component.
27+
* @property-read \yii\i18n\Formatter $formatter The formatter application component.
28+
* @property-read \yii\i18n\I18N $i18n The internationalization application component.
29+
* @property-read \yii\log\Dispatcher $log The log dispatcher application component.
30+
* @property-read \yii\mail\MailerInterface $mailer The mailer application component.
31+
* @property-read \yii\web\Request|\yii\console\Request $request The request component.
32+
* @property-read \yii\web\Response|\yii\console\Response $response The response component.
4033
* @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
4134
* subdirectory under [[basePath]].
42-
* @property-read \yii\base\Security $security The security application component. This property is read-only.
35+
* @property-read \yii\base\Security $security The security application component.
4336
* @property string $timeZone The time zone used by this application.
44-
* @property-read string $uniqueId The unique ID of the module. This property is read-only.
45-
* @property-read \yii\web\UrlManager $urlManager The URL manager for this application. This property is
46-
* read-only.
37+
* @property-read string $uniqueId The unique ID of the module.
38+
* @property-read \yii\web\UrlManager $urlManager The URL manager for this application.
4739
* @property string $vendorPath The directory that stores vendor files. Defaults to "vendor" directory under
4840
* [[basePath]].
4941
* @property-read View|\yii\web\View $view The view application component that is used to render various view
50-
* files. This property is read-only.
42+
* files.
5143
*
5244
* @author Qiang Xue <[email protected]>
5345
* @since 2.0

Diff for: framework/base/Component.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@
9393
*
9494
* For more details and usage information on Component, see the [guide article on components](guide:concept-components).
9595
*
96-
* @property-read Behavior[] $behaviors List of behaviors attached to this component. This property is
97-
* read-only.
96+
* @property-read Behavior[] $behaviors List of behaviors attached to this component.
9897
*
9998
* @author Qiang Xue <[email protected]>
10099
* @since 2.0

Diff for: framework/base/Controller.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
*
1717
* For more details and usage information on Controller, see the [guide article on controllers](guide:structure-controllers).
1818
*
19-
* @property-read Module[] $modules All ancestor modules that this controller is located within. This property
20-
* is read-only.
19+
* @property-read Module[] $modules All ancestor modules that this controller is located within.
2120
* @property-read string $route The route (module ID, controller ID and action ID) of the current request.
22-
* This property is read-only.
23-
* @property-read string $uniqueId The controller ID that is prefixed with the module ID (if any). This
24-
* property is read-only.
21+
* @property-read string $uniqueId The controller ID that is prefixed with the module ID (if any).
2522
* @property View|\yii\web\View $view The view object that can be used to render views or view files.
2623
* @property string $viewPath The directory containing the view files for this controller.
2724
*

Diff for: framework/base/Model.php

+9-10
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@
3838
* For more details and usage information on Model, see the [guide article on models](guide:structure-models).
3939
*
4040
* @property-read \yii\validators\Validator[] $activeValidators The validators applicable to the current
41-
* [[scenario]]. This property is read-only.
41+
* [[scenario]].
4242
* @property array $attributes Attribute values (name => value).
43-
* @property-read array $errors An array of errors for all attributes. Empty array is returned if no error.
44-
* The result is a two-dimensional array. See [[getErrors()]] for detailed description. This property is
45-
* read-only.
43+
* @property-read array $errors Errors for all attributes or the specified attribute. Empty array is returned
44+
* if no error. See [[getErrors()]] for detailed description. Note that when returning errors for all attributes,
45+
* the result is a two-dimensional array, like the following: ```php [ 'username' => [ 'Username is required.',
46+
* 'Username must contain only word characters.', ], 'email' => [ 'Email address is invalid.', ] ] ``` .
4647
* @property-read array $firstErrors The first errors. The array keys are the attribute names, and the array
47-
* values are the corresponding error messages. An empty array will be returned if there is no error. This
48-
* property is read-only.
49-
* @property-read ArrayIterator $iterator An iterator for traversing the items in the list. This property is
50-
* read-only.
48+
* values are the corresponding error messages. An empty array will be returned if there is no error.
49+
* @property-read ArrayIterator $iterator An iterator for traversing the items in the list.
5150
* @property string $scenario The scenario that this model is in. Defaults to [[SCENARIO_DEFAULT]].
5251
* @property-read ArrayObject|\yii\validators\Validator[] $validators All the validators declared in the
53-
* model. This property is read-only.
52+
* model.
5453
*
5554
* @author Qiang Xue <[email protected]>
5655
* @since 2.0
@@ -561,7 +560,7 @@ public function hasErrors($attribute = null)
561560

562561
/**
563562
* Returns the errors for all attributes or a single attribute.
564-
* @param string|null $attribute attribute name. Use null to retrieve errors for all attributes.
563+
* @param string|null $attribute attribute name. Use null to retrieve errors for all attributes.
565564
* @return array errors for all attributes or the specified attribute. Empty array is returned if no error.
566565
* See [[getErrors()]] for detailed description.
567566
* Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:

Diff for: framework/base/Module.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
*
2626
* @property-write array $aliases List of path aliases to be defined. The array keys are alias names (must
2727
* start with `@`) and the array values are the corresponding paths or aliases. See [[setAliases()]] for an
28-
* example. This property is write-only.
28+
* example.
2929
* @property string $basePath The root directory of the module.
30-
* @property string $controllerPath The root directory that contains the controller classes.
30+
* @property string $controllerPath The directory that contains the controller classes.
3131
* @property string $layoutPath The root directory of layout files. Defaults to "[[viewPath]]/layouts".
3232
* @property array $modules The modules (indexed by their IDs).
33-
* @property-read string $uniqueId The unique ID of the module. This property is read-only.
33+
* @property-read string $uniqueId The unique ID of the module.
3434
* @property string $version The version of this module. Note that the type of this property differs in getter
3535
* and setter. See [[getVersion()]] and [[setVersion()]] for details.
3636
* @property string $viewPath The root directory of view files. Defaults to "[[basePath]]/views".
@@ -130,7 +130,6 @@ class Module extends ServiceLocator
130130
* @var array child modules of this module
131131
*/
132132
private $_modules = [];
133-
134133
/**
135134
* @var string|callable the version of this module.
136135
* Version can be specified as a PHP callback, which can accept module instance as an argument and should

Diff for: framework/base/View.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* For more details and usage information on View, see the [guide article on views](guide:structure-views).
2222
*
2323
* @property-read string|bool $viewFile The view file currently being rendered. False if no view file is being
24-
* rendered. This property is read-only.
24+
* rendered.
2525
*
2626
* @author Qiang Xue <[email protected]>
2727
* @since 2.0

Diff for: framework/base/Widget.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
* setter. See [[getId()]] and [[setId()]] for details.
2020
* @property \yii\web\View $view The view object that can be used to render views or view files. Note that the
2121
* type of this property differs in getter and setter. See [[getView()]] and [[setView()]] for details.
22-
* @property-read string $viewPath The directory containing the view files for this widget. This property is
23-
* read-only.
22+
* @property-read string $viewPath The directory containing the view files for this widget.
2423
*
2524
* @author Qiang Xue <[email protected]>
2625
* @since 2.0

Diff for: framework/caching/MemCache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview).
5757
*
5858
* @property-read \Memcache|\Memcached $memcache The memcache (or memcached) object used by this cache
59-
* component. This property is read-only.
59+
* component.
6060
* @property MemCacheServer[] $servers List of memcache server configurations. Note that the type of this
6161
* property differs in getter and setter. See [[getServers()]] and [[setServers()]] for details.
6262
*

Diff for: framework/captcha/CaptchaAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* to be validated by the 'captcha' validator.
3232
* 3. In the controller view, insert a [[Captcha]] widget in the form.
3333
*
34-
* @property-read string $verifyCode The verification code. This property is read-only.
34+
* @property-read string $verifyCode The verification code.
3535
*
3636
* @author Qiang Xue <[email protected]>
3737
* @since 2.0

Diff for: framework/console/Application.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@
5050
* yii help
5151
* ```
5252
*
53-
* @property-read ErrorHandler $errorHandler The error handler application component. This property is
54-
* read-only.
55-
* @property-read Request $request The request component. This property is read-only.
56-
* @property-read Response $response The response component. This property is read-only.
53+
* @property-read ErrorHandler $errorHandler The error handler application component.
54+
* @property-read Request $request The request component.
55+
* @property-read Response $response The response component.
5756
*
5857
* @author Qiang Xue <[email protected]>
5958
* @since 2.0

Diff for: framework/console/Controller.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* where `<route>` is a route to a controller action and the params will be populated as properties of a command.
2929
* See [[options()]] for details.
3030
*
31+
* @property-read string $help The help information for this controller.
3132
* @property-read string $helpSummary The one-line short summary describing this controller.
3233
* @property-read array $passedOptionValues The properties corresponding to the passed options.
3334
* @property-read array $passedOptions The names of the options passed during execution.

Diff for: framework/console/controllers/HelpController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* In the above, if the command name is not provided, all
3131
* available commands will be displayed.
3232
*
33-
* @property-read array $commands All available command names. This property is read-only.
33+
* @property-read array $commands All available command names.
3434
*
3535
* @author Qiang Xue <[email protected]>
3636
* @since 2.0

Diff for: framework/console/widgets/Table.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* ],
4141
* ]);
4242
*
43-
* @property-write string $listPrefix List prefix. This property is write-only.
44-
* @property-write int $screenWidth Screen width. This property is write-only.
43+
* @property-write string $listPrefix List prefix.
44+
* @property-write int $screenWidth Screen width.
4545
*
4646
* @author Daniel Gomez Pan <[email protected]>
4747
* @since 2.0.13

Diff for: framework/data/BaseDataProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* For more details and usage information on BaseDataProvider, see the [guide article on data providers](guide:output-data-providers).
1818
*
19-
* @property-read int $count The number of data models in the current page. This property is read-only.
19+
* @property-read int $count The number of data models in the current page.
2020
* @property array $keys The list of key values corresponding to [[models]]. Each data model in [[models]] is
2121
* uniquely identified by the corresponding key value in this array.
2222
* @property array $models The list of data models in the current page.

0 commit comments

Comments
 (0)