160 Commits

Author SHA1 Message Date
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
06e5472753 Fix #19256: Pass missed $view to user's callback in yii\validators\InlineValidator::clientValidateAttribute() 2022-04-08 01:20:28 +04:00
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
e68b7ae162 Fix #19138: Allow digits in language code
Co-authored-by: ntesic <nikolatesic@gmail.com>
2022-01-08 12:32:19 +03:00
c8d027f649 Fix #18993: Load defaults by attributes() in yii\db\ActiveRecord::loadDefaultValues() 2021-11-12 00:25:08 +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
ac373c06fe Fix #18845: Fix duplicating id in MigrateController::addDefaultPrimaryKey() 2021-09-03 11:35:19 +03:00
17742cb146 don't convert int to string if db type of column is numeric (#18741)
* write adequate test for issue #14663

* don't convert int to string if db type of column is numeric (#14663)

* fix bigint schema test for MySql >8.0.17 (#14663)

* Update CHANGELOG.md

* Update CHANGELOG.md

* update phpdoc [ci skip] (#14663)

* refactoring test case to make it clearer [ci skip] (#14663)

* check `int unsigned` in `QueryBuilderTest::testInsertInteger()` (#14663)

* Update Upgrade.md (#14663)

* fix `int unsigned` schema test for MySql >8.0.17 (#14663)

* fix `int unsigned` schema test for MySql <5.7 (#14663)

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes>
2021-07-06 20:49:01 +02:00
42e8aa4ea5 Fix #18325: Fix yii\db\pgsql\Schema to respect non-default PgSQL schema name for data types
Co-authored-by: SilverFire - Dmitry Naumenko <d.naumenko.a@gmail.com>
2021-04-01 00:52:02 +03:00
64ecbf10b1 Fix for issue #18526
DbCache doesn't working using MSSQL/SqlServer
2021-03-15 22:47:54 +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
50831e6f08 Travis leftovers cleanup 2021-03-03 02:21:39 +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
763a2b04ea Fix #18200: Add maxlength attribute by default to the input text when it is an active field within a yii\grid\DataColumn 2020-11-15 22:16:20 +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
3f3003d823 Fix #18303: Fix creating migration issue for column methods used after defaultValues 2020-10-05 01:02:21 +03:00
4b2af4d2a4 Bug #13973: Correct alterColumn for MSSQL & drop constraints before drop column
Fixing #11158 and #13973
2020-09-08 12:50:32 +03:00
a624c31698 Fix #18198: Fix saving tables with trigger by outputting inserted data from insert query with usage of temporary table 2020-08-05 09:39:05 +03:00
d62590807d Fix #18051: Fix using EachValidator with custom validation function 2020-07-06 16:18:03 +03:00
b642a384fa Fix #18096: Fix InlineValidator with anonymous inline function not working well from EachValidator 2020-06-15 10:14:57 +03:00
2a73a4ae3a Fix #18051: Fix missing support for custom validation method in EachValidator 2020-05-23 17:37:23 +03:00
89ded8c82a Fix #18000: PK value of Oracle ActiveRecord is missing after save 2020-05-02 02:17:27 +03:00
355ca1562d Fix #17810: Fix EachValidator crashing with uninitialized typed properties 2020-04-04 15:03:09 +03:00
8911141150 Migrate Travis from .org to .com 2019-12-06 19:10:42 +03:00
1a8c83ba43 Fix #17694: Fixed Error Handler to clear registered view tags, scripts, and files when rendering error view through action view 2019-12-03 21:36:48 +03:00
09eacd8dc1 Bug #17597: PostgreSQL 12 and partitioned tables support (batyrmastyr)
* yiisoft#17597, pg_constraint.consrc removed in Postgres 12

* yiisoft#17597, load schema for partitioned tables (introduced in Postgres 10)

* messed up with issue number

* #yiisoft#17597 Postgres 12 support, support GENERATED AS IDENTITY columns

* uncleared FileCache leads to falsy failures on subsequent test runs

* moved .sql for postgres 10 and 12 to separate files, added ResetSequence test for GENERATED AS IDENTITY column
2019-10-18 14:57:24 +03:00
6e2b1782e5 Fix #16855: Ignore console commands that have no actions 2019-09-10 19:00:43 +03:00
cc5bb71f75 Fix #17449: Ensure CHECK statement goes after COMMENT in MySQL QueryBuilder::addCommentOnColumn() 2019-09-03 19:36:37 +03:00
cdd40b8dfb Fix #17504: Fix upsert when $updateColumns = true but there are no columns to update in the table 2019-08-21 11:56:20 +03:00
e113e09c9c Fix #17459. Use MySQL docker container for testing (#17476) 2019-07-30 15:51:18 +03:00
9988efc04f Fix #16796: Fixed addition and removal of table and column comments in MSSQL 2019-07-23 18:50:57 +03:00
e50a07c30c Fix #17437: Fixed generating namespaced migrations 2019-07-23 17:28:43 +03:00
a4a22ae1fb Partially fix travis builds (#17456)
* Use xenial since trusty has issues installing MySQL
* 5.4 and 5.5 are available on trusty only so these are set to allow failures for now
* Skip memcached and memcache on PHP 5.6 since it's compiled wrong. See https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/16
* Ignore failure to update MySQL (it could be up to date already)
2019-07-23 15:46:06 +03:00
136705c92b MSSQL: fix tests (#17431) 2019-07-13 02:27:47 +03:00
869f475dc1 Fix #17413, fix #17418: Fixed MSSQL tests 2019-07-10 17:30:41 +03:00
56f639358c Add MSSQL tests (#17410) 2019-07-04 15:51:01 +03:00
eb65dba796 Fixes #17057: Fixed issues with table names that contain special characters or keywords in MSSQL 2019-07-02 14:41:56 +03:00
0fcd495583 Fixes #16394: Fixed issues in migrate/create when specifying default values with colons and adding multiple columns 2019-06-26 12:44:24 +07:00
bdb7c64910 Update to https protocol for php.net links (#17168) [skip ci]
* Updated php.net link for some MemCache properties [skip ci]

* Changed protocol to https for links to php.net in comments

* Changed protocol to https for links to php.net in code

* Changed www.php.net (http) to secure.php.net (https) in comments

* Changed www.php.net (http) to secure.php.net (https) in code

* Changed protocol to https for links to php.net in UPGRADE.md

* Changed protocol to https for links to pecl.php.net in comments

* Changed us.php.net to secure.php.net (https) in comments

* Changed protocol to https for links to php.net in docs

* Changed www.php.net (http) to secure.php.net (https) in docs

* Changed protocol to https for links to pecl.php.net in docs

* Changed ru/jp.php.net to secure.php.net (https) in docs

Don't sure about russian guide: is this links meant to be for guide on russian, or not?
2019-02-28 13:09:27 +03:00
2da6773b68 Fixes #17089: Fixed caching of related records when via() using with callable 2019-02-13 23:22:07 +03:00
4333b90186 Fixes #15482: AR::find()->with() missing data when using string identifiers for relations 2019-01-14 18:50:56 -05:00
36ed136caf Issue #14388: test of dependent ActiveFixtures loading (#17012) 2019-01-04 09:24:38 -05:00
1a34f61e56 Fixes #16941: Set yii\console\controllers\MigrateController::useTablePrefix to true as default value 2019-01-03 12:16:42 -05:00
b4adada51e Fixes #16022: Fix UniqueValidator for PostgreSQL. Checks the uniqueness of keys in jsonb field 2018-12-05 00:06:51 +03:00
ab39246ab5 Fixes #16101: Fixed Error Handler to clear registered meta tags, link tags, css/js scripts and files in error view 2018-10-27 20:27:58 +03:00
1246e5feb3 Fixes #16514: Fixed yii\di\Container::resolveCallableDependencies to support callable object 2018-07-28 00:41:38 +08:00
Sam
84cb255aab Fixes #16245: Fixed __isset() in BaseActiveRecord not catching errors 2018-05-11 11:04:00 +03:00