105 Commits

Author SHA1 Message Date
249687daef Merge branch 'master' into synt-to-master-4 2025-06-13 04:54:54 -04:00
023a9c7c5b Fix @var and @method tags syntax in build and tests folders (#20396) 2025-06-10 19:32:49 +03:00
97a4d711ec Merge branch 'master' into sync-master-2052. 2025-04-26 19:03:07 -04:00
3357e64ee6 Remove test of data providers, and replace expectNotToPerformAssertions() to assertTrue(true) for code coverage. 2024-03-21 09:56:54 -03:00
843368cd0c Fix tests testCastValues() for mssql, mysql. 2024-03-21 09:07:39 -03:00
d6a970b0ad Fix testCastValues(). 2024-03-21 08:56:29 -03:00
efa3296b20 Revert remove testCastValues() in ActiveRecordTest.php. 2024-03-21 08:40:15 -03:00
ce813e5060 Raise version min PHP 7.3. 2024-03-20 17:27:20 -03:00
63ac4142cb Apply fixeds rector. 2023-10-23 11:26:59 -03:00
0c8b043001 Merge branch 'master' into synchronize-to-master. 2023-10-22 07:20:26 -03:00
7b1761d9e1 Revert to 169c5fb 2023-10-22 11:39:45 +02:00
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 4a1f2c6b9bc90427e91da73f5e8c8fa33d3c53c1

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
02ed808056 New methods: BaseActiveRecord::loadRelations() and BaseActiveRecord::loadRelationsFor(). 2023-10-13 13:22:48 +03:00
426d52c9a7 Update branch 2.2. 2023-09-14 06:12:42 -03:00
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
96f61b75f8 Fix #19902: Remove support for CUBRID 2023-07-18 17:00:54 +03:00
0a3394c6b7 Update dataProvider phpunit-10 and clean more code. (#19889) 2023-07-11 10:35:44 +03:00
2e37b5c87d Raised minimum PHP version to 8.1 (#19879) 2023-07-10 16:48:32 +03:00
7d8507dea8 Fix eager loading of nested one-to-many relations (#19585)
* Update ActiveRelationTrait.php

fix #19507

* update structure-applications.md wiki links (#19597)

* update structure-models.md wiki links (#19598)

* Update structure-views.md wiki links (#19600)

* update structure-filters.md links (#19601)

* Added nested via relations

* Added nested via relations eager loading test

* Update framework/db/ActiveRelationTrait.php

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

* Update tests/data/ar/Customer.php

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

* Update tests/data/ar/Customer.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Update tests/framework/db/ActiveRecordTest.php

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

* Fix #19507: Fix eager loading of nested relations

Co-authored-by: Ihor Sychevskyi <arhell333@gmail.com>
Co-authored-by: Bizley <pawel@positive.codes>
2022-10-04 15:55:53 +06:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
adadbefe88 Fix #19469: Fix a virtual relation not working because of new isset checks in \yii\db\ActiveRelationTrait 2022-07-15 23:52:39 +03:00
67ea4cf968 Fix #19148: Fix undefined array key errors in yii\db\ActiveRelationTrait 2022-01-19 01:47:07 +03:00
c8d027f649 Fix #18993: Load defaults by attributes() in yii\db\ActiveRecord::loadDefaultValues() 2021-11-12 00:25:08 +03:00
54f25c4b04 Fix #17174: Fix yii\db\BaseActiveRecord::unlink() to not ignore on conditions in via relations 2021-03-14 19:04:07 +03:00
6dad27d4a1 Reversed #18499 (#18546) 2021-03-04 12:53:11 +03:00
14f1138441 Correct #18499 2021-03-01 23:02:28 +03:00
ff0fd9a9ea Fix #16492: Fix eager loading Active Record relations when relation key is a subject to a type-casting behavior 2020-12-15 22:56:24 +03:00
8784331022 Fix #18385: Add ci-oracle and fix tests
* Add github action for testing oci8 Oracle.
* Fix CommandTest::testQueryCache.
* Fix tests CommandTest::testBindParamsNonWhere.
* Fix test CommandTest::testInsert.
* Fix test CommanTest::testInsertExpression.
* Fix test CommandTest::testInsertSelectAlias.
* Fix test CommandTest::testBindParamValue.
* Fix tests CommandTest::testBatchInsertDataTypesLocale.
* Fix test CommandTest::testNoTablenameReplacement.
* Fix test CommandTest::testCreateTable.
* Fix test CommandTest::testsInsertQueryAsColumnValue.
* Fix tests CommandTest::testAlterTable.
* Fix test CommandTest::testCreateView.
* Fix test CommandTest::testTransaction.
* Fix test ConnectionTest::testTransactionShortcutCorrect.
* Fix test ConnectionTest::testTransactionShortcutCustom.
* Fix test ConnectionTest::testEnableQueryLog.
* Fix test QueryBuilder::testAddDropDefaultValue.
* Fix test QueryTest::testUnion.
* Fix test QueryTest::testExpressionInFrom.
* Fix test SchemaTest::testFindUniqueIndexes.
* Fix test QueryBuilderTest::testGetColumnType.
* Fix test ActiveRecordTest::testFind.
* Fix test ExistValidatorTest::testExpresionInAttributeColumnName.
* Fix test UniqueValidatorTest::testExpressionInAttributeColumnName.
* Fix ActiveRecordTest testCastValues(), testDefaultValues.
* Fix test UniqueValidatorTest::testValidateAttributeDefault.
* Fix test UniqueValidatorTest::testValidateEmptyAttributeInStringField.
* Fix test UniqueValidatorTest::testValidateEmptyAttributeInIntField.
* Fix test ActiveRecordTest::testBit.
* Fix test ActiveRecordTest::testBooleanAttribute.
* Fix test ActiveRecordTest::testJoinWithAlias.
* Fix test SchemaTest::testColumnSchema.
* Fix test CommandTest:: testBatchInsertSQL.
* Skip CommandTest::testColumnCase.
* Fix test ConnectionTest::testQuoteValue.
* Should be fixed tests conditionsProvider in QueryBuilderTest.
* Fix ActiveRecordTest.php
* Fix test UniqueValidatorTest.
* Fix test QueryBuilderTest::testUpsert.
* Skip SchemaTest::testCompositeFK.
2020-11-23 23:12:01 +03:00
ed1c087784 Fix #18317: Additional PHP 8 compatibility fixes
Co-authored-by: Bizley <pawel@positive.codes>
2020-10-23 12:42:44 +03:00
b7d8730044 Fix #16092: Fix duplicate joins in usage of joinWith 2020-03-04 17:57:07 +03:00
869f475dc1 Fix #17413, fix #17418: Fixed MSSQL tests 2019-07-10 17:30:41 +03:00
9f2a87363e Fixes #17420: Fixed loading of column default values for MSSQL 2019-07-10 17:29:11 +03:00
56f639358c Add MSSQL tests (#17410) 2019-07-04 15:51:01 +03:00
d2c2f63686 Fixes #17127: yii\db\ActiveRecord::findOne() now accepts table aliases 2019-03-22 15:59:26 +03:00
adf8f9a32f Fixes #15931: yii\db\ActiveRecord::findOne() now accepts quoted table and column names using curly and square braces respectively 2019-01-20 17:20:43 +03:00
4333b90186 Fixes #15482: AR::find()->with() missing data when using string identifiers for relations 2019-01-14 18:50:56 -05:00
Sam
84cb255aab Fixes #16245: Fixed __isset() in BaseActiveRecord not catching errors 2018-05-11 11:04:00 +03:00
2a3428c9e9 Fixes #15875: afterSave for new models flushes unsaved data 2018-04-24 19:40:21 +03:00
0af1c05d6a yii\db\ActiveRecord::findOne() now accepts column names prefixed with table name
fixes #15931
2018-03-21 17:44:22 +01:00
b37f361ad7 Fixed possible SQL injection through ActiveRecord::findOne() 2018-03-20 11:20:56 +01:00
52c80f782d moved SQL specific test to SQL AR 2018-03-12 11:21:05 +01:00
23b41220ce Fixed ActiveRecordTest::testCustomARRelation() to work on PHP <5.5 2018-02-21 22:22:06 +02:00
ef9600234e Fix magic getter for ActiveRecord (#15696) 2018-02-20 20:10:44 +05:00
7bd694dccb Enhanced tests 2018-02-16 00:06:59 +02:00
c3c9d1fd97 Merge branch 'master' into SamMousa-indexby-after-relations-9342
Conflicts:
	framework/db/Query.php
2018-02-15 23:38:06 +02:00
74dc1cdc30 Fixes #13618: Active record now resets related models after corresponding attributes updates
Co-authored-by: Robert Korulczyk <robert@korulczyk.pl>
2018-02-12 02:26:49 +03:00
40b038379f Fixes #13019: Support JSON in SchemaBuilderTrait 2018-02-06 16:35:49 +03:00
67f67e3a69 SCA with Php Inspections (EA Extended) (#15571) 2018-01-29 17:08:57 +07:00
71c541773f PHPDoc fix 2018-01-23 13:17:25 +02:00
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00