Commit Graph

1108 Commits

Author SHA1 Message Date
Klimov Paul
9e6f9e3b6d Fixed serialization of yii\db\Connection instance closes database connection 2017-09-01 13:30:56 +03:00
Paul Klimov
d68789a195 Fixes #13779, fixes #5786
- #13779: Fixed `yii\db\ActiveRecord::joinWith()` unable to use relation defined via attached behavior.
- #5786: Allowed to use custom constructors in ActiveRecord-based classes.
2017-08-29 15:13:28 +03:00
Francis Lavoie
9588c8f5a4 Fixes #13853: Added yii\db\Migration::$compact as well as yii\console\controllers\BaseMigrateController::$compact to allow making the migration console output more compact 2017-08-25 13:30:28 +03:00
Carsten Brandt
98a71d8b0d Adjust QueryInterface and QueryTrait types on where() (#14714)
these did never allow a string condition. Only SQL Query and AR implementation do.

fixes #14496
2017-08-24 10:59:20 +02:00
SilverFire - Dmitry Naumenko
79ad74f763 Fixed wrong PHPDoc annotaion in ActiveRecordInterface
Closes #14496
2017-08-24 11:06:17 +03:00
Carsten Brandt
8ff3756d55 remove loop over an array with one element
small optimization, fixes #12061
2017-08-22 13:03:01 +02:00
Robert Korulczyk
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
Robert Korulczyk
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
Carsten Brandt
cda3089623 Fixed batchInsert casting of double values according to locale (#14448)
fixes #6526
2017-08-13 22:15:04 +02:00
forevermatt
1d44de7b15 Fix abstract column type for unsigned primary key (#14626) [skip ci] 2017-08-11 02:59:40 +03:00
Alexander Makarov
1f26db9fb7 Applied code style fixes 2017-07-21 15:42:06 +03:00
Sergey Makinen
92d2245ca6 Add support for an older SQLite in constraints (fixes #14483) (#14497) 2017-07-21 00:03:16 +03:00
Carsten Brandt
69673c0c94 Rename Object -> BaseObject for PHP 7.2 compatibility
issue #7936
2017-07-19 10:51:46 +02:00
Boudewijn Vahrmeijer
03d53b785d Fixes #14449: Fix PHP 7.2 compatibility bugs and add explicit closure support in yii\base\Application 2017-07-14 12:23:03 +03:00
Robert Korulczyk
2fa4ccc1da Fix phpdoc for $_master and $_slave properties in yii\db\Connection (#14447) 2017-07-13 12:24:14 +02:00
nikosid
fe607b83d2 Fixes #14434: fixed metadata cache regression 2017-07-13 09:54:36 +03:00
qihuajun
f5e8a89319 Fix slave usage disabled after Connection::close, set _slave to false instead of nulll
fixes #14165
close #14168
2017-07-12 15:03:48 +02:00
Carsten Brandt
c9347b0a57 Fixed ambiguous column error on indexBy with JOIN
fixes #13859
close #14431
2017-07-12 12:26:30 +02:00
Carsten Brandt
173108b5b0 Move getTablesUsedInFrom() from ActiveQuery to Query
enable this feature on the Query level

close #14431
2017-07-12 12:26:20 +02:00
Carsten Brandt
0559a95db9 Fixed ambiguous column error in BaseActiveRecord::refresh()
when the query adds a JOIN by default

fixes #13757
2017-07-11 11:47:35 +02:00
Robert Korulczyk
12eb936083 Enable heredoc_to_nowdoc rule in php-cs-fixer (#14419) 2017-07-10 13:18:52 +03:00
Robert Korulczyk
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
Carsten Brandt
a7d2aaffd5 mention usage of deleteAll() in AR unlinkAll
issue #14410
2017-07-09 00:39:22 +02:00
Carsten Brandt
e0dde88b87 Merge PR #14015 branch 'db-constraints' from sergeymakinen/yii2
Implement retrieving DBMS constraints

* db-constraints2: (21 commits)
  CHANGELOG for #14105
  added missing abstract methods to ConstraintFinderTrait
  avoid dependency of SqlTokenizer on sqlite implementation
  Mention an usage magic in descriptions
  Fix an unknown variable usage bug
  updated phpdoc
  make schema cache version a constant
  Have I fixed these phpdocs? Let’s see…
  Fixed phpdoc [skip ci]
  Mark not supported constraint retrieving methods
  Add PHPDoc
  Fix typo [skip ci]
  Rename DefaultConstraint to DefaultValueConstraint
  Fix imports
  Fix merging issues & CS
  Add Command tests
  Fix constraint tests
  Disable column comment test on old CUBRID
  Fix dropping unique/indexes
  Fix schema caching on commands
  ...
2017-07-07 22:57:58 +02:00
Carsten Brandt
53f380ca46 improved docs of Query::from()
fixes #14407
2017-07-07 13:30:19 +02:00
Alex
266bfc0419 fix phpDoc [skip ci] (#14394)
* fix phpDoc [skip ci]

* fix phpDoc [skip ci]
2017-07-06 00:39:36 +02:00
Sergey Makinen
57857c8a36 Merge pull request #1 from cebe/db-constraints
Changes to db constraints
2017-07-05 13:45:44 +03:00
Carsten Brandt
ef457c340d added missing abstract methods to ConstraintFinderTrait 2017-07-05 11:49:49 +02:00
Carsten Brandt
888f9f87b6 avoid dependency of SqlTokenizer on sqlite implementation 2017-07-05 11:40:06 +02:00
Sergey Makinen
ecf8984096 Mention an usage magic in descriptions 2017-07-04 19:03:00 +03:00
Sergey Makinen
f0c66c5a1d Fix an unknown variable usage bug 2017-07-04 19:01:36 +03:00
Carsten Brandt
95950d1a23 updated phpdoc 2017-07-04 14:52:05 +02:00
Carsten Brandt
3e330f8b87 make schema cache version a constant 2017-07-04 14:44:24 +02:00
Sergey Makinen
2b9f336dce Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints 2017-07-03 15:12:41 +03:00
Sergey Makinen
164d3c83e9 Have I fixed these phpdocs? Let’s see… 2017-07-03 15:10:48 +03:00
Alex
6aa0ed2026 Adjusted PHP 7 return types [skip ci] 2017-07-02 20:17:46 +03:00
Alexander Makarov
c91083fbe4 Fixed phpdoc [skip ci] 2017-06-30 00:13:04 +03:00
Sergey Makinen
237e7eda3a Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints 2017-06-28 21:42:55 +03:00
Sergey Makinen
452974cab3 Mark not supported constraint retrieving methods 2017-06-28 21:40:52 +03:00
Sergey Makinen
e0df642261 Add PHPDoc 2017-06-28 21:37:49 +03:00
Pavel Chaplygin
e38310546e Fixes #14334: Fixed \yii\db\QueryBuilder::buildNotCondition loses params when operand is \yii\db\Expression 2017-06-27 14:46:14 +03:00
Sergey Makinen
91521d53c1 Fix typo [skip ci] 2017-06-26 21:02:52 +03:00
Sergey Makinen
3de6f8e397 Rename DefaultConstraint to DefaultValueConstraint 2017-06-21 12:19:16 +03:00
Sergey Makinen
71a23cff50 Fix imports 2017-06-18 19:17:20 +03:00
Sergey Makinen
c8856ccd4e Fix merging issues & CS 2017-06-17 01:02:01 +03:00
Sergey Makinen
f820d2ca36 Merge branch 'master' into db-constraints 2017-06-16 16:52:43 +03:00
Robert Korulczyk
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
SilverFire - Dmitry Naumenko
cb53b2feec Fixes #14081: Added yii\caching\CacheInterface to make custom cache extensions adoption easier 2017-06-11 19:18:33 +03:00
Tigrov
2b7e8be1e8 Fixes #14192: Fixed wrong default null value for TIMESTAMP when using PostgreSQL 2017-06-11 18:48:15 +03:00
Thiago Talma
1d062100b6 Fixes #13787: Added yii\db\Migration::$maxSqlOutputLength that allows limiting number of characters for outputting SQL 2017-06-09 23:36:19 +03:00