Skip to content

Commit

Permalink
merge upstream (#3)
Browse files Browse the repository at this point in the history
* 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 <sam@rmcreative.ru>

* 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 <sam@rmcreative.ru>

* 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 <pawel@positive.codes>

* 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 <sam@rmcreative.ru>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

* Update db-query-builder.md (yiisoft#18938)

* Typo PHPDoc (yiisoft#18939)

Typo PHPDoc

Co-authored-by: toir427 <t.tuychiev@safenetpay.com>
Co-authored-by: Bizley <pawel@positive.codes>

* 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 <pawel@positive.codes>

* [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 <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes>

* Fix#18328: Yii::warning() raised on file register after View::endBody() has been moved to View::endPage() (yiisoft#18975)

Co-authored-by: Mehdi Achour <machour@gmail.com>

* 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 <nikolatesic@gmail.com>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

* 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 <sartor@syneforge.com>

* 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 <pawel@positive.codes>

* clarification added (yiisoft#19220)

* release version 2.0.45

* prepare for next release

* Fix MimeTest

* update links (en) (yiisoft#19222)

Co-authored-by: Bizley <pawel@positive.codes>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

* Update comment Dependency::generateReusableHash()

Co-authored-by: Bizley <pawel@positive.codes>

* 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 <pawel@positive.codes>

* Update UploadedFile.php

Co-authored-by: Bizley <pawel@positive.codes>

* 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 <kdesmettre@oph74.fr>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

Co-authored-by: Bizley <pawel@positive.codes>

* Fix code block in rest resource docs (yiisoft#19346)

Co-authored-by: Bizley <pawel@positive.codes>

* 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 <pawel@positive.codes>

* 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 <pawel@positive.codes>

* Added to CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Maher Al Ghoul <maher.gh@opensooq.com>
Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Maher Al Ghoul <maher@rufoof.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Maher Al Ghoul <Maher.AlGhoul@opensooq.com>

* 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 <arogachev90@gmail.com>

* Update docs/guide/rest-filtering-collections.md

Co-authored-by: Alexey Rogachev <arogachev90@gmail.com>

Co-authored-by: Alexey Rogachev <arogachev90@gmail.com>

* 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 <pawel@positive.codes>

Co-authored-by: Bizley <pawel@positive.codes>

* 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 <aldo@mifx.com>

Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Ihor Sychevskyi <arhell333@gmail.com>
Co-authored-by: Anton <info@ensostudio.ru>
Co-authored-by: Evgeniy Tkachenko <et.coder@gmail.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: lexizz <lexizz19@mail.ru>
Co-authored-by: Jaak Tamre <jaak.tamre@gmail.com>
Co-authored-by: Francisco Budaszewski Zanatta <xikaoswow@gmail.com>
Co-authored-by: Senthil Nathan <snathan9@users.noreply.github.com>
Co-authored-by: Oscar Barrett <OscarBarrett@users.noreply.github.com>
Co-authored-by: rhertogh <rhertogh@users.noreply.github.com>
Co-authored-by: Leo <leo.on.the.earth@gmail.com>
Co-authored-by: Alexander Gubarev <gubarev.alex@gmail.com>
Co-authored-by: Basil <git@nadar.io>
Co-authored-by: Michaël Arnauts <michael.arnauts@gmail.com>
Co-authored-by: hexkir <4928273+hexkir@users.noreply.github.com>
Co-authored-by: Oleg Poludnenko <ua.oleg@gmail.com>
Co-authored-by: Mario Simão <mariosimao@poli.ufrj.br>
Co-authored-by: JT Smith <nexxai@gmail.com>
Co-authored-by: Toir Tuychiev <toir427@gmail.com>
Co-authored-by: BIKI DAS <bikid475@gmail.com>
Co-authored-by: Chris Smith <chris@cgsmith.net>
Co-authored-by: toir427 <t.tuychiev@safenetpay.com>
Co-authored-by: Aleksandr Bogatikov <perlexed@gmail.com>
Co-authored-by: Mehdi Achour <machour@gmail.com>
Co-authored-by: Sohel Ahmed Mesaniya <sam.wankaner@gmail.com>
Co-authored-by: Raphael de Almeida <jaguarnet7@gmail.com>
Co-authored-by: Marco van 't Wout <marco@tremani.nl>
Co-authored-by: Alexey Rogachev <arogachev90@gmail.com>
Co-authored-by: John Goetz <jgoetz@users.noreply.github.com>
Co-authored-by: AnkIF <33079906+AnkIF@users.noreply.github.com>
Co-authored-by: ptolomaues <vladislav.lutsenko@gmail.com>
Co-authored-by: Papp Péter <papp.peter@p4it.hu>
Co-authored-by: irice <sgetaplus@gmail.com>
Co-authored-by: Bilal <33921776+glowinginthedark@users.noreply.github.com>
Co-authored-by: ntesic <nikola.tesic@open.telekom.rs>
Co-authored-by: ntesic <nikolatesic@gmail.com>
Co-authored-by: charescape <53265646+charescape@users.noreply.github.com>
Co-authored-by: stevekr <stevekr@users.noreply.github.com>
Co-authored-by: Aurélien Chretien <achretien@users.noreply.github.com>
Co-authored-by: Roman <murolike@gmail.com>
Co-authored-by: twinpigs <mr.owner@gmail.com>
Co-authored-by: Dmitrijlin <dmitrij-lin9@rambler.ru>
Co-authored-by: Long TRAN <longthanhtran@users.noreply.github.com>
Co-authored-by: Sartor <sartorua@gmail.com>
Co-authored-by: Sartor <sartor@syneforge.com>
Co-authored-by: Roman Grinyov <w3lifer@gmail.com>
Co-authored-by: AIZAWA Hina <hina@fetus.jp>
Co-authored-by: Ar Rakin <68149013+virtual-designer@users.noreply.github.com>
Co-authored-by: jef348 <71833496+jef348@users.noreply.github.com>
Co-authored-by: Daniel Becker Alves <danielbeckeralves@gmail.com>
Co-authored-by: Ar Rakin <rakinar2@gmail.com>
Co-authored-by: Tobias Munk <schmunk@usrbin.de>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
Co-authored-by: eecjimmy <eecjimmy@users.noreply.github.com>
Co-authored-by: Brandon Kelly <brandon@pixelandtonic.com>
Co-authored-by: Arkeins <7311955+Arkeins@users.noreply.github.com>
Co-authored-by: Kevin Desmettre <kdesmettre@oph74.fr>
Co-authored-by: Alexey <neff.alexey@gmail.com>
Co-authored-by: FordSmh <61039737+FordSmh@users.noreply.github.com>
Co-authored-by: Adnan <100121069+adnandautovic@users.noreply.github.com>
Co-authored-by: Maher Al Ghoul <speedplli@windowslive.com>
Co-authored-by: Maher Al Ghoul <maher.gh@opensooq.com>
Co-authored-by: Maher Al Ghoul <maher@rufoof.com>
Co-authored-by: Maher Al Ghoul <Maher.AlGhoul@opensooq.com>
Co-authored-by: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com>
Co-authored-by: Kenjebaev Sag'indiq <kenjebaev.sagindik@gmail.com>
Co-authored-by: Vitaly <walkboy@mail.ru>
Co-authored-by: PowerGamer1 <PowerGamer1@users.noreply.github.com>
Co-authored-by: Nekrasov Ilya <nekrasov.ilya90@gmail.com>
Co-authored-by: Aldo Karendra <akarendra835@gmail.com>
Co-authored-by: Mas Aldo <aldo@mifx.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 979 changed files with 15,414 additions and 6,514 deletions.
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -3,5 +3,4 @@
| Is bugfix? | ✔️/❌
| New feature? | ✔️/❌
| Breaks BC? | ✔️/❌
| Tests pass? | ✔️/❌
| Fixed issues | comma-separated list of tickets # fixed by the PR, if any
| Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
54 changes: 7 additions & 47 deletions .github/workflows/build.yml
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid
XDEBUG_MODE: coverage, develop

jobs:
phpunit:
Expand All @@ -28,88 +29,47 @@ jobs:
ports:
- 5432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
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
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]

steps:
- name: Generate french locale
run: sudo locale-gen fr_FR.UTF-8
- name: Create MS SQL Database
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
ini-values: date.timezone='UTC', session.save_path="${{ runner.temp }}"
- name: Install php-sqlsrv
run: |
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - >/dev/null 2>&1
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
printf "\033[32;1m✓ \033[0m\033[90;1madd microsoft keys & repository\n"
sudo apt-get -q update >/dev/null 2>&1
printf "\033[32;1m✓ \033[0m\033[90;1mapt-get update\n"
sudo pecl -q install pdo_sqlsrv > /dev/null 2>&1
printf "\033[32;1m✓ \033[0m\033[90;1mpecl install pdo_sqlsrv\n"
if (php -m | grep -i -q -w "pdo_sqlsrv"); then
printf "\033[32;1mpdo_sqlsrv installed correct\n"
else
printf "\033[31;1mpdo_sqlsrv not installed :-(\n"
fi
if: matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2'
- name: Install Memcached
uses: niden/actions-memcached@v7
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: PHP Unit tests for PHP 7.1
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group oci,wincache,xcache,zenddata,cubrid --colors=always
if: matrix.php == '7.1'
- name: PHP Unit tests for PHP >= 7.2
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
env:
PHPUNIT_EXCLUDE_GROUP: oci,wincache,xcache,zenddata,cubrid
if: matrix.php >= '7.2'
- name: PHP Unit tests for PHP <= 7.0
- name: PHP Unit tests
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
if: matrix.php <= '7.0'
- name: Code coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
if: matrix.php == '7.1'
continue-on-error: true # if is fork

npm:
name: NPM 6 on ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -119,7 +79,7 @@ jobs:
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/ci-mssql.yml
@@ -0,0 +1,103 @@
on:
- pull_request
- push

name: ci-mssql

jobs:
tests:
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}

env:
key: cache

runs-on: ubuntu-latest

strategy:
matrix:
include:
- php: 7.0
extensions: pdo, pdo_sqlsrv-5.8.1
mssql: server:2017-latest
- php: 7.1
extensions: pdo, pdo_sqlsrv-5.8.1
mssql: server:2017-latest
- php: 7.2
extensions: pdo, pdo_sqlsrv-5.8.1
mssql: server:2017-latest
- php: 7.3
extensions: pdo, pdo_sqlsrv-5.8.1
mssql: server:2017-latest
- php: 7.4
extensions: pdo, pdo_sqlsrv
mssql: server:2017-latest
- php: 7.4
extensions: pdo, pdo_sqlsrv
mssql: server:2019-latest
- php: 8.0
extensions: pdo, pdo_sqlsrv
mssql: server:2017-latest
- php: 8.0
extensions: pdo, pdo_sqlsrv
mssql: server:2019-latest

services:
mssql:
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
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

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create MS SQL Database
run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: date.timezone='UTC'
tools: composer:v2, pecl

- name: Determine composer cache directory on Linux
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update

- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.0
if: matrix.php == '8.0'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: PHP Unit tests for PHP 7.1
run: vendor/bin/phpunit --coverage-clover=coverage.clover --group mssql --colors=always
if: matrix.php == '7.1'

- name: Run tests with phpunit without coverage
run: vendor/bin/phpunit --group mssql --colors=always

- name: Code coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
if: matrix.php == '7.1'
continue-on-error: true # if is fork
8 changes: 4 additions & 4 deletions .github/workflows/ci-mysql.yml
Expand Up @@ -19,10 +19,10 @@ jobs:
- ubuntu-latest

php-version:
- "7.4"
- 7.4

mysql-version:
- "latest"
- latest

services:
mysql:
Expand All @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup cache environment
id: cache-env
Expand All @@ -47,7 +47,7 @@ jobs:
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/ci-oracle.yml
@@ -0,0 +1,81 @@
on:
- pull_request
- push

name: ci-oracle

jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}

env:
extensions: oci8, pdo, pdo_oci
key: cache-v1

runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest

php:
- 7.4

services:
oci:
image: wnameless/oracle-xe-11g-r2:latest
ports:
- 1521:1521
options: --name=oci

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
coverage: pcov
tools: composer:v2, pecl

- name: Determine composer cache directory
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: PHP Unit tests
run: vendor/bin/phpunit --coverage-clover=coverage.clover --group oci --colors=always

- name: Code coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
continue-on-error: true # if is fork
15 changes: 8 additions & 7 deletions .github/workflows/ci-pgsql.yml
Expand Up @@ -19,13 +19,14 @@ jobs:
- ubuntu-latest

php-version:
- "7.4"
- 7.4

pgsql-version:
- "10"
- "11"
- "12"
- "13"
- 10
- 11
- 12
- 13
- 14

services:
postgres:
Expand All @@ -40,7 +41,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Cache dependencies installed with composer
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -47,3 +47,4 @@ phpunit.phar
# NPM packages
/node_modules
.env
package-lock.json
2 changes: 1 addition & 1 deletion .php_cs
@@ -1,7 +1,7 @@
<?php

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

0 comments on commit d145f80

Please sign in to comment.