1498 Commits

Author SHA1 Message Date
8aa0ac69a6 Correction on dropCheck() message 2023-09-22 09:03:50 +02:00
fbf48be33e Merge branch 'master' into master 2023-07-11 10:07:02 +02:00
4352b8744b Fix #19884: Added support Enums in Query Builder 2023-07-10 18:07:10 +03:00
d135996c64 Fix #19857: Fix AttributeTypecastBehavior::resetOldAttributes() causes "class has no attribute named" InvalidArgumentException 2023-07-10 17:30:32 +03:00
d94fd0f56c Removed (for Mysql QueryBuilder) NotSupportedException() when executing addheck() and dropCheck(), resolve #19819 2023-07-05 11:54:24 +02:00
3615134d3d Added method for addCheck() and dropCheck(), resolve #19817 2023-07-05 11:50:57 +02:00
6c511d99fb Fix #19759: Update docs for Command::createTable(), Migration::createTable() and QueryBuilder::createTable() 2023-06-16 07:02:22 +03:00
8228d81b25 release version 2.0.48 2023-05-22 10:32:53 +04:00
bfca9e33d9 Fix #19749: Add PHP 8.2 support
Co-authored-by: Tobias Munk <schmunk@usrbin.de>
Co-authored-by: Aldo Karendra <akarendra835@gmail.com>
Co-authored-by: Dana Luther <dana.luther@gmail.com>
Co-authored-by: Oleg Poludnenko <ua.oleg@gmail.com>
2023-05-21 15:17:59 +03:00
a8e83abd8f Fix #19743: Non-associative array values in AR weren't considered dirty when reordered 2023-05-21 12:06:16 +03:00
400df717e4 Update LikeCondition::setEscapingReplacements() phpdoc (#19830) 2023-05-09 08:52:41 +02:00
6e7d0fbff4 Fix #19816: Explicitly pass $fallbackToMaster as true to getSlavePdo() to ensure it is not affected by child class with changed defaults 2023-05-04 15:36:33 +03:00
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
a6ff298964 Revert "Fix #19804: Change $this->oldAttributes to $this->_oldAttributes to avoid calling a method unnecessarily"
This reverts commit 246a58163768f0b322ae28fc15200e6c33bef73f.
2023-04-18 19:57:09 +04:00
246a581637 Fix #19804: Change $this->oldAttributes to $this->_oldAttributes to avoid calling a method unnecessarily 2023-04-18 18:54:54 +03:00
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