199 Commits

Author SHA1 Message Date
Wilmer Arambula
97a4d711ec Merge branch 'master' into sync-master-2052. 2025-04-26 19:03:07 -04:00
Viktor Khokhryakov
80f2545cf1 Fixes CS (#20288) 2024-12-06 09:11:14 +03:00
Brandon Kelly
048eef42cd Fix #20191: Fix ActiveRecord::getDirtyAttributes() for JSON columns with multi-dimensional array values 2024-06-08 10:31:26 +03:00
Alexander Makarov
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
Кирилл Г
a733e8a6b2 Add a throws comment to BaseActiveRecord save 2024-04-14 01:30:18 +03:00
Wilmer Arambula
20d6c65db2 Merge branch 'master' into sync-to-master. 2024-03-20 06:11:31 -03:00
Razvan Grigore
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
Wilmer Arambula
be70b23398 Merge branch 'master' into sync-to-2-branch 2024-01-03 12:51:59 -03:00
Alexander Makarov
dffb4c7529 Fix version in since tag 2023-12-25 12:20:09 +03:00
Wilmer Arambula
0c8b043001 Merge branch 'master' into synchronize-to-master. 2023-10-22 07:20:26 -03:00
Bizley
7b1761d9e1 Revert to 169c5fb 2023-10-22 11:39:45 +02:00
Wilmer Arambula
a7364aeb87 Sync to master. (#20012)
* added pcntl to requirements check

* Fix #13920: Fixed erroneous validation for specific cases

* Fix #13920: Added my name to CHANGELOG.md

* trim(): Passing null to parameter #1 ($string) of type string is deprecated

* Added section about Unsafe Reflection in Security best practices doc (#19948)

Co-authored-by: Bizley <pawel.bizley@gmail.com>

* Update CHANGELOG.md

* Fixed tests.

* Fix #13920: Add unit test

* Update `bower-asset/inputmask`, `bower-asset/punycode`.

* added CHANGELOG line

* Fix order.

* fix: #19978 - Mistake in Korean translation

* fix: keep doublequote

* Do not duplicate log messages in memory

* Update framework/log/FileTarget.php

Co-authored-by: Bizley <pawel.bizley@gmail.com>

* Update concept-di-container.md

Сслка "Конфигурация приложения" была не верной, она вела на страницу "Service-locator'a"

* Update CHANGELOG.md

* release version 2.0.49.1

* prepare for next release

* Revert changes in `mimeTypes.php` from 4a1f2c6b9b

restores https://github.com/yiisoft/yii2/pull/19936

* update actions/checkout to v4

* Fix mime type generator

* Added note

* Update structure-controllers.md (#20003)

добавил пропущенное слово "как"

* Update CHANGELOG.md

2.0.49.2 changelog

* release version 2.0.49.2

* prepare for next release

* New methods: BaseActiveRecord::loadRelations() and BaseActiveRecord::loadRelationsFor().

* Fixed a bug where the yii serve command would break if a custom router was supplied and it had a space in the path

* Fix `MaskedInputAsset::class`.

* Fix #19927: Fixed `console\controllers\MessageController` when saving translations to database: fixed FK error when adding new string and language at the same time, checking/regenerating all missing messages and dropping messages for unused languages

* Added 'zh' into 'framework/messages/config.php' (#19995)

---------

Co-authored-by: Tobias Munk <schmunk@usrbin.de>
Co-authored-by: Tim Fischer <tf@maschinensucher.de>
Co-authored-by: Tim Fischer <35448254+tim-fischer-maschinensucher@users.noreply.github.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Oleg Poludnenko <ua.oleg@gmail.com>
Co-authored-by: Bizley <pawel.bizley@gmail.com>
Co-authored-by: Sonia Zorba <zonia3000@gmail.com>
Co-authored-by: Tobias Munk <t.munk@herzogkommunikation.de>
Co-authored-by: Akbar Herlambang <akbar6393222@yahoo.com>
Co-authored-by: lubosdz <lubosdz@gmail.com>
Co-authored-by: Yuriy Bachevskiy <Materik-r@yandex.ru>
Co-authored-by: Robert Korulczyk <robert@korulczyk.pl>
Co-authored-by: salehhashemi1992 <81674631+salehhashemi1992@users.noreply.github.com>
Co-authored-by: PowerGamer1 <PowerGamer1@users.noreply.github.com>
Co-authored-by: Brad Bell <brad@pixelandtonic.com>
Co-authored-by: Alexandru Trandafir Catalin <alex@heavydots.com>
Co-authored-by: Nabi KaramAliZadeh <NabiKAZ@gmail.com>
2023-10-19 18:17:15 +03:00
PowerGamer1
02ed808056 New methods: BaseActiveRecord::loadRelations() and BaseActiveRecord::loadRelationsFor(). 2023-10-13 13:22:48 +03:00
Wilmer Arambula
426d52c9a7 Update branch 2.2. 2023-09-14 06:12:42 -03:00
Bizley
0f7248c7a2 release version 2.0.49 2023-08-29 15:36:17 +02:00
PowerGamer1
8532622d7b Fix #19911: Resolved inconsistency in ActiveRecord::getAttributeLabel() with regard of overriding in primary model labels for attributes of related model in favor of allowing such overriding for all levels of relation nesting 2023-08-26 07:06:41 +04:00
Alexander Makarov
9f41df5463 Merge branch '2.2' into update-2.2 2023-08-18 15:48:40 +04:00
rhertogh
e916e9d564 Fix #19914: Fixed ArrayHelper::keyExists() and ::remove() functions when the key is a float and the value is null 2023-08-18 15:31:09 +04:00
Gusakov Egor
73f57fdcb0 Fix #19872: Fixed the definition of dirty attributes in AR properties for a non-associative array in case of changing the order of elements 2023-08-18 15:19:24 +04:00
Wilmer Arambula
61195154aa Remove deprecated InvalidParamException::class in branch 2.2. (#19896) 2023-07-18 17:54:55 +03:00
Stefano D. Mtangoo
96f61b75f8 Fix #19902: Remove support for CUBRID 2023-07-18 17:00:54 +03:00
Oleg Poludnenko
d135996c64 Fix #19857: Fix AttributeTypecastBehavior::resetOldAttributes() causes "class has no attribute named" InvalidArgumentException 2023-07-10 17:30:32 +03:00
Alexander Makarov
a8e83abd8f Fix #19743: Non-associative array values in AR weren't considered dirty when reordered 2023-05-21 12:06:16 +03:00
Thiago Talma
b77caaa0b2 BC break: Calling a method unnecessarily (#19810)
* BC: Calling a method unnecessarily

Making an indirect call to the `$this->getOldAttributes()` method caused my code to break. I understand that the correct thing would be to reference `$this->_oldAttributes`.

* Null check

* Update CHANGELOG.md

* Change isAttributeDirty() method to isValueDifferent()

* Update CHANGELOG.md
2023-04-21 11:24:54 +02:00
Alexander Makarov
a6ff298964 Revert "Fix #19804: Change $this->oldAttributes to $this->_oldAttributes to avoid calling a method unnecessarily"
This reverts commit 246a581637.
2023-04-18 19:57:09 +04:00
Thiago Talma
246a581637 Fix #19804: Change $this->oldAttributes to $this->_oldAttributes to avoid calling a method unnecessarily 2023-04-18 18:54:54 +03:00
Alexander Makarov
22614a5b1f release version 2.0.46 2022-08-19 01:18:45 +03:00
Bizley
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
Maher Al Ghoul
0f004db99b Fixed issue when trying to check if a multidimensional array is dirty… (#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>
2022-04-18 13:41:20 +02:00
Brandon Kelly
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
Alexander Makarov
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
Alexander Makarov
655786b7ed release version 2.0.44 2021-12-30 10:50:56 +03:00
Allan
c905c10c93 Document that link() will not trigger events/behaviors (#18683) 2021-08-07 17:04:25 +03:00
Игорь Тарасов
330166e703 fix Exception\Throwable order 2021-06-13 18:07:43 +05:00
Bizley
7966fe47e6 Scrutinizer fixes (#18685)
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/filters/AccessRule.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/helpers/BaseFileHelper.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Application.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Module.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/MultipartFormDataParser.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/Session.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Controller.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Added vardocs, and small refactor

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/conditions/InConditionBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/Connection.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/mssql/QueryBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/log/Logger.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/BaseMigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Adding space between type

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/CacheController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/FixtureController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Update framework/console/controllers/CacheController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/CacheController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-05-31 21:07:36 +03:00
Bizley
82be8b61cf Replacing deprecated ::className() with ::class (#18671) 2021-05-22 23:14:54 +03:00
Allan
ddeb80cdf3 Fixed typo 2021-05-19 07:32:35 +02:00
Bizley
52cf02d685 Fix #18634: Fix yii\db\BaseActiveRecord::unlink() and unlinkAll() to omit condition for on property when it doesn't exist 2021-05-06 13:04:40 +03:00
Alexander Makarov
f62701bf1d Fixed another call 2021-04-24 11:33:59 +03:00
Alexander Makarov
ffec508e58 Do not use $this to call static method 2021-04-23 21:36:24 +03:00
Bizley
54f25c4b04 Fix #17174: Fix yii\db\BaseActiveRecord::unlink() to not ignore on conditions in via relations 2021-03-14 19:04:07 +03:00
Alexander Makarov
4e2045c040 release version 2.0.41 2021-03-04 00:51:35 +03:00
Alexander Makarov
ccb14ff667 release version 2.0.39 2020-11-10 13:58:35 +03:00
rhertogh
c1b033a15f Using ExpressionInterface instead of Expression in ActiveRecord::findbycondition() (#18188) 2020-07-20 17:54:28 +03:00
rhertogh
931f080aee Fix #18182: yii\db\Expression was not supported as condition in ActiveRecord::findOne() and ActiveRecord::findAll() 2020-07-20 00:21:41 +03:00
drlibra
5ee7fabbf9 Fixes #16552: Added check in yii\db\ActiveQuery::prepare() to prevent populating already populated relation when another relation is requested with via 2018-09-09 23:44:10 +03:00
Vladimir Reznichenko
84c55b468a [minor] SCA (#16464)
* Php Inspections (EA Ultimate): new findings

* Php Inspections (EA Ultimate): dealing with older PHP versions compatibility
2018-07-01 01:04:48 +03:00
Salem Ouerdani
1945dc69c7 Fixes #9133: Added yii\behaviors\OptimisticLockBehavior 2018-05-12 14:43:13 +03:00
Sam
84cb255aab Fixes #16245: Fixed __isset() in BaseActiveRecord not catching errors 2018-05-11 11:04:00 +03:00
243083df
56a3d21c24 Minor refactoring of BaseActiveRecord::populateRelation() (#16161) 2018-04-26 19:09:26 +03:00