1483 Commits

Author SHA1 Message Date
5d0d6f4a18 Fix #19705: Add binary and other data type to $typeMap list for MySQL 2023-02-09 22:05:52 +03:00
ff2d004c35 Fix #19734: PHP 8.1 compatibility fix for $query->orderBy(null) 2023-01-13 10:59:54 +04:00
948029f583 Fix #19693: Fix db/Command not caching NULL result with scalar fetchMode 2022-12-04 19:55:12 +03:00
51fc314f58 Add back SqlToken import in sqlite/Schema 2022-11-28 13:05:19 +04:00
63ae3f9a04 Fix #9740: Usage of DI instead of new keyword in Schemas 2022-11-27 19:10:23 +03:00
add56d843f Fix #17811: Do not reset retryHandler when yii\db\Command::reset() called 2022-11-16 11:03:00 +03:00
0b4d5aaafa Fix #19520: Fix for TIMESTAMP & ROWVERSION columns in MSSQL insert query 2022-11-13 21:26:49 +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
473ead8e46 Optimize: simplified regexp (#19541) 2022-09-06 09:42:58 +03:00
6a144bfc61 Fix #19537: Fix default expression detection for MariaDB date and time columns 2022-09-04 22:10:02 +03:00
2808e8d814 Fix #15500: Fix saving empty records to MySQL 2022-08-29 10:43:00 +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
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
dcb0750587 Fix #19454: Fix PDO exception code not properly passed to yii\db\Exception 2022-07-07 18:24:06 +03:00
c5c792cb07 Update ActiveRelationTrait.php (#19453)
* Update ActiveRelationTrait.php

* Update ActiveRelationTrait.php

* Update framework/db/ActiveRelationTrait.php

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

Co-authored-by: Bizley <pawel@positive.codes>
2022-06-24 09:02:04 +02:00
f2b2d576be fix: typecast for backed enums (#19319)
* fix: typecast for backed enums

Fixes #19318

* Update CHANGELOG.md

Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2022-06-15 10:03:50 +02:00
07918b6c8f Fix manual cubrid links (#19436)
* Update Schema.php

fix broken link

* fix cubrid manual links

* update links

* fxi
2022-06-13 12:23:58 +02:00
2d6f1d5e05 Fix #19380: Fix PHP 8.1 passing non string to trim() in yii\db\Query 2022-05-04 16:29:14 +03:00
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
4e1a37d567 Resolve #19327 (#19336)
* Resolve #19327

* cast from extracted column

* Update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Bizley <pawel@positive.codes>
2022-04-08 08:05:47 +02:00
9f6d24d939 Fix #19328: Passing null to parameter #1 ($string) of type string is deprecated in yii\db\oci\Schema
Co-authored-by: Kevin Desmettre <kdesmettre@oph74.fr>
2022-04-06 23:58:14 +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
3203353a38 Remove code duplication in ActiveRecord::attributes() 2022-02-20 01:01:24 +03:00
cb5e180695 Fix PhpDoc of yii\db\pgsql\QueryBuilder::normalizeTableRowData() (#19234) 2022-02-15 14:27:59 +03:00
9fbdc9f01b Fix #18821: Additional type fixes (#19217) 2022-02-09 11:35:20 +03:00
730f0e56b5 Fix #18821: Allow yii\db\ExpressionInterface as column in yii\db\conditions\InBuilder 2022-02-08 16:51:38 +03:00
6a36fa82c7 Fix #19047, fix #19118: Fix deprecated preg_match() passing null parameters #2 in db\mysql\Schema.php 2022-02-07 01:29:03 +03:00
942e726a8d Fix #19176: Add #[\ReturnTypeWillChange] on MSSQL classes (#19177) 2022-01-20 10:25:41 +03:00
67ea4cf968 Fix #19148: Fix undefined array key errors in yii\db\ActiveRelationTrait 2022-01-19 01:47:07 +03:00
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
e353835cc5 Fixed typo (#19134) 2022-01-05 15:12:10 +03:00
655786b7ed release version 2.0.44 2021-12-30 10:50:56 +03:00
1e41533789 (Docs) Normalized existing "virtual" / "magic" methods' descriptions, add missing ones (#19066) 2021-12-08 12:27:28 +03:00
81a3b83995 Fix #19021: Fix return type in PhpDoc yii\db\Migration functions up(), down(), safeUp() and safeDown()
* Fixed PhpDoc in Migration.php (revert #18886)

Fixed the return type of `up()`, `down()`, `safeUp()` and `safeDown()` functions to match the described behavior.
The current implementation checks for `false`, "all other return values mean the migration succeeds".
This PR also reverts #18886 since it was a code fix for what was documentation error.

Allow all possible values for `yii\db\Migration` functions `up()`, `down()`, `safeUp()` and `safeDown()`
2021-11-22 00:43:53 +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
c8d027f649 Fix #18993: Load defaults by attributes() in yii\db\ActiveRecord::loadDefaultValues() 2021-11-12 00:25:08 +03:00
fa6f0ef658 Fix variable references in phpdoc (#19006) 2021-11-10 13:26:55 +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
14a28ab4f4 docs improvment (#18935) 2021-10-05 10:13:33 +02:00
e3028c524d Fix #18899: Replace usages of strpos with strncmp and remove redundant usage of array_merge and array_values 2021-09-28 11:06:46 +03:00
fdbdbb51fb Fix #18886: Fix default return of yii\db\Migration::safeUp() and yii\db\Migration::safeDown() 2021-09-19 12:38:06 +03:00
540a9011af release version 2.0.43 2021-08-09 20:38:43 +03:00
c905c10c93 Document that link() will not trigger events/behaviors (#18683) 2021-08-07 17:04:25 +03:00
22c7cef869 Fix PhpDoc in yii\db\Query (#18752) 2021-07-29 02:19:01 +03:00
d9928455e3 Fix PhpDoc for yii\db\{QueryInterface,Query} (#18753) 2021-07-27 22:44:47 +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
fd1d4f75fe Merge branch 'master' into dicr-queryinterface-count 2021-06-15 15:19:07 +03:00
ed8fbaa8b1 fix QueryInterface::count return type 2021-06-13 18:41:01 +05:00