Skip to content

Commit d145f80

Browse files
yus-hamBizleyArhellWinterSilencegithubjeka
authored
merge upstream (#3)
* Added missing note for $categoryMap (yiisoft#18834) * fix invalid link & update (yiisoft#18835) * Fix yiisoft#18823: Rollback changes yiisoft#18806 in `yii\validators\ExistValidator::checkTargetRelationExistence()` * docs: update RFC 7239 link (yiisoft#18839) fix yiisoft#18838 * Do not mention yii2-codeception as it it deprecated * Fix yiisoft#18840: Fix `yii2/log/Logger` to set logger globally * Revert changes in dispatcher 18841 (yiisoft#18843) * Use ircs as IRC protocol See composer/composer@b583310 * update Nginx: X-Accel-Redirec link (yiisoft#18848) * update HttpOnly wiki article link (yiisoft#18851) * Fix yiisoft#18783: Add support for URI namespaced tags in `XmlResponseFormatter`, add `XmlResponseFormatter::$objectTagToLowercase` option to lowercase object tags Co-authored-by: Alexander Makarov <[email protected]> * Fix yiisoft#18762: Added `yii\helpers\Json::$keepObjectType` and `yii\web\JsonResponseFormatter::$keepObjectType` in order to avoid changing zero-indexed objects to array in `yii\helpers\Json::encode()` * update SecureFlag wiki article link (yiisoft#18853) * Remove typo in pt-BR migration docs (yiisoft#18855) Was: "...deleta um registro de uma tabela, você possivelmente mente" Changed to: "...deleta um registro de uma tabela, você possivelmente" * Optimistic locking update (yiisoft#18857) The steps/example requires including the optimisticLock() function in the model that will return the field storing the version. * Add optimisticLock to all guide languages (yiisoft#18860) * Fix yiisoft#17119: Fix `yii\caching\Cache::multiSet()` to use `yii\caching\Cache::$defaultDuration` when no duration is passed * Fix yiisoft#18845: Fix duplicating `id` in `MigrateController::addDefaultPrimaryKey()` * Minor tests cleanup (yiisoft#18811) * update PHP callback link (yiisoft#18864) * Fix yiisoft#18812: Added error messages and optimized "error" methods in `yii\helpers\BaseJson` * Fix yii\base\Controller::bindInjectedParams() to not throw error when argument of `ReflectionUnionType` type is passed (yiisoft#18869) * update traits link (yiisoft#18870) * update class autoloading mechanism link (yiisoft#18874) * update namespace links (yiisoft#18881) * Fixed ArrayHelper::toArray for DateTime (yiisoft#18880) * Fixed ArrayHelper::toArray() for DateTime object * Updated README.md for yiisoft#18880 (Fixed ArrayHelper::toArray() for DateTime object) Co-authored-by: Alexander Makarov <[email protected]> * Fix yiisoft#18858: Reduce memory usage in `yii\base\View::afterRender` method * Fix header collection from array (yiisoft#18883) * Fixed HeaderCollection::fromArray() key case * Added CHANGELOG.md line for yiisoft#18883 (Fixed HeaderCollection::fromArray() key case) * Fix phpdoc of `yii\base\Model` (yiisoft#18888) * Fix phpdoc of yii\base\Model * update PDO link (yiisoft#18889) Co-authored-by: Bizley <[email protected]> * Fix PhpDoc of `yii\console\Controller::stderr()` (yiisoft#18885) * Fix yiisoft#18886: Fix default return of `yii\db\Migration::safeUp()` and `yii\db\Migration::safeDown()` * Update oracle link (yiisoft#18896) * Fix an invalid phpDoc annotation of `yii\data\DataProviderInterface::getSort()`. (yiisoft#18897) * Fix @SInCE tag in XmlResponseFormatter.php (yiisoft#18901) Wrong version, see https://github.com/yiisoft/yii2/blob/master/framework/CHANGELOG.md#2044-under-development * Fix yiisoft#18898: Fix `yii\helpers\Inflector::camel2words()` to work with words ending with 0 * update PHP manual link (yiisoft#18905) * Fix yiisoft#18904: Improve Captcha client-side validation * Fix yiisoft#18899: Replace usages of `strpos` with `strncmp` and remove redundant usage of `array_merge` and `array_values` * update prepared statements link (yiisoft#18911) * Fix yiisoft#18913: Add filename validation for `MessageSource::getMessageFilePath()` Co-authored-by: Alexander Makarov <[email protected]> * Fix yiisoft#18733: Fix session offset doc types (yiisoft#18919) * Fix yiisoft#18908: Add stdClass as possible return type to getBodyParams (yiisoft#18918) * [docs] typofixes (yiisoft#18920) * Fix BaseMigrateController::$migrationPath phpdoc (yiisoft#18924) * Shorten two identical statements in compare validator (yiisoft#18922) * Fix typos * Fix yii\i18n\GettextMessageSource PHPDoc (yiisoft#18916) * Fix phpdoc in BaseFileHelper (yiisoft#18928) * Framework(Baseyii.php) -----> fixed typos and improved doc (yiisoft#18927) * fixed typos and improved doc * spacing fix * The ---> the * removed "are" Co-authored-by: Bizley <[email protected]> * Docs: Update interface link (yiisoft#18931) * docs improvment (yiisoft#18935) * Update db-query-builder.md (yiisoft#18934) * Update db-query-builder.md Fixing 404 page on guide * Update db-query-builder.md removing html Co-authored-by: Bizley <[email protected]> * Update db-query-builder.md (yiisoft#18938) * Typo PHPDoc (yiisoft#18939) Typo PHPDoc Co-authored-by: toir427 <[email protected]> Co-authored-by: Bizley <[email protected]> * Update db-active-record.md interface link (yiisoft#18944) * update DOMLint link (yiisoft#18946) * update max_file_uploads link (yiisoft#18953) * Fix yiisoft#18909: Fix bug with binding default action parameters for controllers * update date() link (yiisoft#18956) Co-authored-by: Bizley <[email protected]> * [doc] Update PHP doc links (yiisoft#18957) * Replace https://secure.php.net with https://www.php.net * Replace http://www.php.net with https://www.php.net * Fix JA guide page (yiisoft#18958) * Update PR template (yiisoft#18963) * Fix yiisoft#18955: Check `yiisoft/yii2-swiftmailer` before using as default mailer in `yii\base\Application` * Remove redundand comments in `PhpDocController` (yiisoft#18968) * Update Session.php (yiisoft#18969) * Fix yiisoft#18328: Raise warning when trying to register a file after `View::endBody()` has been called * update NIST RBAC model link (yiisoft#18973) * StringHelper::dirname() fixed for trailing slash (yiisoft#18965) * StringHelper::dirname() fixed for trailing slash * StringHelper::dirname() fix for PHP <7 versions * Update CHANGELOG.md Co-authored-by: Alexander Makarov <[email protected]> Co-authored-by: Bizley <[email protected]> * Fix#18328: Yii::warning() raised on file register after View::endBody() has been moved to View::endPage() (yiisoft#18975) Co-authored-by: Mehdi Achour <[email protected]> * Fix yiisoft#18962: Extend ignore list in `yii\console\MessageController::$except` * Fix migration command example in BaseMigrateController (yiisoft#18978) * update Data Validation link (yiisoft#18980) * Docs enhancements (yiisoft#18985) - added more strict checks in if condition: that if `$user` exists, only then call its method - Renamed `verifyPassword` to `validatePassword` because yii2-advanced-template use that method name * update Command Injection link (yiisoft#18989) * Brazilian Portuguese translation of the Helpers Overview (yiisoft#18996) * Improve ArrayAccess phpdoc in yii\base\Model (yiisoft#18992) Fix parameter name in `offsetSet()` Fix type of property `$offset` in PhpDoc's * Fix yiisoft#18988: Fix default value of `yii\console\controllers\MessageController::$translator` * update code Injection link (yiisoft#18999) * update Cross Site Scripting link (yiisoft#19002) * Correct note about html encoded items in radio/checkboxlist (yiisoft#19007) * Fix variable references in phpdoc (yiisoft#19006) * Update core-code-style.md (yiisoft#19008) Changed Section 4 from CamelCase to StudlyCase to match the overview and Section 3. * Fix PhpDoc of `ActiveField` (yiisoft#19001) * Fix yiisoft#18993: Load defaults by `attributes()` in `yii\db\ActiveRecord::loadDefaultValues()` * update SQL Injection link (yiisoft#19015) * update csrf link (yiisoft#19023) * Prepare for new apidoc (part 2) (yiisoft#19010) * Fix broken links for events with different namespace * Fix broken links in see tag * Fix broken links in see tag (loadData()) * Fix broken link for var_export() * Fix broken link for CVE * Remove redundant markdown link wrap in see tags * Remove see tags that refer to private properties * Remove more see tags that refer to private properties * Remove see tags that refer to private methods * Remove one more redundant markdown link wrap in see tag [skip ci] * Fix typo in see tag (causes broken link) * Remove more see tags that refer to private methods * update SameSite link (yiisoft#19029) * Fix yiisoft#19021: Fix return type in PhpDoc `yii\db\Migration` functions `up()`, `down()`, `safeUp()` and `safeDown()` * Fixed PhpDoc in Migration.php (revert yiisoft#18886) Fixed the return type of `up()`, `down()`, `safeUp()` and `safeDown()` functions to match the described behavior. The current implementation checks for `false`, "all other return values mean the migration succeeds". This PR also reverts yiisoft#18886 since it was a code fix for what was documentation error. Allow all possible values for `yii\db\Migration` functions `up()`, `down()`, `safeUp()` and `safeDown()` * update Exception Handling link (yiisoft#19035) * Fix yiisoft#18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` * Fix yiisoft#19042: Fix broken link (https://owasp.org/index.php/Top_10_2007-Information_Leakage) (yiisoft#19043) * Normalize todos (yiisoft#19045) * Fix yiisoft#13105: Add yiiActiveForm validate_only property for skipping form auto-submission * update APC extension link (yiisoft#19051) * Update Controller phpdoc (yiisoft#19052) * Fix yiisoft#19030: Add DI container usage to `yii\base\Widget::end()` * Fix yiisoft#19031: Fix displaying console help for parameters with declared types * (Docs) Fixed preview for $prepareDataProvider (yiisoft#19055) * update PHP XCache link (yiisoft#19058) * update MySQL link (yiisoft#19063) * (Docs) Normalized existing "virtual" / "magic" methods' descriptions, add missing ones (yiisoft#19066) * Fix yiisoft#19005: Add `yii\base\Module::setControllerPath()` * Fix bugs preventing generation of PDF guide [skip ci] (yiisoft#19076) * Update RFC 7232 links (yiisoft#19069) * Update CORS Preflight requests link (yiisoft#19078) * Fixed rendering of Apache config snippet in ru guide [skip ci] (yiisoft#19080) * (Docs) Added missing close tag for span (yiisoft#19081) * Fix yiisoft#19086: Update HTTP Bearer Tokens link (yiisoft#19087) * Fix yiisoft#19095: Update broken ICU manual link (yiisoft#19097) * Fix ci-mssql.yml (yiisoft#19102) * Fix build.yml (yiisoft#19104) * Revert "Fix ci-mssql.yml (yiisoft#19102)" This reverts commit 53a9953. * Fix yiisoft#19096: Fix `Request::getIsConsoleRequest()` may return erroneously when testing a Web application in Codeception * update common media types link (yiisoft#19106) * Fix yiisoft#19108: Optimize `Component::hasEventHandlers()` and `Component::trigger()` * Fix yiisoft#19110: Update docker.com link (yiisoft#19111) * Fix yiisoft#18660: Check name if backslash appears * Fix yiisoft#19098: Add `yii\helper\BaseHtml::$normalizeClassAttribute` to fix duplicate classes * Add symfonymailer to list of extensions * update download page link (yiisoft#19115) * Fix yiisoft#19067: Fix constant session regeneration (yiisoft#19113) * Fix constant session regeneration * Add tests for session ID, always regenerating session ID for switching identity * Adjust CHANGELOG messages * Use https in composer.json for yiiframework.com * release version 2.0.44 * prepare for next release * update documentation of the ICU project link (yiisoft#19125) * update ICU documentation link (yiisoft#19128) * Fixed typo (yiisoft#19134) * update ICU API reference link (yiisoft#19143) * Fix yiisoft#19138: Allow digits in language code Co-authored-by: ntesic <[email protected]> * update formatting reference link (yiisoft#19157) * Fix making a guide-2.0 for the website (yiisoft#19159) * update formatting reference link (yiisoft#19164) * Fix yiisoft#19041: Fix PHP 8.1 issues * Fix typo (yiisoft#19168) * update numbering schemas link (yiisoft#19170) * Fix yiisoft#19148: Fix undefined array key errors in `yii\db\ActiveRelationTrait` * Fix yiisoft#19176: Add #[\ReturnTypeWillChange] on MSSQL classes (yiisoft#19177) * Fix yiisoft#19178: Fix null value in unserialize for PHP 8.1 (yiisoft#19178) * Fix yiisoft#19182: RBAC Migration failed when use oracle with oci8 * update rules reference link (yiisoft#19181) Co-authored-by: Bizley <[email protected]> * Fix yiisoft#19171: Added `$pagination` and `$sort` to `\yii\rest\IndexAction` for easy configuration * Fix incorrect translation in Russian tutorial-start-from-scratch.md (yiisoft#19193) * Fix yiisoft#19191: Change `\Exception` to `\Throwable` in `BadRequestHttpException` and `HttpException` * Fix yiisoft#19187: Fix `yii\filters\PageCache` to store original headers names instead of normalized ones * update ICU library link (yiisoft#19190) Co-authored-by: Bizley <[email protected]> * Fix BC introduced in yiisoft#19188 (yiisoft#19194) * update ICU site link (yiisoft#19196) * update ICU manual link (yiisoft#19201) * Fix yiisoft#19204: Support numbers in Inflector::camel2words * update APC link (yiisoft#19210) * Fix yiisoft#19047, fix yiisoft#19118: Fix deprecated preg_match() passing null parameters #2 in db\mysql\Schema.php * Fix yiisoft#19004: Container::resolveCallableDependencies() unable to handle union and intersection types Co-authored-by: Sartor <[email protected]> * Fix yiisoft#19130: Fix DbSession breaks in some case * Fix yiisoft#18821: Allow `yii\db\ExpressionInterface` as column in `yii\db\conditions\InBuilder` * Fix yiisoft#18821: Additional type fixes (yiisoft#19217) * update boolean attributes link (yiisoft#19216) Co-authored-by: Bizley <[email protected]> * clarification added (yiisoft#19220) * release version 2.0.45 * prepare for next release * Fix MimeTest * update links (en) (yiisoft#19222) Co-authored-by: Bizley <[email protected]> * Fix a typo in a Japanese doc (yiisoft#19232) 👍🏻 * Fix PhpDoc of `yii\db\pgsql\QueryBuilder::normalizeTableRowData()` (yiisoft#19234) * Update links (ar) (yiisoft#19230) * Fix bug yiisoft#19235 (yiisoft#19247) * Fix bug yiisoft#19235 * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update db-active-record.md (yiisoft#19250) Complete the php command. * Fix yiisoft#19243: Handle `finfo_open` for tar.xz as `application/octet-stream` on PHP 8.1 * Remove code duplication in `ActiveRecord::attributes()` * update links (es, fr) (yiisoft#19245) * update links (id, it lang) (yiisoft#19258) * Fixing typo (yiisoft#19269) Fixing typo on word "métido", it is supposed to be "método" * update links (ja, pl lang) (yiisoft#19276) * Update links (RU and PT-BR lang) (yiisoft#19281) * Update links (RU lang) * Update links (PT-BR lang) * composer update (allow-plugins) (yiisoft#19277) Co-authored-by: Bizley <[email protected]> * update links (yiisoft#19283) * Fix @param type (yiisoft#19286) * update links (uk, uz lang) (yiisoft#19288) * Fix `Model::__clone()` (yiisoft#19291) * Fix Model::__clone() Reset validators and errors after cloning to prevent changing cloned model via inner objects of clone like as InlineValidator * Update CHANGELOG.md Co-authored-by: Bizley <[email protected]> * update links (vi, zh lang) (yiisoft#19294) * Update links (internals) (yiisoft#19298) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * Update links (internals) * update internals links (yiisoft#19300) * Set the default to an array (yiisoft#19306) * Rewrite Model::attributes() (yiisoft#19309) * Optimize Model::attributes() * Update CHANGELOG.md * Add TrimValidator (yiisoft#19304) * Add TrimValidator * Update Validator.php * Update Validator.php * Update TrimValidator.php * Update TrimValidator.php * Update TrimValidator.php * Update TrimValidator.php * Update CHANGELOG.md * Update Validator.php * Fix yiisoft#19322: Revert force setting value to empty string in case it's `null` in `yii\validators\FilterValidator::validateAttribute()` * Fix yii\caching\Dependency::generateReusableHash() (yiisoft#19303) * Fix yii\caching\Dependency::generateReusableHash() * Update DbQueryDependencyTest.php * Update CHANGELOG.md * Update Dependency.php * Update framework/caching/Dependency.php Co-authored-by: Bizley <[email protected]> * Update comment Dependency::generateReusableHash() Co-authored-by: Bizley <[email protected]> * GroupUrlRule slash in prefix (yiisoft#19330) * Bring back slash * changelog * group url rule test * Add `yii\web\UploadedFile::$fullPath` (yiisoft#19308) * Add `yii\web\UploadedFile::$fullPath` `$_FILES['userfile']['full_path']` Available as of PHP 8.1. Updates related methods `loadFilesRecursive()` and `loadFilesRecursive()` * Update UploadedFile.php * Update UploadedFile.php * Update UploadedFile.php * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Bizley <[email protected]> * Update UploadedFile.php Co-authored-by: Bizley <[email protected]> * Fix types (yiisoft#19332) * Migration::upsert() returns void * Unneeded `@property` tags * Add missing `null` param/return types * Null types for db\Query + db\ActiveQuery * Fixed testSelect * Fix yiisoft#19254: Support specifying custom characters for `yii.validation.trim()` and replace deprecated `jQuery.trim()` * Fix more types (yiisoft#19333) * Migration::upsert() returns void * Unneeded `@property` tags * Add missing `null` param/return types * Null types for db\Query + db\ActiveQuery * Fixed testSelect * Null types for Validator * Several more null types * One more * Make AccessRule::$allow always a boolean It doesn't have any special null handling, so it's safe to default to false * Validator::$skipOnEmpty is always a boolean * Catch all throwable from Widget::widget() * Don't limit $previous args to \Exception The actual \Exception allows $previous to be any throwable in PHP 7+ * Add Throwable catch block to Instance::get() * Throwable cleanup Comment changes only. - Document \Throwable instead of \Exception wherever appropriate - Removed redundant exception/error classes when \Throwable is referenced * Yii::setlogger() accepts null * ArrayHelper::removeValue() can remove any type of value * Change default $allow value to false * Added `jfif` to mimeTypes.php (yiisoft#19338) * Added `jfif` to mimeTypes.php Added the 'image/jpeg' mime type for `.jfif` files (https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format) * Update MimeTest.php Added 'jfif' extension to MimeTest * Fix autoload sections in composer.json (yiisoft#19337) Move `yii\cs\` into `autoload-dev` and add `test` and `build` namespaces * Fix yiisoft#19328: Passing null to parameter #1 ($string) of type string is deprecated in `yii\db\oci\Schema` Co-authored-by: Kevin Desmettre <[email protected]> * Extend examples in `guide/input-tabular-input.md` (yiisoft#19278) * Fix yiisoft#19295: Added alias `text/rtf` for mime-type `application/rtf` * Fix yiisoft#19270: Replace deprecated `scss` converter in `yii\web\AssetConverter::$commands` * Fix yiisoft#19256: Pass missed `$view` to user's callback in `yii\validators\InlineValidator::clientValidateAttribute()` * Resolve yiisoft#19327 (yiisoft#19336) * Resolve yiisoft#19327 * cast from extracted column * Update CHANGELOG * Update CHANGELOG.md Co-authored-by: Bizley <[email protected]> * Improve DataFilterTest (yiisoft#19341) * Fix broken code block inside note block (yiisoft#19342) * Fix yiisoft#19312: Fix PHP 8.1 error when passing null to `yii\helpers\BaseInflector` * Fix broken code block (yiisoft#19344) * 19324 dropdownlist selection for boolean attributes (yiisoft#19331) * Fix yiisoft#19324 by allowing for direct comparison * Invert meaning of strict * Remove WinterSilence from authors list * Fix improper implementation of strict checks * Add test for renderSelectOptions * Partially revert 'Fix improper implementation of strict checks' * Add additional tests for strict * Revert 'Fix improper implementation of strict checks' * Add failing test for demonstration * Comment out demonstration test * Update framework/CHANGELOG.md Co-authored-by: Bizley <[email protected]> Co-authored-by: Bizley <[email protected]> * Fix code block in rest resource docs (yiisoft#19346) Co-authored-by: Bizley <[email protected]> * Allow null values for date formatters in Formatter (yiisoft#19348) * Fix PHP 8.1 Empty header DataColumn (yiisoft#19350) * Fix PHP 8.1 Empty header DataColumn yiisoft#19349 * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Bizley <[email protected]> * Fix generation of docs on the site (yiisoft#19353) * Fix yiisoft#19290: Fix `Request::getHostInfo()` doesn’t return the port if a Host header is used * Fixed issue when trying to check if a multidimensional array is dirty… (yiisoft#19272) * Fixed issue when trying to check if a multidimensional array is dirty attribute or not * fixed issue in logic and added test * Updated test to only support PHP 7 and above * Code refactoring * Updated Test Cases * Update framework/helpers/BaseArrayHelper.php Co-authored-by: Bizley <[email protected]> * Added to CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Bizley <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Alexander Makarov <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> * Fix guide generation errors (yiisoft#19356) * Add guide section for filtering REST collection. (yiisoft#19357) * Add guide section for filtering REST collection. * Update docs/guide/rest-filtering-collections.md Co-authored-by: Alexey Rogachev <[email protected]> * Update docs/guide/rest-filtering-collections.md Co-authored-by: Alexey Rogachev <[email protected]> Co-authored-by: Alexey Rogachev <[email protected]> * Optimize BaseArrayHelper::isIndexed() (yiisoft#19363) * add rest-quick-start (yiisoft#19364) * Fix yiisoft#19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` * Update workflows (yiisoft#19370) * Fix scrutinizer ci and remove code coverage github actions. (yiisoft#19371) * Fix typo in pipeline config (yiisoft#19372) * Update PHP version is README.md (yiisoft#19375) * Update link in Yii::powered() (yiisoft#19376) * Fix returning type of `yii\base\Widget::run()` (yiisoft#19378) * Fix yiisoft#19380: Fix PHP 8.1 passing non string to trim() in `yii\db\Query` * Add Uzbek cyrillic messages translation (yiisoft#19382) * Add Uzbek (cyrillic) language in messages config (yiisoft#19383) * Fix typo in rest-filtering-collections.md (yiisoft#19388) * Simple optimization and PHPDoc type fixes in yii\helpers\BaseArrayHelper (yiisoft#19387) * Removed merging of parent labels in DynamicModel::attributeLabels() since DynamicModel::attributes() does not merge parent attributes. Cleaned up DynamicModel documentation. (yiisoft#19394) * Fix scrutinizer (yiisoft#19395) * fix import UnauthorizedHttpException (yiisoft#19404) * Fix BaseArrayHelper::htmlDecode() (yiisoft#19386) * Fix BaseArrayHelper::htmlDecode() Add missed second argument on recursive calling. * Fix BaseArrayHelper::htmlDecode() `htmlspecialchars_decode()` flags must be same to `htmlspecialchars()` in `BaseArrayHelper::htmlEncode()` * Update ArrayHelperTest.php * Update ArrayHelperTest.php * Update ArrayHelperTest.php * Update CHANGELOG.md * test workflow fix * Update DeadLockTest::testDeadlockException() (yiisoft#19385) * Add test case for Cache::getValue() with non existent key (yiisoft#19396) * Fix yiisoft#19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` * Add TrimValidator to classes.php (yiisoft#19412) * Fix translators in `messages/config.php` (yiisoft#19416) * Fix translators in `messages/config.php` yiisoft#19415 * Update messageConfig.php * Update config.php * Update messageConfig.php * Update CHANGELOG.md * Update framework/CHANGELOG.md Co-authored-by: Bizley <[email protected]> Co-authored-by: Bizley <[email protected]> * Fix outdated links in Formatter (yiisoft#19422) * Normalize PhpDoc types in AssetsManager (yiisoft#19419) * Fix yiisoft#19402: Add shutdown event and fix working directory in `yii\base\ErrorHandler` * Fix yiisoft#19403: Fix types in `yii\web\SessionIterator` * Fix yiisoft#19420: Update list of JS callbacks in `yii\widgets\MaskedInput` * Change http to https in requirements.php (yiisoft#19423) * Fix yiisoft#19401: Delay `exit(1)` in `yii\base\ErrorHandler::handleFatalError` * Make docs more clear about the length of the result (yiisoft#19424) * Truncate help add method and suffix (yiisoft#19425) yiisoft#19424 * update memcached link (yiisoft#19428) * Update intro-yii.md & intro-upgrade-from-v1.md & add start-prerequisites.md translation [id] (yiisoft#19427) * Update intro-yii.md translation [id] * Update intro-upgrade-from-v1.md translation [id] * Add start-prerequisites.md translation [id] Co-authored-by: Mas Aldo <[email protected]> Co-authored-by: Bizley <[email protected]> Co-authored-by: Ihor Sychevskyi <[email protected]> Co-authored-by: Anton <[email protected]> Co-authored-by: Evgeniy Tkachenko <[email protected]> Co-authored-by: Alexander Makarov <[email protected]> Co-authored-by: lexizz <[email protected]> Co-authored-by: Jaak Tamre <[email protected]> Co-authored-by: Francisco Budaszewski Zanatta <[email protected]> Co-authored-by: Senthil Nathan <[email protected]> Co-authored-by: Oscar Barrett <[email protected]> Co-authored-by: rhertogh <[email protected]> Co-authored-by: Leo <[email protected]> Co-authored-by: Alexander Gubarev <[email protected]> Co-authored-by: Basil <[email protected]> Co-authored-by: Michaël Arnauts <[email protected]> Co-authored-by: hexkir <[email protected]> Co-authored-by: Oleg Poludnenko <[email protected]> Co-authored-by: Mario Simão <[email protected]> Co-authored-by: JT Smith <[email protected]> Co-authored-by: Toir Tuychiev <[email protected]> Co-authored-by: BIKI DAS <[email protected]> Co-authored-by: Chris Smith <[email protected]> Co-authored-by: toir427 <[email protected]> Co-authored-by: Aleksandr Bogatikov <[email protected]> Co-authored-by: Mehdi Achour <[email protected]> Co-authored-by: Sohel Ahmed Mesaniya <[email protected]> Co-authored-by: Raphael de Almeida <[email protected]> Co-authored-by: Marco van 't Wout <[email protected]> Co-authored-by: Alexey Rogachev <[email protected]> Co-authored-by: John Goetz <[email protected]> Co-authored-by: AnkIF <[email protected]> Co-authored-by: ptolomaues <[email protected]> Co-authored-by: Papp Péter <[email protected]> Co-authored-by: irice <[email protected]> Co-authored-by: Bilal <[email protected]> Co-authored-by: ntesic <[email protected]> Co-authored-by: ntesic <[email protected]> Co-authored-by: charescape <[email protected]> Co-authored-by: stevekr <[email protected]> Co-authored-by: Aurélien Chretien <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: twinpigs <[email protected]> Co-authored-by: Dmitrijlin <[email protected]> Co-authored-by: Long TRAN <[email protected]> Co-authored-by: Sartor <[email protected]> Co-authored-by: Sartor <[email protected]> Co-authored-by: Roman Grinyov <[email protected]> Co-authored-by: AIZAWA Hina <[email protected]> Co-authored-by: Ar Rakin <[email protected]> Co-authored-by: jef348 <[email protected]> Co-authored-by: Daniel Becker Alves <[email protected]> Co-authored-by: Ar Rakin <[email protected]> Co-authored-by: Tobias Munk <[email protected]> Co-authored-by: Ben Croker <[email protected]> Co-authored-by: eecjimmy <[email protected]> Co-authored-by: Brandon Kelly <[email protected]> Co-authored-by: Arkeins <[email protected]> Co-authored-by: Kevin Desmettre <[email protected]> Co-authored-by: Alexey <[email protected]> Co-authored-by: FordSmh <[email protected]> Co-authored-by: Adnan <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Maher Al Ghoul <[email protected]> Co-authored-by: Wilmer Arambula <[email protected]> Co-authored-by: Kenjebaev Sag'indiq <[email protected]> Co-authored-by: Vitaly <[email protected]> Co-authored-by: PowerGamer1 <[email protected]> Co-authored-by: Nekrasov Ilya <[email protected]> Co-authored-by: Aldo Karendra <[email protected]> Co-authored-by: Mas Aldo <[email protected]>
1 parent 59a9c81 commit d145f80

File tree

979 files changed

+15414
-6514
lines changed

Some content is hidden

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

979 files changed

+15414
-6514
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
| Is bugfix? | ✔️/❌
44
| New feature? | ✔️/❌
55
| Breaks BC? | ✔️/❌
6-
| Tests pass? | ✔️/❌
7-
| Fixed issues | comma-separated list of tickets # fixed by the PR, if any
6+
| Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->

.github/workflows/build.yml

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: [push, pull_request]
55
env:
66
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
77
PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid
8+
XDEBUG_MODE: coverage, develop
89

910
jobs:
1011
phpunit:
@@ -28,88 +29,47 @@ jobs:
2829
ports:
2930
- 5432:5432
3031
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
31-
mssql:
32-
image: mcr.microsoft.com/mssql/server:2017-latest
33-
env:
34-
SA_PASSWORD: YourStrong!Passw0rd
35-
ACCEPT_EULA: Y
36-
MSSQL_PID: Developer
37-
ports:
38-
- 1433:1433
39-
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
4032
strategy:
4133
fail-fast: false
4234
matrix:
4335
os: [ubuntu-latest]
44-
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
36+
php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
4537

4638
steps:
4739
- name: Generate french locale
4840
run: sudo locale-gen fr_FR.UTF-8
49-
- name: Create MS SQL Database
50-
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
5141
- name: Checkout
52-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
5343
- name: Install PHP
5444
uses: shivammathur/setup-php@v2
5545
with:
5646
php-version: ${{ matrix.php }}
5747
tools: pecl
5848
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
5949
ini-values: date.timezone='UTC', session.save_path="${{ runner.temp }}"
60-
- name: Install php-sqlsrv
61-
run: |
62-
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - >/dev/null 2>&1
63-
curl -sSL https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/mssql-server-2017.list >/dev/null 2>&1
64-
printf "\033[32;1m✓ \033[0m\033[90;1madd microsoft keys & repository\n"
65-
sudo apt-get -q update >/dev/null 2>&1
66-
printf "\033[32;1m✓ \033[0m\033[90;1mapt-get update\n"
67-
sudo pecl -q install pdo_sqlsrv > /dev/null 2>&1
68-
printf "\033[32;1m✓ \033[0m\033[90;1mpecl install pdo_sqlsrv\n"
69-
if (php -m | grep -i -q -w "pdo_sqlsrv"); then
70-
printf "\033[32;1mpdo_sqlsrv installed correct\n"
71-
else
72-
printf "\033[31;1mpdo_sqlsrv not installed :-(\n"
73-
fi
74-
if: matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2'
7550
- name: Install Memcached
7651
uses: niden/actions-memcached@v7
7752
- name: Get composer cache directory
7853
id: composer-cache
7954
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8055
- name: Cache composer dependencies
81-
uses: actions/cache@v1
56+
uses: actions/cache@v3
8257
with:
8358
path: ${{ steps.composer-cache.outputs.dir }}
8459
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
8560
restore-keys: ${{ runner.os }}-composer-
8661
- name: Install dependencies
8762
run: composer update $DEFAULT_COMPOSER_FLAGS
88-
- name: PHP Unit tests for PHP 7.1
89-
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group oci,wincache,xcache,zenddata,cubrid --colors=always
90-
if: matrix.php == '7.1'
91-
- name: PHP Unit tests for PHP >= 7.2
92-
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
93-
env:
94-
PHPUNIT_EXCLUDE_GROUP: oci,wincache,xcache,zenddata,cubrid
95-
if: matrix.php >= '7.2'
96-
- name: PHP Unit tests for PHP <= 7.0
63+
- name: PHP Unit tests
9764
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
98-
if: matrix.php <= '7.0'
99-
- name: Code coverage
100-
run: |
101-
wget https://scrutinizer-ci.com/ocular.phar
102-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
103-
if: matrix.php == '7.1'
104-
continue-on-error: true # if is fork
10565

10666
npm:
10767
name: NPM 6 on ubuntu-latest
10868
runs-on: ubuntu-latest
10969

11070
steps:
11171
- name: Checkout
112-
uses: actions/checkout@v2
72+
uses: actions/checkout@v3
11373
- name: Install PHP
11474
uses: shivammathur/setup-php@v2
11575
with:
@@ -119,7 +79,7 @@ jobs:
11979
id: composer-cache
12080
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
12181
- name: Cache composer dependencies
122-
uses: actions/cache@v1
82+
uses: actions/cache@v3
12383
with:
12484
path: ${{ steps.composer-cache.outputs.dir }}
12585
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

.github/workflows/ci-mssql.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
on:
2+
- pull_request
3+
- push
4+
5+
name: ci-mssql
6+
7+
jobs:
8+
tests:
9+
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
10+
11+
env:
12+
key: cache
13+
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
include:
19+
- php: 7.0
20+
extensions: pdo, pdo_sqlsrv-5.8.1
21+
mssql: server:2017-latest
22+
- php: 7.1
23+
extensions: pdo, pdo_sqlsrv-5.8.1
24+
mssql: server:2017-latest
25+
- php: 7.2
26+
extensions: pdo, pdo_sqlsrv-5.8.1
27+
mssql: server:2017-latest
28+
- php: 7.3
29+
extensions: pdo, pdo_sqlsrv-5.8.1
30+
mssql: server:2017-latest
31+
- php: 7.4
32+
extensions: pdo, pdo_sqlsrv
33+
mssql: server:2017-latest
34+
- php: 7.4
35+
extensions: pdo, pdo_sqlsrv
36+
mssql: server:2019-latest
37+
- php: 8.0
38+
extensions: pdo, pdo_sqlsrv
39+
mssql: server:2017-latest
40+
- php: 8.0
41+
extensions: pdo, pdo_sqlsrv
42+
mssql: server:2019-latest
43+
44+
services:
45+
mssql:
46+
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
47+
env:
48+
SA_PASSWORD: YourStrong!Passw0rd
49+
ACCEPT_EULA: Y
50+
MSSQL_PID: Developer
51+
ports:
52+
- 1433:1433
53+
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v3
58+
59+
- name: Create MS SQL Database
60+
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
61+
62+
- name: Install PHP with extensions
63+
uses: shivammathur/setup-php@v2
64+
with:
65+
php-version: ${{ matrix.php }}
66+
extensions: ${{ matrix.extensions }}
67+
ini-values: date.timezone='UTC'
68+
tools: composer:v2, pecl
69+
70+
- name: Determine composer cache directory on Linux
71+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
72+
73+
- name: Cache dependencies installed with composer
74+
uses: actions/cache@v3
75+
with:
76+
path: ${{ env.COMPOSER_CACHE_DIR }}
77+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
78+
restore-keys: |
79+
php${{ matrix.php }}-composer-
80+
81+
- name: Update composer
82+
run: composer self-update
83+
84+
- name: Install dependencies with composer
85+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
86+
87+
- name: Install dependencies with composer php 8.0
88+
if: matrix.php == '8.0'
89+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
90+
91+
- name: PHP Unit tests for PHP 7.1
92+
run: vendor/bin/phpunit --coverage-clover=coverage.clover --group mssql --colors=always
93+
if: matrix.php == '7.1'
94+
95+
- name: Run tests with phpunit without coverage
96+
run: vendor/bin/phpunit --group mssql --colors=always
97+
98+
- name: Code coverage
99+
run: |
100+
wget https://scrutinizer-ci.com/ocular.phar
101+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
102+
if: matrix.php == '7.1'
103+
continue-on-error: true # if is fork

.github/workflows/ci-mysql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
- ubuntu-latest
2020

2121
php-version:
22-
- "7.4"
22+
- 7.4
2323

2424
mysql-version:
25-
- "latest"
25+
- latest
2626

2727
services:
2828
mysql:
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
4040

4141
- name: Setup cache environment
4242
id: cache-env
@@ -47,7 +47,7 @@ jobs:
4747
key: ${{ env.key }}
4848

4949
- name: Cache extensions
50-
uses: actions/cache@v1
50+
uses: actions/cache@v3
5151
with:
5252
path: ${{ steps.cache-env.outputs.dir }}
5353
key: ${{ steps.cache-env.outputs.key }}

.github/workflows/ci-oracle.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
on:
2+
- pull_request
3+
- push
4+
5+
name: ci-oracle
6+
7+
jobs:
8+
tests:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
11+
env:
12+
extensions: oci8, pdo, pdo_oci
13+
key: cache-v1
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
22+
php:
23+
- 7.4
24+
25+
services:
26+
oci:
27+
image: wnameless/oracle-xe-11g-r2:latest
28+
ports:
29+
- 1521:1521
30+
options: --name=oci
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
36+
- name: Setup cache environment
37+
id: cache-env
38+
uses: shivammathur/cache-extensions@v1
39+
with:
40+
php-version: ${{ matrix.php }}
41+
extensions: ${{ env.extensions }}
42+
key: ${{ env.key }}
43+
44+
- name: Cache extensions
45+
uses: actions/cache@v1
46+
with:
47+
path: ${{ steps.cache-env.outputs.dir }}
48+
key: ${{ steps.cache-env.outputs.key }}
49+
restore-keys: ${{ steps.cache-env.outputs.key }}
50+
51+
- name: Install PHP with extensions
52+
uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: ${{ matrix.php }}
55+
extensions: ${{ env.extensions }}
56+
ini-values: date.timezone='UTC'
57+
coverage: pcov
58+
tools: composer:v2, pecl
59+
60+
- name: Determine composer cache directory
61+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
62+
63+
- name: Cache dependencies installed with composer
64+
uses: actions/cache@v3
65+
with:
66+
path: ${{ env.COMPOSER_CACHE_DIR }}
67+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
68+
restore-keys: |
69+
php${{ matrix.php }}-composer-
70+
71+
- name: Install dependencies with composer
72+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
73+
74+
- name: PHP Unit tests
75+
run: vendor/bin/phpunit --coverage-clover=coverage.clover --group oci --colors=always
76+
77+
- name: Code coverage
78+
run: |
79+
wget https://scrutinizer-ci.com/ocular.phar
80+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
81+
continue-on-error: true # if is fork

.github/workflows/ci-pgsql.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ jobs:
1919
- ubuntu-latest
2020

2121
php-version:
22-
- "7.4"
22+
- 7.4
2323

2424
pgsql-version:
25-
- "10"
26-
- "11"
27-
- "12"
28-
- "13"
25+
- 10
26+
- 11
27+
- 12
28+
- 13
29+
- 14
2930

3031
services:
3132
postgres:
@@ -40,7 +41,7 @@ jobs:
4041

4142
steps:
4243
- name: Checkout
43-
uses: actions/checkout@v2
44+
uses: actions/checkout@v3
4445

4546
- name: Setup cache environment
4647
id: cache-env
@@ -70,7 +71,7 @@ jobs:
7071
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
7172

7273
- name: Cache dependencies installed with composer
73-
uses: actions/cache@v1
74+
uses: actions/cache@v3
7475
with:
7576
path: ${{ env.COMPOSER_CACHE_DIR }}
7677
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ phpunit.phar
4747
# NPM packages
4848
/node_modules
4949
.env
50+
package-lock.json

.php_cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
if (!class_exists('yii\cs\YiisoftConfig', true)) {
4-
// @todo change error message
4+
// TODO: change error message
55
fwrite(STDERR, "Your php-cs-version is outdated: please upgrade it.\n");
66
die(16);
77
}

0 commit comments

Comments
 (0)