Skip to content

Commit

Permalink
release version 2.0.44
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Dec 30, 2021
1 parent fe7f5ed commit 655786b
Show file tree
Hide file tree
Showing 59 changed files with 203 additions and 254 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.44-dev';
return '2.0.44';
}

/**
Expand Down
38 changes: 19 additions & 19 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions framework/base/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
42 changes: 17 additions & 25 deletions framework/base/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
3 changes: 1 addition & 2 deletions framework/base/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
7 changes: 2 additions & 5 deletions framework/base/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
19 changes: 9 additions & 10 deletions framework/base/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions framework/base/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion framework/base/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
3 changes: 1 addition & 2 deletions framework/base/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
2 changes: 1 addition & 1 deletion framework/caching/MemCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion framework/captcha/CaptchaAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
7 changes: 3 additions & 4 deletions framework/console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
1 change: 1 addition & 0 deletions framework/console/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* where `<route>` 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.
Expand Down
2 changes: 1 addition & 1 deletion framework/console/controllers/HelpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qiang.xue@gmail.com>
* @since 2.0
Expand Down
4 changes: 2 additions & 2 deletions framework/console/widgets/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pana_1990@hotmail.com>
* @since 2.0.13
Expand Down
2 changes: 1 addition & 1 deletion framework/data/BaseDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 655786b

Please sign in to comment.