871 Commits

Author SHA1 Message Date
5df412df2c Fix #20282: Fix compatibility with PHP 8.4: deprecated constant E_STRICT 2024-12-06 12:31:20 +03:00
02ef942c53 Added missing underscore in front of private property #20267 2024-10-19 20:48:31 +03:00
8a0992d5c0 Fixed called class check in Widget::end() when widget configured using callable
See #20267
2024-10-19 20:37:49 +03:00
d9116d3ccd Merge branch 'master' into feature/attach-behaviors-with-closure
# Conflicts:
#	framework/base/Component.php
#	tests/framework/base/ComponentTest.php
2024-09-23 09:39:26 -04:00
cc05f92181 Attach behavior via "as foo" with Closure 2024-08-21 23:35:57 -04:00
4b75427011 Fix regression of regression introduced in GHSA-cjcc-p67m-7qxm and #20232 2024-08-14 16:49:26 +02:00
6abe5bf008 Fix #20232: Fix regression introduced in GHSA-cjcc-p67m-7qxm while attaching behavior defined by __class array key 2024-07-25 11:04:56 +03:00
40fe496eda Fix regression introduced in GHSA-cjcc-p67m-7qxm while attaching behavior defined by __class array key 2024-07-24 23:54:09 +02:00
4b0a02e69c Fix #20147: Fix error handler compatibility with PHP 8.3 (#20228) 2024-07-12 17:48:05 +03:00
3fa2d61e54 Fix #20175: Fix bad result for pagination when used with GridView 2024-06-08 10:29:40 +03:00
855522cc9a Updated JS test packages (#20180)
Updated Node (6 -> 20), NPM (6 -> 10), jsdom (11.11.0 -> 24.1.0), leche (2.2.3 -> 2.3.0), mocha (5.2.0 -> 6.2.3)
2024-06-03 10:07:22 +03:00
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
628d406bfa Merge pull request from GHSA-cjcc-p67m-7qxm
* Fix: Unsafe Reflection in base Component class

* Fix style for consistency

* add changelog entry

* Fix wrong logic

* Fix exception message

* Update framework/CHANGELOG.md

---------

Co-authored-by: Stefano Mtangoo <stefano@hosannahighertech.co.tz>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2024-05-30 19:15:58 +03:00
a292af13bf [PHP 8.4] Fixes for implicit nullability deprecation (#20133)
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations.
Related to #20128.

See:
 - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types)
 - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)

Co-authored-by: Wilmer Arambula <terabytesoftw@gmail.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2024-03-26 11:27:58 +03:00
ce813e5060 Raise version min PHP 7.3. 2024-03-20 17:27:20 -03:00
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
2141f9abdf Improve performance of handling ErrorHandler::$memoryReserveSize 2023-10-23 20:49:27 +02:00
b073daa8f0 Fix typo in description codesnippet (#19873) 2023-06-30 15:58:04 +02:00
4e7aac710f Fix #19813: Fix yii\base\DynamicModel validation with validators that reference missing attributes 2023-05-04 15:37:45 +03:00
68b473679a release version 2.0.47 2022-11-18 20:21:58 +04:00
ca1c7efa93 Fix #19546: Reverted #19309 2022-10-26 15:59:25 +04:00
25eed6fe1c Fix phpdoc for yii\web\Controller (#19619) 2022-10-12 08:41:20 +02:00
b99f02eccd Optimize Model::safeAttributes() (#19547) 2022-09-16 10:44:07 +02:00
391a741a63 Fix #15557: Fix empty fields exclusion in safe attributes of yii\base\Model 2022-08-29 10:17:11 +03:00
22614a5b1f release version 2.0.46 2022-08-19 01:18:45 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
5c055673a5 Fix #19481: Exception is always empty in ErrorHandler when handling fatal error 2022-07-25 23:34:50 +03:00
6c4d3456b3 Optimize ErrorHandler::handleFatalError() (#19444) 2022-06-21 00:17:35 +03:00
4d0d25d479 Fix #19401: Delay exit(1) in yii\base\ErrorHandler::handleFatalError 2022-06-02 00:13:47 +03:00
c1801c7c61 Fix #19402: Add shutdown event and fix working directory in yii\base\ErrorHandler 2022-06-01 10:38:27 +03:00
6599713d2b Removed merging of parent labels in DynamicModel::attributeLabels() since DynamicModel::attributes() does not merge parent attributes. Cleaned up DynamicModel documentation. (#19394) 2022-05-16 23:19:50 +04:00
4768cb0f1d Fix returning type of yii\base\Widget::run() (#19378) 2022-05-04 10:34:41 +03:00
4f1ffd2c98 Fix generation of docs on the site (#19353) 2022-04-15 16:49:11 +04:00
a87c02c712 Fix more types (#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
2022-04-03 11:20:21 +02:00
4628b91e73 Fix types (#19332)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect
2022-03-30 18:40:10 +02:00
7f244793f5 Rewrite Model::attributes() (#19309)
* Optimize Model::attributes()

* Update CHANGELOG.md
2022-03-18 08:09:22 +01:00
a843c61da6 Set the default to an array (#19306) 2022-03-16 08:20:03 +01:00
f3473aa4e8 Fix Model::__clone() (#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>
2022-03-09 08:02:51 +01:00
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
655786b7ed release version 2.0.44 2021-12-30 10:50:56 +03:00
cccb65a70d Fix #19108: Optimize Component::hasEventHandlers() and Component::trigger() 2021-12-23 14:35:50 +03:00
6067608321 Fix #19005: Add yii\base\Module::setControllerPath() 2021-12-09 10:46:15 +03:00
0d899fa18b Fix #19030: Add DI container usage to yii\base\Widget::end() 2021-11-30 23:58:24 +03:00
552593ca3b Prepare for new apidoc (part 2) (#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
2021-11-18 10:10:09 +03:00
fa6f0ef658 Fix variable references in phpdoc (#19006) 2021-11-10 13:26:55 +03:00
4c1f872320 Improve ArrayAccess phpdoc in yii\base\Model (#18992)
Fix parameter name in `offsetSet()`
Fix type of property `$offset` in PhpDoc's
2021-11-01 09:26:54 +03:00
d80974da30 Fix #18955: Check yiisoft/yii2-swiftmailer before using as default mailer in yii\base\Application 2021-10-20 11:10:20 +03:00
0041f034fd [doc] Update PHP doc links (#18957)
* Replace https://secure.php.net with https://www.php.net

* Replace http://www.php.net with https://www.php.net
2021-10-19 14:50:26 +02:00
ae82b58d85 Fix #18909: Fix bug with binding default action parameters for controllers 2021-10-19 01:01:46 +03:00
6b8b0a94d9 Fix phpdoc of yii\base\Model 2021-09-18 00:10:23 +03:00