Skip to content

Commit 22614a5

Browse files
committed
release version 2.0.46
1 parent e296f40 commit 22614a5

File tree

16 files changed

+56
-63
lines changed

16 files changed

+56
-63
lines changed

framework/BaseYii.php

Lines changed: 1 addition & 1 deletion
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.46-dev';
96+
return '2.0.46';
9797
}
9898

9999
/**

framework/CHANGELOG.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
11
Yii Framework 2 Change Log
22
==========================
33

4-
2.0.46 under development
5-
------------------------
4+
2.0.46 August 18, 2022
5+
----------------------
66

7-
- Bug #19467: Revert changes in `Inflector::camel2words()` introduced in #19204 (samdark)
8-
- Bug #19471: Enable console commands on hosting with disabled `exec()` function (WinterSilence, lubosdz)
9-
- Bug #19469: Fix a virtual relation not working because of new isset checks in `\yii\db\ActiveRelationTrait` (wvanheumen)
10-
- Bug #19380: Fix PHP 8.1 passing non string to trim() in `yii\db\Query` (wa1kb0y)
11-
- Bug #19272: Fix bug in dirty attributes check on multidimensional array (speedplli)
12-
- Bug #19349: Fix PHP 8.1 error when attribute and label of `yii\grid\DataColumn` are empty (githubjeka)
13-
- Bug #19243: Handle `finfo_open` for tar.xz as `application/octet-stream` on PHP 8.1 (longthanhtran)
147
- Bug #19235: Fix return type compatibility of `yii\web\SessionIterator` class methods for PHP 8.1 (virtual-designer)
8+
- Bug #19237: Fix OCI PHP 8.1 passing `null` to trim() (longthanhtran)
9+
- Bug #19243: Handle `finfo_open` for tar.xz as `application/octet-stream` on PHP 8.1 (longthanhtran)
1510
- Bug #19256: Pass missed `$view` to user's callback in `yii\validators\InlineValidator::clientValidateAttribute()` (WinterSilence)
16-
- Enh #19270: Replace deprecated `scss` converter in `yii\web\AssetConverter::$commands` (WinterSilence)
17-
- Enh #19254: Support specifying custom characters for `yii.validation.trim()` and replace deprecated `jQuery.trim()` (WinterSilence)
11+
- Bug #19259: Fix `yii\log\FileTarget` locking and always rotate files only by copy (bizley, mikehaertl)
12+
- Bug #19272: Fix bug in dirty attributes check on multidimensional array (speedplli)
1813
- Bug #19291: Reset errors and validators in `yii\base\Model::__clone()` (WinterSilence)
19-
- Enh #19295: Add alias `text/rtf` for mime-type `application/rtf` (lesha724)
20-
- Enh #19308: Add `yii\web\UploadedFile::$fullPath` represents 'full_path' key added in PHP 8.1 (WinterSilence)
2114
- Bug #19303: Fix serialization in `yii\caching\Dependency::generateReusableHash()` (WinterSilence)
22-
- Enh #19304: Add filtering validator `yii\validators\TrimValidator` (WinterSilence)
23-
- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence)
15+
- Bug #19312: Fix PHP 8.1 error when passing null to `yii\helpers\BaseInflector` (WinterSilence)
2416
- Bug #19322: Revert force setting value to empty string in case it's `null` in `yii\validators\FilterValidator::validateAttribute()` (bizley)
2517
- Bug #19324: Fix `yii\helpers\BaseHtml::renderSelectOptions()` giving wrong selection for boolean attributes (adnandautovic)
26-
- Bug #19329: Fix `yii\web\GroupUrlRule` to properly normalize prefix (bizley)
2718
- Bug #19328: Passing null to parameter #1 ($string) of type string is deprecated in `yii\db\oci\Schema` (Arkeins)
28-
- Enh #19318: Add support for typecasting PHP 8.1 enums (EtienneBruines)
29-
- Bug #19237: Fix OCI PHP 8.1 passing `null` to trim() (longthanhtran)
30-
- Bug #19312: Fix PHP 8.1 error when passing null to `yii\helpers\BaseInflector` (WinterSilence)
19+
- Bug #19329: Fix `yii\web\GroupUrlRule` to properly normalize prefix (bizley)
20+
- Bug #19349: Fix PHP 8.1 error when attribute and label of `yii\grid\DataColumn` are empty (githubjeka)
3121
- Bug #19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` (bizley)
32-
- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos)
22+
- Bug #19380: Fix PHP 8.1 passing non string to trim() in `yii\db\Query` (wa1kb0y)
3323
- Bug #19386: Fix recursive calling `yii\helpers\BaseArrayHelper::htmlDecode()` (WinterSilence)
34-
- Bug #19407: Fix `yii\validators\UniqueValidator` and `yii\validators\ExistValidator` to respect `skipOnError` option for target attributes (bizley)
35-
- Bug #19418: Fix `yii\filters\auth\CompositeAuth` ignoring `only` and `except` options (lesha724)
36-
- Enh #19401: Delay `exit(1)` in `yii\base\ErrorHandler::handleFatalError` (arrilot)
24+
- Bug #19400: Fix passing null in `yii\web\Response::redirect()` (bizley)
3725
- Bug #19402: Add shutdown event and fix working directory in `yii\base\ErrorHandler` (WinterSilence)
38-
- Enh #19416: Update and improve configurations for `yii\console\controllers\MessageController` (WinterSilence)
3926
- Bug #19403: Fix types in `yii\web\SessionIterator` (WinterSilence)
40-
- Enh #19420: Update list of JS callbacks in `yii\widgets\MaskedInput` (WinterSilence)
41-
- Bug #19400: Fix passing null in `yii\web\Response::redirect()` (bizley)
42-
- Enh #19437: Add support to specify request port by trusted proxies in `\yii\web\Request::getServerPort()` (rhertogh)
27+
- Bug #19407: Fix `yii\validators\UniqueValidator` and `yii\validators\ExistValidator` to respect `skipOnError` option for target attributes (bizley)
28+
- Bug #19418: Fix `yii\filters\auth\CompositeAuth` ignoring `only` and `except` options (lesha724)
4329
- Bug #19445: Fix caching in `yii\i18n\Formatter::getUnitMessage()` (WinterSilence)
4430
- Bug #19454: Fix PDO exception code not properly passed to `yii\db\Exception` (Roguyt)
31+
- Bug #19462: Fix validator client options to encode HTML tags (bizley)
32+
- Bug #19467: Revert changes in `Inflector::camel2words()` introduced in #19204 (samdark)
33+
- Bug #19469: Fix a virtual relation not working because of new isset checks in `\yii\db\ActiveRelationTrait` (wvanheumen)
34+
- Bug #19471: Enable console commands on hosting with disabled `exec()` function (WinterSilence, lubosdz)
4535
- Bug #19477: Cast shell_exec() output to string (schmunk42)
4636
- Bug #19481: Exception is always empty in ErrorHandler when handling fatal error (Renkas)
47-
- Bug #19462: Fix validator client options to encode HTML tags (bizley)
48-
- Bug #19259: Fix `yii\log\FileTarget` locking and always rotate files only by copy (bizley, mikehaertl)
37+
- Enh #19254: Support specifying custom characters for `yii.validation.trim()` and replace deprecated `jQuery.trim()` (WinterSilence)
38+
- Enh #19270: Replace deprecated `scss` converter in `yii\web\AssetConverter::$commands` (WinterSilence)
39+
- Enh #19295: Add alias `text/rtf` for mime-type `application/rtf` (lesha724)
40+
- Enh #19304: Add filtering validator `yii\validators\TrimValidator` (WinterSilence)
41+
- Enh #19308: Add `yii\web\UploadedFile::$fullPath` represents 'full_path' key added in PHP 8.1 (WinterSilence)
42+
- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence)
43+
- Enh #19318: Add support for typecasting PHP 8.1 enums (EtienneBruines)
44+
- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos)
45+
- Enh #19401: Delay `exit(1)` in `yii\base\ErrorHandler::handleFatalError` (arrilot)
46+
- Enh #19416: Update and improve configurations for `yii\console\controllers\MessageController` (WinterSilence)
47+
- Enh #19420: Update list of JS callbacks in `yii\widgets\MaskedInput` (WinterSilence)
48+
- Enh #19437: Add support to specify request port by trusted proxies in `\yii\web\Request::getServerPort()` (rhertogh)
49+
4950

5051
2.0.45 February 11, 2022
5152
------------------------

framework/base/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
* @property-read \yii\rbac\ManagerInterface|null $authManager The auth manager application component or null
1919
* if it's not configured.
2020
* @property string $basePath The root directory of the application.
21-
* @property-read \yii\caching\CacheInterface $cache The cache application component. Null if the component is
22-
* not enabled.
21+
* @property-read \yii\caching\CacheInterface|null $cache The cache application component. Null if the
22+
* component is not enabled.
2323
* @property-write array $container Values given in terms of name-value pairs.
2424
* @property-read \yii\db\Connection $db The database connection.
2525
* @property-read \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application

framework/base/Model.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
* 'Username must contain only word characters.', ], 'email' => [ 'Email address is invalid.', ] ] ``` .
4747
* @property-read array $firstErrors The first errors. The array keys are the attribute names, and the array
4848
* 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.
5049
* @property string $scenario The scenario that this model is in. Defaults to [[SCENARIO_DEFAULT]].
5150
* @property-read ArrayObject|\yii\validators\Validator[] $validators All the validators declared in the
5251
* model.

framework/console/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
* @property-read string $helpSummary The one-line short summary describing this controller.
3333
* @property-read array $passedOptionValues The properties corresponding to the passed options.
3434
* @property-read array $passedOptions The names of the options passed during execution.
35-
* @property Request $request
36-
* @property Response $response
3735
*
3836
* @author Qiang Xue <qiang.xue@gmail.com>
3937
* @since 2.0

framework/db/BaseActiveRecord.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
* @property array $oldAttributes The old attribute values (name-value pairs). Note that the type of this
2929
* property differs in getter and setter. See [[getOldAttributes()]] and [[setOldAttributes()]] for details.
3030
* @property-read mixed $oldPrimaryKey The old primary key value. An array (column name => column value) is
31-
* returned if the primary key is composite. A string is returned otherwise (null will be returned if the key
32-
* value is null).
31+
* returned if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be
32+
* returned if the key value is null).
3333
* @property-read mixed $primaryKey The primary key value. An array (column name => column value) is returned
34-
* if the primary key is composite. A string is returned otherwise (null will be returned if the key value is
35-
* null).
34+
* if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be returned
35+
* if the key value is null).
3636
* @property-read array $relatedRecords An array of related records indexed by relation names.
3737
*
3838
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -1757,7 +1757,7 @@ private function setRelationDependencies($name, $relation, $viaRelationName = nu
17571757

17581758
/**
17591759
* @param string $attribute
1760-
* @param mixed $value
1760+
* @param mixed $value
17611761
* @return bool
17621762
*/
17631763
private function isAttributeDirty($attribute, $value)

