Commit Graph

439 Commits

Author SHA1 Message Date
Bizley
7966fe47e6 Scrutinizer fixes (#18685)
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/filters/AccessRule.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/helpers/BaseFileHelper.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Application.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Module.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/MultipartFormDataParser.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/Session.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Controller.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Added vardocs, and small refactor

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/conditions/InConditionBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/Connection.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/mssql/QueryBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/log/Logger.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/BaseMigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Adding space between type

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/CacheController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/FixtureController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0

* Update framework/console/controllers/CacheController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/CacheController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

* Update framework/console/controllers/FixtureController.php

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-05-31 21:07:36 +03:00
DarkDef
4fba562cd0 New attemp 2021-04-26 19:24:14 +03:00
DarkDef
9367af4b15 Fix for issue #18604 2021-04-25 20:19:14 +03:00
Sartor
395dc70468 Merge branch 'master' into fix/db-pgsql-raw-sql-params 2021-04-01 23:49:53 +03:00
Sartor
335385d7ba Db pgsql getRawSql params replace fix 2021-04-01 19:37:50 +03:00
Dmytro Naumenko
10bb71a822 Fix #17203: Fix yii\db\Connection to persist customized queryBuilder configuration after the close()open() cycle 2021-04-01 01:10:16 +03:00
theonedemon
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
DarkDef
64ecbf10b1 Fix for issue #18526
DbCache doesn't working using MSSQL/SqlServer
2021-03-15 22:47:54 +03:00
Bizley
54f25c4b04 Fix #17174: Fix yii\db\BaseActiveRecord::unlink() to not ignore on conditions in via relations 2021-03-14 19:04:07 +03:00
Bizley
6dad27d4a1 Reversed #18499 (#18546) 2021-03-04 12:53:11 +03:00
Alexander Makarov
50831e6f08 Travis leftovers cleanup 2021-03-03 02:21:39 +03:00
Bizley
14f1138441 Correct #18499 2021-03-01 23:02:28 +03:00
Ondřej Vašíček
d1037db68d Fix #18499: When using yii\db\Query::all() and yii\db\Query::$indexBy, the yii\db\Query::$indexBy is auto inserted into yii\db\Query::$select - the same as in yii\db\Query::column()
Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-02-23 18:44:39 +03:00
Valerii Gorbachev
ad6daecdfe Add test for issue #14663 2021-02-08 22:31:41 +03:00
Valerii Gorbachev
9883b78214 Fix #18448: Fix issues in queries and tests for older MSSQL versions 2020-12-24 17:37:07 +03:00
Valerii Gorbachev
0571e806b9 Fix #18447: Do not use getLastInsertID to get PK from insert query to lower collision probability for concurrent inserts 2020-12-24 14:04:01 +03:00
Bizley
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
Valerii Gorbachev
7c7c7148f6 Fix #18287: Fix the OUTPUT got SQL syntax error if the column name is MSSQL keyword e.g key 2020-12-09 00:09:11 +03:00
Brandon Kelly
cafe8e315c Fix #18406: Fix PDO exception when committing or rolling back an autocommitted transaction in PHP 8 2020-11-26 23:54:56 +03:00
Wilmer Arambula
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
Alexander Makarov
ed1c087784 Fix #18317: Additional PHP 8 compatibility fixes
Co-authored-by: Bizley <pawel@positive.codes>
2020-10-23 12:42:44 +03:00
DarkDef
7a50da5cf8 Fix #18287: Fix for OUTPUT INSERTED and computed columns. Added flag to computed values in table schema 2020-10-04 21:44:18 +03:00
Bizley
9790ea3a35 Add tests to ensure ActiveQuery is using DB connection set by model (#18286) 2020-09-17 20:07:32 +03:00
Wilmer Arambula
e5e80ac5ec Fix testGetColumType for PostgreSQL (#18279) 2020-09-11 19:23:00 +03:00
Wilmer Arambula
5558ee793b Fix #18040, fix #15265, fix #18232 database issues (#18225)
- Bug #18040: Display width specification for integer data types was deprecated in MySQL 8.0.19
- Bug #15265: PostgreSQL > 10.0 is not pass tests with default value of timestamp CURRENT_TIMESTAMP
- Bug #18232: Fail tests pgsql v-10.14, v-11.9, v-12-latest
2020-09-10 20:36:04 +03:00
DarkDef
4b2af4d2a4 Bug #13973: Correct alterColumn for MSSQL & drop constraints before drop column
Fixing #11158 and #13973
2020-09-08 12:50:32 +03:00
Maxim Hodyrev
09dc9b70f8 Fix #18066: Fixed yii\db\Query::create() wasn't using all info from withQuery() 2020-09-07 15:45:57 +03:00
DarkDef
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
Alexander Makarov
54be5503c9 #18134: Use better string name in a test 2020-07-03 16:55:00 +03:00
DarkDef
1faa45c552 Fix #18134: Expression as columnName should not be quoted in likeCondition 2020-07-03 12:27:31 +03:00
Alexander Makarov
7ca23a2413 Revert "Fix #18134: Instance of ExpressionInterface will not be quoted in Connection:quoteColumnName"
This reverts commit e342162425.
2020-06-30 21:37:57 +03:00
DarkDef
e342162425 Fix #18134: Instance of ExpressionInterface will not be quoted in Connection:quoteColumnName 2020-06-30 17:59:23 +03:00
Alexander Makarov
385fe13d66 Revert #18102 since renaming is technically problematic (#18109) 2020-06-17 13:40:17 +03:00
Brandon Kelly
eb956e9c6b primary/replica in a definitely non-breaking way (#18106) 2020-06-16 11:33:27 +03:00
DarkDef
d317e41b21 Fix #18101: Fix behavior of OUTPUT INSERTED.* for SQL Server query: "insert default values"; correct MSSQL unit tests; turn off profiling echo message in migration test 2020-06-14 14:20:21 +03:00
Brandon Kelly
472600ee3f Fix #18102: Use “primary”/“replica” terminology instead of “master”/“slave” 2020-06-14 00:12:10 +03:00
Evgenii Goryaev
1b07c0d4fb Fix #18001: Fix getting table metadata for tables ( in their name 2020-06-10 12:22:10 +03:00
Alex
37fc929285 Fix #18010: Allow upper or lower case operators in InCondition and LikeCondition 2020-05-02 13:28:06 +03:00
Kwok
89ded8c82a Fix #18000: PK value of Oracle ActiveRecord is missing after save 2020-05-02 02:17:27 +03:00
Sartor
a66fac3bb1 Fix #17758: Query::withQuery() can be used for CTE 2020-04-13 11:58:18 +03:00
Bizley
0643ef312d Corrected tests 2020-04-08 15:29:54 +02:00
Alexander Makarov
438cc80fc7 Fix #17667: Fix CREATE INDEX failure on sqlite when specifying schema 2020-03-24 15:40:02 +03:00
Alex
50b19dbfba Fix #17920: Fix for Command::getRawSql and Expression in params 2020-03-20 19:15:16 +03:00
Ivan Hermanov
b7d8730044 Fix #16092: Fix duplicate joins in usage of joinWith 2020-03-04 17:57:07 +03:00
vinpel
f165b6b31f Fix #17679: Fix Oracle exception "ORA-01461: can bind a LONG value only for insert into a LONG column" when inserting 4k+ string 2020-03-02 23:26:53 +03:00
simialbi
79e68767db Fix #11945: Fix Schema Builder MySQL column definition order 2020-02-22 17:17:06 +03:00
Bizley
b79fe7d106 Fix #17744: Fix a bug with setting incorrect defaultValue to AR column with CURRENT_TIMESTAMP(x) as default expression (MySQL >= 5.6.4) 2019-12-20 15:23:20 +03:00
Dmitriy Derepko
bc180ac20d Fix #17745: Fix PostgreSQL query builder drops default value when it is empty 2019-12-18 14:27:10 +03:00
Hubert Strychalski
817c264181 Fix #17661: Fix query builder incorrect IN/NOT IN condition handling for null values 2019-12-17 13:58:07 +03:00
Brandon Kelly
88f08005ab Fix #17687: Query::indexBy can now include a table alias 2019-12-12 02:32:40 +03:00