Commit Graph

74 Commits

Author SHA1 Message Date
RodrigoDornelles
e1e7ea37d5 use getTargetClass in function checkTargetAttributeExistence
This interesting change, to be able to change getTargetClass when necessary when extending this class.
2021-06-15 13:07:53 -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
Brandon Kelly
472600ee3f Fix #18102: Use “primary”/“replica” terminology instead of “master”/“slave” 2020-06-14 00:12:10 +03:00
Ondřej Vašíček
0b24d92843 Add docs about changes in the yii\validators\ExistValidator mentioned in #8092 (#16136) [skip ci] 2018-04-23 00:38:17 +03:00
Elvira Sheina
5fb3fc2b5f Fix ExistValidator is broken for NOSQL (#15726) 2018-02-23 14:58:07 +05:00
Elvira Sheina
23b5fa4391 Fix ExistValidator with targetRelation ignores filter (#15692) 2018-02-20 20:07:55 +05:00
SilverFire - Dmitry Naumenko
22832b7c49 release version 2.0.14 2018-02-19 00:27:09 +02:00
rossoneri
63ffae028e Fixes #14254: add an option to specify whether validator is forced to always use master DB for yii\validators\UniqueValidator and yii\validators\ExistValidator 2018-02-15 02:12:54 +03:00
Alexander Makarov
9e566d7021 #8092: Enhance exists validator for relations (#15647) 2018-02-13 15:38:35 +03:00
Elvira Sheina
a18ee838fd Fixes #8092: ExistValidator for relations 2018-02-13 01:12:05 +03:00
Klimov Paul
71c541773f PHPDoc fix 2018-01-23 13:17:25 +02:00
Klimov Paul
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
Vladimir Khramtsov
b44bbd6a13 Fix code issues (#15435)
* Fix some scrunitizer warnings

* Remove obsolete require

* Fix codestyle
2018-01-01 16:21:37 +03: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
Klimov Paul
2466d397ae Fixed yii\validators\ExistValidator and yii\validators\UniqueValidator throw exception in case they are set for yii\db\ActiveRecord with $targetClass pointing to NOSQL ActiveRecord 2017-07-25 16:17:37 +03:00
Robert Korulczyk
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
Alexander Makarov
d4c15c36d0 Fixes #14304: Fixed yii\validators\UniqueValidator and yii\validators\ExistValidator to skip prefixes in case expressions are used 2017-06-27 00:02:47 +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
bscheshirwork
921147dca5 Fixes #14161, #14150: fixed primary table aliasing (include case manual set alias) in validators 2017-05-16 13:24:49 +03:00
Alexander Makarov
8a087c8537 #14150: Added {{ and }} to getTablesUsedInFrom() output 2017-05-12 15:55:37 +03:00
Alexander Makarov
96382454b1 Additional refactoring as suggested by @dynasource 2017-05-10 13:08:29 +03:00
Alexander Makarov
23cc4bf4fe Further changes for unique and exist validators
- Combined methods for getting names and aliases of from tables
- Normalized names and aliases
- Added MSSQL syntax
- Added support for spaces in aliases and table names
2017-05-10 00:35:40 +03:00
Alexander Makarov
37fc6c5afb Alternative names 2017-04-26 15:36:36 +03:00
Alexander Makarov
99a0289221 Applied disambiguation to ExistValidator as well 2017-04-26 01:52:57 +03:00
Nikolay Oleynikov
53d824167c Fix a typo in a comment section (#13569) 2017-02-14 10:50:39 +01:00
Elvira Sheina
1ee91fe4ab Fix BC in Exist Validator (#13533)
Related to #13318 and #13475

fixes #13533
close #13534
2017-02-08 09:13:40 +01:00
Carsten Brandt
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
Alexander Makarov
3f4771b1de Phpdoc adjustments [skip ci] 2017-01-23 12:42:35 +03:00
Elvira Sheina
b82caa97e8 Fixes #7820: Add or relation for targetAttribute in yii\validators\UniqueValidator 2017-01-22 19:45:18 +03:00
Robert Korulczyk
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
Alexander Makarov
70cfdfd289 Fixed test break 2015-10-10 01:16:16 +03:00
Alexander Makarov
1b3770fd21 Use === instead of == where possible 2015-10-10 01:04:35 +03:00
Alexander Mohorev
68c30c1034 Replace aliases of functions 2015-06-29 22:59:22 +03:00
Nikola Kovacs
f11bdfa2a7 Grammar fix: followings -> following 2015-04-21 15:08:16 +02:00
Qiang Xue
d13d274d05 renamed $object to $model 2014-10-31 14:56:59 -04:00
Qiang Xue
b9b6fbc94b Fixes #5039: UniqueValidator and ExistValidator did not respect query conditions added by default scope 2014-09-15 21:19:55 -04:00
Carsten Brandt
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
Alexander Makarov
0c14f47f9a Fixes #3793: Changed inline autocomplete hints style to get more IDEs support 2014-06-20 17:40:00 +04:00
Qiang Xue
01e5ffdceb guide WIP [skip ci] 2014-06-05 22:40:37 -04:00
Alexander Kochetov
49f8d45d8b ExistValidator final refactoring. allowArray checking also added to validateValue method. 2014-05-14 21:18:32 +04:00
Alexander Kochetov
14ec7e21bd ExistValidator::validateValue() fixed 2014-05-14 17:35:24 +04:00
Alexander Kochetov
68f65a9f7a ExistValidator bugfix 2014-05-14 13:37:20 +04:00
Alexander Kochetov
3e94b24885 ExistValidator refactoring 2014-05-13 16:10:08 +04:00
Alexander Kochetov
252795ec94 allowArray introduced. 2014-05-12 17:34:36 +04:00
Alexander Kochetov
ccaa052d57 ExistValidator count logic fix 2014-05-09 18:57:00 +04:00
Alexander Kochetov
fe5376ff7d Refactoring 2014-05-08 20:16:48 +04:00
Alexander Kochetov
8188cc78d3 Refactoring 2014-05-08 20:07:27 +04:00
Alexander Kochetov
3eb257c302 Improve exist validator to support array attributes 2014-05-08 19:47:00 +04:00