framework/db/Connection.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,22 @@
110110
* ],
111111
* ```
112112
*
113-
* @property string $driverName Name of the DB driver.
113+
* @property string|null $driverName Name of the DB driver. Note that the type of this property differs in
114+
* getter and setter. See [[getDriverName()]] and [[setDriverName()]] for details.
114115
* @property-read bool $isActive Whether the DB connection is established.
115116
* @property-read string $lastInsertID The row ID of the last row inserted, or the last value retrieved from
116117
* the sequence object.
117-
* @property-read Connection $master The currently active master connection. `null` is returned if there is no
118-
* master available.
118+
* @property-read Connection|null $master The currently active master connection. `null` is returned if there
119+
* is no master available.
119120
* @property-read PDO $masterPdo The PDO instance for the currently active master connection.
120121
* @property QueryBuilder $queryBuilder The query builder for the current DB connection. Note that the type of
121122
* this property differs in getter and setter. See [[getQueryBuilder()]] and [[setQueryBuilder()]] for details.
122123
* @property-read Schema $schema The schema information for the database opened by this connection.
123124
* @property-read string $serverVersion Server version as a string.
124-
* @property-read Connection $slave The currently active slave connection. `null` is returned if there is no
125-
* slave available and `$fallbackToMaster` is false.
126-
* @property-read PDO $slavePdo The PDO instance for the currently active slave connection. `null` is returned
127-
* if no slave connection is available and `$fallbackToMaster` is false.
125+
* @property-read Connection|null $slave The currently active slave connection. `null` is returned if there is
126+
* no slave available and `$fallbackToMaster` is false.
127+
* @property-read PDO|null $slavePdo The PDO instance for the currently active slave connection. `null` is
128+
* returned if no slave connection is available and `$fallbackToMaster` is false.
128129
* @property-read Transaction|null $transaction The currently active transaction. Null if no active
129130
* transaction.
130131
*

framework/validators/InlineValidator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/**
1111
* InlineValidator represents a validator which is defined as a method in the object being validated.
1212
*
13-
*
1413
* @author Qiang Xue <qiang.xue@gmail.com>
1514
* @since 2.0
1615
*/

framework/validators/IpValidator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
* ['ip_address', 'ip', 'expandIPv6' => true], // expands IPv6 address to a full notation format
3333
* ```
3434
*
35-
* @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. See [[setRanges()]] for
36-
* detailed description. Note that the type of this property differs in getter and setter. See [[getRanges()]]
37-
* and [[setRanges()]] for details.
35+
* @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. Note that the type of this
36+
* property differs in getter and setter. See [[getRanges()]] and [[setRanges()]] for details.
3837
*
3938
* @author Dmitry Naumenko <d.naumenko.a@gmail.com>
4039
* @since 2.0.7

framework/validators/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* For more details and usage information on Validator, see the [guide article on validators](guide:input-validation).
5050
*
5151
* @property-read array $attributeNames Attribute names.
52-
* @property-read array $validationAttributes List of attribute names.
52+
* @property-read array|null $validationAttributes List of attribute names.
5353
*
5454
* @author Qiang Xue <qiang.xue@gmail.com>
5555
* @since 2.0

0 commit comments

Comments
 (0)