90 Commits

Author SHA1 Message Date
63ae3f9a04 Fix #9740: Usage of DI instead of new keyword in Schemas 2022-11-27 19:10:23 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03: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
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
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
fbd932903c Fix #18508: Fix Postgres SQL query for load table indexes with correct column order 2021-02-25 13:08:35 +03:00
b8f4958092 Fix #18442: Fix calls with array access to strings 2020-12-23 01:08:58 +03:00
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
385fe13d66 Revert #18102 since renaming is technically problematic (#18109) 2020-06-17 13:40:17 +03:00
472600ee3f Fix #18102: Use “primary”/“replica” terminology instead of “master”/“slave” 2020-06-14 00:12:10 +03:00
69b1966b4a PHP 7.4 fixes
- Fix `Model::activeAttributes()` to access array offset on value of non-string
- Fix incorrect decoding of default binary value for PostgreSQL
- Fix incorrect type-casting of reflection type to string
2019-12-10 15:08:45 +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
1a74b3d4f8 [minor] SCA with Php Inspections (EA Ultimate) (#15871)
* Php Inspections (EA Ultimate): use type casting where applicable

* Php Inspections (EA Ultimate): use constants where applicable

* Php Inspections (EA Ultimate): CS

* Php Inspections (EA Ultimate): address some of one-time used variables

* Php Inspections (EA Ultimate): address some of performance-related findings

* Php Inspections (EA Ultimate): address some of performance-related findings

* Php Inspections (EA Ultimate): revert a constant usage

* Php Inspections (EA Ultimate): revert sequential assignments

* Php Inspections (EA Ultimate): build is green again

* Php Inspections (EA Ultimate): revert array_merge tweaks

* Php Inspections (EA Ultimate): revert BC-incompatible one-time used variable tweak

* Update description [skip ci]

* Php Inspections (EA Ultimate): CS
2018-03-12 01:37:19 +03:00
f7da602250 PgSQL: Fix table schema load for table name in quotes
This commit fixes the table schema loading for PostgreSQL, when
the table name is specified in quotes, e.g. `"type"`.
2018-03-04 20:19:45 +02:00
089685975a Wrap @inheritdoc tag in curly brackets [skip ci] 2018-02-19 00:16:19 +02:00
de1750228d Fixes #13879: Added upsert support for yii\db\QueryBuilder and yii\db\Command 2018-02-09 01:05:50 +03:00
d16586334d Fixes #7640: Implemented custom data types support. Added JSON support for MySQL and PostgreSQL, array support for PostgreSQL 2018-02-05 04:59:14 +07:00
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
4e176ca325 Fixes #15108: Fixed yii\db\Schema::getSchemaNames() for MSSQL and added tests for all DBMSes 2017-11-07 19:20:14 +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
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
12eb936083 Enable heredoc_to_nowdoc rule in php-cs-fixer (#14419) 2017-07-10 13:18:52 +03:00
164d3c83e9 Have I fixed these phpdocs? Let’s see… 2017-07-03 15:10:48 +03:00
452974cab3 Mark not supported constraint retrieving methods 2017-06-28 21:40:52 +03:00
c8856ccd4e Fix merging issues & CS 2017-06-17 01:02:01 +03:00
f820d2ca36 Merge branch 'master' into db-constraints 2017-06-16 16:52:43 +03:00
ba0ab403b5 Added php-cs-fixer coding standards validation to Travis CI (#14100)
* php-cs-fixer: PSR2 rule.

* php-cs-fixer: PSR2 rule - fix views.

* Travis setup refactoring.

* Add php-cs-fixer to travis cs tests.

* Fix tests on hhvm-3.12

* improve travis config

* composer update

* revert composer update

* improve travis config

* Fix CS.

* Extract config to separate classes.

* Extract config to separate classes.

* Add file header.

* Force short array syntax.

* binary_operator_spaces fixer

* Fix broken tests

* cast_spaces fixer

* concat_space fixer

* dir_constant fixer

* ereg_to_preg fixer

* function_typehint_space fixer

* hash_to_slash_comment fixer

* is_null fixer

* linebreak_after_opening_tag fixer

* lowercase_cast fixer

* magic_constant_casing fixer

* modernize_types_casting fixer

* native_function_casing fixer

* new_with_braces fixer

* no_alias_functions fixer

* no_blank_lines_after_class_opening fixer

* no_blank_lines_after_phpdoc fixer

* no_empty_comment fixer

* no_empty_phpdoc fixer

* no_empty_statement fixer

* no_extra_consecutive_blank_lines fixer

* no_leading_import_slash fixer

* no_leading_namespace_whitespace fixer

* no_mixed_echo_print fixer

* no_multiline_whitespace_around_double_arrow fixer

* no_multiline_whitespace_before_semicolons fixer

* no_php4_constructor fixer

* no_short_bool_cast fixer

* no_singleline_whitespace_before_semicolons fixer

* no_spaces_around_offset fixer

* no_trailing_comma_in_list_call fixer

* no_trailing_comma_in_singleline_array fixer

* no_unneeded_control_parentheses fixer

* no_unused_imports fixer

* no_useless_return fixer

* no_whitespace_before_comma_in_array fixer

* no_whitespace_in_blank_line fixer

* not_operator_with_successor_space fixer

* object_operator_without_whitespace fixer

* ordered_imports fixer

* php_unit_construct fixer

* php_unit_dedicate_assert fixer

* php_unit_fqcn_annotation fixer

* phpdoc_indent fixer

* phpdoc_no_access fixer

* phpdoc_no_empty_return fixer

* phpdoc_no_package fixer

* phpdoc_no_useless_inheritdoc fixer

* Fix broken tests

* phpdoc_return_self_reference fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_to_comment fixer

* phpdoc_trim fixer

* phpdoc_var_without_name fixer

* psr4 fixer

* self_accessor fixer

* short_scalar_cast fixer

* single_blank_line_before_namespace fixer

* single_quote fixer

* standardize_not_equals fixer

* ternary_operator_spaces fixer

* trailing_comma_in_multiline_array fixer

* trim_array_spaces fixer

* protected_to_private fixer

* unary_operator_spaces fixer

* whitespace_after_comma_in_array fixer

* `parent::setRules()` -> `$this->setRules()`

* blank_line_after_opening_tag fixer

* Update finder config.

* Revert changes for YiiRequirementChecker.

* Fix array formatting.

* Add missing import.

* Fix CS for new code merged from master.

* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
2b7e8be1e8 Fixes #14192: Fixed wrong default null value for TIMESTAMP when using PostgreSQL 2017-06-11 18:48:15 +03:00
be658f82bf release version 2.0.12 2017-06-05 16:33:41 +02:00
73ac13e6d7 Implement retrieving dbms constraints 2017-05-15 20:55:25 +03:00
28d8fa66fc Fixes #14012: yii\db\pgsql\Schema::findViewNames() was skipping materialized views 2017-04-21 02:23:51 +03:00
0ea45c78a8 Fixes #13571: Fix yii\db\mssql\QueryBuilder::checkIntegrity for all tables 2017-02-22 16:57:32 +03:00
3692941ead Fixes #11464: Foreign key name is not provided by schema 2017-01-16 00:27:20 +03:00
0a978f9d1e Fix fetching schema information for pgsql when PDO::ATTR_CASE is set 2017-01-05 17:54:37 +02:00
8f5f540455 Fix fetching table schema for pgsql when PDO::ATTR_CASE is set 2016-12-19 17:10:34 +02:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
ad796dbf22 #11912: Postgresql negative default values support for integer/float/decimal columns (#11933)
* fixes #11912: Postgresql negative default values support for integer/float/decimal columns

* added more tests

* updated CHANGELOG.md
2016-07-11 23:49:43 +02:00
ee92cfa7ba release version 2.0.9 2016-07-11 15:36:42 +02:00
7fb447506d fix mixed case column names for unique indexes in postgres
fixes #10613
2016-07-06 00:11:07 +02:00
33dfddd0c2 Fixes #8644: Fixed trying to ENABLE/DISABLE TRIGGER ALL on a view in PostgreSQL 2016-06-19 15:33:00 +03:00
9d327baa8b coding style fixes 2016-05-26 11:19:32 +02:00
15432971d6 db/ColumnSchemaBuilder::buildCommentString() returns empty string by default 2016-04-20 09:26:07 +03:00
0fe27b9d3b Refactored code in PR #9441 2016-04-19 17:48:25 +03:00
c9dfc90be0 Merge branch 'methods_for_schema_builder' of https://github.com/vaseninm/yii2 into vaseninm-methods_for_schema_builder 2016-04-19 12:21:33 +03:00
51b99320bd Sqlite specific schema builder class actually gets loaded now 2016-02-20 06:53:31 -08:00
eaeb926768 Adds char datatype to framework 2016-02-20 01:52:23 -08:00
f9473ebc61 Fix default value parsing in pgsql\Schema for null values
Fixes #10692
close #10694
2016-02-07 20:07:17 +01:00
5cecb09c1b Fixes #9443: Added unsigned() to ColumnSchemaBuilder 2015-12-26 15:20:21 +03:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
5ab4f0f090 Better quotes usage in strings
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00