Dmitry Kulikov
1e0157f0ac
Fixes #7316 : Documentation for ActiveRelationTrait::inverseOf() [skip ci] ( #14892 )
7 years ago
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.
7 years ago
Carsten Brandt
8ff3756d55
remove loop over an array with one element
...
small optimization, fixes #12061
7 years ago
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".
7 years ago
Robert Korulczyk
1501c659ac
Add empty lines before return statements. ( #14682 ) [skip ci]
7 years ago
Robert Korulczyk
fe8a0a6a2e
Enable `no_useless_else` rule in php-cs-fixer ( #14420 )
7 years ago
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.
7 years ago
Carsten Brandt
c19b2f7dc8
release version 2.0.11
8 years ago
Brandon Kelly
5609e918de
Fixed some malformed @var tags ( #13468 ) [skip ci]
8 years ago
Klimov Paul
c17766181f
Added `QueryInterface::emulateExecution()`
...
Added `QueryInterface::emulateExecution()`, which allows preventing of
the actual query execution.
This allows to cancel `DataProvider` preventing search query execution
in case search model is invalid:
``` php
public function search($params)
{
$query = Item::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
$query->where('0=1');
$query->emulateExecution(); // No SQL execution will be done
return $dataProvider;
}
```
This also fix unecessary query in case of `via()` usage. See #12390 .
fixes #12390
fixes #6373
close #12708
8 years ago
Evgeniy Tkachenko
3a6fbad561
phpDoc: Fix example for ActiveRelationTrait::via() ( #13008 ) [skip ci]
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Carsten Brandt
217d50e4ff
improved PHPdoc and `@since` annotations
8 years ago
Laszlovl
0f640c7138
Make sure inverseOf relations are also populated during dynamic relational queries
...
Refs #6347
8 years ago
Carsten Brandt
52e23e0317
fix issue with composite key in combination with join
...
fixes #10201
fixes #9047
close #9895
9 years ago
Carsten Brandt
762b9207ea
Avoid some calls to `new $this->modelClass` in ActiveQuery
...
this fixes some cases of the problem described in #8639 and is fully BC.
Fixing other places may need BC breaks.
9 years ago
Alexander Makarov
1b3770fd21
Use === instead of == where possible
9 years ago
Alexander Makarov
67658cf57d
Replaced static with $this in phpdoc since current IDEs are finally able to handle it correctly
9 years ago
Klimov Paul
582b7606ac
Fixed `yii\db\ActiveRelationTrait::populateRelation()` fails when `link` refers to array string convertable object attribute
10 years ago
Klimov Paul
4503cae876
code style fix
10 years ago
Klimov Paul
c0fc4596e2
Fixed `yii\db\ActiveRelationTrait::populateRelation()` fails when `link` refers to string convertable object attribute, like `\MongoId`
10 years ago
Alexander Makarov
6481d13494
Optimized checks order in conditions
10 years ago
Alexander Makarov
02622b6fe4
phpdoc fixes and additions
10 years ago
Klimov Paul
15c8935db1
Fixed `yii\mongodb\ActiveRecord` unable to fetch 'hasMany' referred by array of `\MongoId`
10 years ago
Alexander Makarov
cba52e3c5e
Fixes #5382 : renamed "pivot table" to "junction table" since it's correct term to use
10 years ago
Carsten Brandt
222f9ddfad
added missing documentation about the NOT operator in Query
...
fixes #5147
10 years ago
Qiang Xue
aa8c013ebf
Fixes #3197 : Using `ActiveQuery::indexBy()` may cause relational AR queries to generate incorrect relational results
10 years ago
Carsten Brandt
f5f9364785
fixed test break
...
how did that manage to pass before...?
10 years ago
Carsten Brandt
d036d2f5bf
add support for array valued attr relations to unlink and link
10 years ago
Carsten Brandt
cc38e9c795
fixed issue with indexBy and array valued relations
10 years ago
Klimov Paul
1a07485e27
Added support for relation by array attributes
...
fixes #1249
10 years ago
Alexander Makarov
593b478f2b
Added extra callable typehints
10 years ago
Qiang Xue
1b4a9b62cd
Fixes #3568 : When the primary query sets `asArray`, it is not respected by the `via` relational query
10 years ago
Alexander Makarov
0c14f47f9a
Fixes #3793 : Changed inline autocomplete hints style to get more IDEs support
10 years ago
Carsten Brandt
2b593da08f
phpdoc issue
...
[ci skip]
11 years ago
Carsten Brandt
76d8e2b5b3
code style, fixes #3140
11 years ago
Thiago Talma
c1445871f4
Correction of many errors code inspection.
...
Adjustments code according to the standards.
Adding missing PHPDoc comment.
11 years ago
Thiago Talma
544243d517
Update ActiveRelationTrait.php
11 years ago
Qiang Xue
0b29c9607d
fixed broken API links [skip ci]
11 years ago
Qiang Xue
78136d4278
Fixes #2880 : filterByModels() should prefix key columns in a join query.
11 years ago
Carsten Brandt
bf3c75147d
reverted breaking PHPdoc codestyle changes
...
issue #2852
11 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
Qiang Xue
34cfb356e9
Fixes #2713 : using relations defined in behavior may throw exception in lazy loading.
11 years ago
AlexGx
eaaa5b1bb5
fix code style
11 years ago
Carsten Brandt
33d6acba25
Improved behavior support, fixes #2550
...
call hasMethod() instead of using method_exists
11 years ago
Jacob Morrison
614bffb01a
Fixed issue with preventing from clearing events and behaviors on clone
11 years ago
Carsten Brandt
1708a36d95
WIP merge ActiveRelation into ActiveQuery
...
allow extending only one class to add scopes, fixes #2146
TODO:
- [ ] adjust guide docs
- [ ] adjust README files of extensions
- [ ] finish work and fix test breaks
11 years ago
Qiang Xue
c92a260a3d
Fixes #2415 : Added support for inverse relations
11 years ago
Qiang Xue
0c38655217
psr-4 move
11 years ago
Qiang Xue
4f44bb2416
Fixes #1581 : Added `ActiveQuery::joinWith()` to support joining with relations
11 years ago