Skip to content

Commit

Permalink
release version 2.0.46
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Aug 18, 2022
1 parent e296f40 commit 22614a5
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 63 deletions.
2 changes: 1 addition & 1 deletion framework/BaseYii.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class BaseYii
*/
public static function getVersion()
{
return '2.0.46-dev';
return '2.0.46';
}

/**
Expand Down
59 changes: 30 additions & 29 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,52 @@
Yii Framework 2 Change Log
==========================

2.0.46 under development
------------------------
2.0.46 August 18, 2022
----------------------

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


2.0.45 February 11, 2022
------------------------
Expand Down
4 changes: 2 additions & 2 deletions framework/base/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* @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.
* @property-read \yii\caching\CacheInterface|null $cache The cache application component. Null if the
* component is 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
Expand Down
1 change: 0 additions & 1 deletion framework/base/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
* '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.
* @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.
Expand Down
2 changes: 0 additions & 2 deletions framework/console/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
* @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.
* @property Request $request
* @property Response $response
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
Expand Down
10 changes: 5 additions & 5 deletions framework/db/BaseActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
* @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).
* returned if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be
* returned if the key 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).
* if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be returned
* if the key value is null).
* @property-read array $relatedRecords An array of related records indexed by relation names.
*
* @author Qiang Xue <qiang.xue@gmail.com>
Expand Down Expand Up @@ -1757,7 +1757,7 @@ private function setRelationDependencies($name, $relation, $viaRelationName = nu

/**
* @param string $attribute
* @param mixed $value
* @param mixed $value
* @return bool
*/
private function isAttributeDirty($attribute, $value)
Expand Down
15 changes: 8 additions & 7 deletions framework/db/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,22 @@
* ],
* ```
*
* @property string $driverName Name of the DB driver.
* @property string|null $driverName Name of the DB driver. Note that the type of this property differs in
* getter and setter. See [[getDriverName()]] and [[setDriverName()]] for details.
* @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.
* @property-read Connection $master The currently active master connection. `null` is returned if there is no
* master available.
* @property-read Connection|null $master The currently active master connection. `null` is returned if there
* is no 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.
* @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.
* @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.
* @property-read Connection|null $slave The currently active slave connection. `null` is returned if there is
* no slave available and `$fallbackToMaster` is false.
* @property-read PDO|null $slavePdo The PDO instance for the currently active slave connection. `null` is
* returned if no slave connection is available and `$fallbackToMaster` is false.
* @property-read Transaction|null $transaction The currently active transaction. Null if no active
* transaction.
*
Expand Down
1 change: 0 additions & 1 deletion framework/validators/InlineValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* InlineValidator represents a validator which is defined as a method in the object being validated.
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
Expand Down
5 changes: 2 additions & 3 deletions framework/validators/IpValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
* ['ip_address', 'ip', 'expandIPv6' => true], // expands IPv6 address to a full notation format
* ```
*
* @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. See [[setRanges()]] for
* detailed description. Note that the type of this property differs in getter and setter. See [[getRanges()]]
* and [[setRanges()]] for details.
* @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. Note that the type of this
* property differs in getter and setter. See [[getRanges()]] and [[setRanges()]] for details.
*
* @author Dmitry Naumenko <d.naumenko.a@gmail.com>
* @since 2.0.7
Expand Down
2 changes: 1 addition & 1 deletion framework/validators/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* For more details and usage information on Validator, see the [guide article on validators](guide:input-validation).
*
* @property-read array $attributeNames Attribute names.
* @property-read array $validationAttributes List of attribute names.
* @property-read array|null $validationAttributes List of attribute names.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
Expand Down
2 changes: 1 addition & 1 deletion framework/web/CompositeUrlRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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.
* @property-read int|null $createUrlStatus Status of the URL creation after the last [[createUrl()]] call.
* `null` if rule does not provide info about create status.
*
* @author Qiang Xue <qiang.xue@gmail.com>
Expand Down
3 changes: 0 additions & 3 deletions framework/web/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
*
* For more details and usage information on Controller, see the [guide article on controllers](guide:structure-controllers).
*
* @property Request $request
* @property Response $response
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
Expand Down
7 changes: 3 additions & 4 deletions framework/web/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@
* @property-read string|null $authUser The username sent via HTTP authentication, `null` if the username is
* not given.
* @property string $baseUrl The relative URL for the application.
* @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 array|object $bodyParams The request parameters given in the request body.
* @property-read string $contentType Request content-type. Empty string is returned if this information is
* not 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
* @property-read string|null $csrfTokenFromHeader The CSRF token sent via [[CSRF_HEADER]] by browser. Null is
* returned if no such header is sent.
* @property-read array $eTags The entity tags.
* @property-read HeaderCollection $headers The header collection.
Expand Down Expand Up @@ -77,7 +76,7 @@
* @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.
* @property-read string|null $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.
Expand Down
1 change: 0 additions & 1 deletion framework/web/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class UploadedFile extends BaseObject
* @var resource|null a temporary uploaded stream resource used within PUT and PATCH request.
*/
private $_tempResource;

/**
* @var array[]
*/
Expand Down
2 changes: 1 addition & 1 deletion framework/web/UrlRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* ]
* ```
*
* @property-read null|int $createUrlStatus Status of the URL creation after the last [[createUrl()]] call.
* @property-read int|null $createUrlStatus Status of the URL creation after the last [[createUrl()]] call.
* `null` if rule does not provide info about create status.
*
* @author Qiang Xue <qiang.xue@gmail.com>
Expand Down
3 changes: 2 additions & 1 deletion framework/web/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
* ]
* ```
*
* @property-read string|int $id The unique identifier for the user. If `null`, it means the user is a guest.
* @property-read string|int|null $id The unique identifier for the user. If `null`, it means the user is a
* guest.
* @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.
Expand Down

0 comments on commit 22614a5

Please sign in to comment.