98 Commits

Author SHA1 Message Date
c960f93dfe Use ::class instead of ::className() in tests. (#20612) 2025-10-14 19:26:35 +03:00
d71f7309ae Add void return to method in tests. (#20602) 2025-10-14 12:37:35 +03:00
909396074e Fix codestyle in build and tests (#20586) 2025-10-10 23:04:09 +03:00
023a9c7c5b Fix @var and @method tags syntax in build and tests folders (#20396) 2025-06-10 19:32:49 +03: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
02ed808056 New methods: BaseActiveRecord::loadRelations() and BaseActiveRecord::loadRelationsFor(). 2023-10-13 13:22:48 +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
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
b9cbc56330 Fixed yii\db\ActiveRecord::with() unable to use relation defined via attached behavior in case asArray is enabled 2018-01-23 12:46:56 +02:00
fb23b0d0ea Code style fixes 2017-11-01 02:43:02 +03:00
afd59a18ec Merge branch 'master' into indexby-after-relations-9342 2017-10-08 00:52:14 +02:00
d68789a195 Fixes #13779, fixes #5786
- #13779: Fixed `yii\db\ActiveRecord::joinWith()` unable to use relation defined via attached behavior.
- #5786: Allowed to use custom constructors in ActiveRecord-based classes.
2017-08-29 15:13:28 +03:00
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
0c0942d6e2 Enable phpdoc_add_missing_param_annotation rule in php-cs-fixer config. (#14681) [skip ci] 2017-08-21 01:57:23 +03:00
b99e955627 Fix CS (#14665)
* Run php-cs-fixer.

* Enable phpdoc_types rule.
2017-08-18 12:10:42 +02:00