43 Commits

Author SHA1 Message Date
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
473ead8e46 Optimize: simplified regexp (#19541) 2022-09-06 09:42:58 +03:00
22614a5b1f release version 2.0.46 2022-08-19 01:18:45 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
a87c02c712 Fix more types (#19333)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect

* Null types for Validator

* Several more null types

* One more

* Make AccessRule::$allow always a boolean

It doesn't have any special null handling, so it's safe to default to false

* Validator::$skipOnEmpty is always a boolean

* Catch all throwable from Widget::widget()

* Don't limit $previous args to \Exception

The actual \Exception allows $previous to be any throwable in PHP 7+

* Add Throwable catch block to Instance::get()

* Throwable cleanup

Comment changes only.

- Document \Throwable instead of \Exception wherever appropriate
- Removed redundant exception/error classes when \Throwable is referenced

* Yii::setlogger() accepts null

* ArrayHelper::removeValue() can remove any type of value

* Change default $allow value to false
2022-04-03 11:20:21 +02:00
4628b91e73 Fix types (#19332)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect
2022-03-30 18:40:10 +02:00
dab7a6c317 Update phpdoc 2020-07-20 02:44:55 +03:00
c87855b31c Fix #17573: Request::getUserIP() security fix for the case when Request::$trustedHost and Request::$ipHeaders are used 2019-10-03 14:56:20 +03:00
71c541773f PHPDoc fix 2018-01-23 13:17:25 +02:00
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
d604d80823 Fixes #14043: Added yii\helpers\IpHelper 2017-12-10 01:15:39 +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
1f26db9fb7 Applied code style fixes 2017-07-21 15:42:06 +03:00
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +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
59d3292399 [IpValidator] disable ipv6 checks (#13984)
* disable ipv6 checks

* remove empty line

* updated CHANGELOG.md
2017-04-18 19:06:31 +03:00
4eed7fb3da Fixes #13901: Fixed passing unused parameter to formatMessage() call in \yii\validators\IpValidator 2017-04-02 22:18:06 +03:00
Sam
06967f9018 Fixes #13254: Core validators no longer require Yii::$app to be set 2017-03-14 15:37:54 +03:00
a182ce57fc Fixes for issues found with Static Code Analysis with Php Inspections (EA Extended) (#13606)
* Php Inspections (EA Extended): language level migration fixes
* Php Inspections (EA Extended): instanceof a trait always return false
* Php Inspections (EA Extended): fixed preg_quote (/ is not escaped by default)
* Php Inspections (EA Extended): fixed a greedy regex
* Php Inspections (EA Extended): refereted instanceof self in a trait
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): more greedy regexes fixed
2017-02-22 17:07:52 +03:00
a132ee9a08 Fixed order or checks in IpValidator
Fixes #13198
2016-12-13 18:14:04 +02:00
f5beaf3edf Make validator getClientOptions public
This allows implementing custom client-side validation
without extending every validator.

Fixes #11163
close #13145
2016-12-08 01:30:36 +01:00
76e253e140 yii\validators\Validator - added separate methods for client-side validation options
Closes #11163
2016-12-05 22:33:49 +02:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
9d327baa8b coding style fixes 2016-05-26 11:19:32 +02:00
191f2a4943 fixed phpdoc type names 2016-02-25 20:24:32 +01:00
4bc7c51180 Removed unnecessary if 2016-02-16 14:13:43 +03:00
5c4e2d4372 Removed unnecessary parentheses 2016-02-16 14:08:43 +03:00
b6caff1952 Removed unused imports 2016-02-16 13:48:09 +03:00
9b5f6cb188 prepare for 2.0.7 release
- adjust version
- build classmap
- build phpdoc @property annotations
- build mime-type file
2016-02-14 15:45:55 +01:00
63eb47fb39 IpValidator - added examples to class PHPDoc 2016-02-09 09:45:32 +02:00
b804dbb98f IpValidator JS validation: wrongIp->message renamed 2016-02-08 19:44:44 +02:00
15f70ce615 Merge branch 'master' into ip-validator-message 2016-02-08 19:41:42 +02:00
f620f4de90 phpdoc fixes 2016-02-07 19:48:13 +01:00
93ed683502 IpValidator: use message property for default error
its better to use already existing `message` property for the default error message.
2016-02-07 19:30:29 +01:00
e41c2e3946 validators PHPdoc 2016-02-07 19:16:31 +01:00
8e68d2cd57 IpValidator::clientValidateAttribute - fixed passing of regular exressions to JS 2015-11-30 19:13:53 +02:00
f6477f312c IpValidator - added skipOnEmpty to JS options 2015-11-24 19:21:18 +02:00
8edc1e5109 IpValidator PHPDoc update: removed links to private methods 2015-11-05 20:31:01 +02:00
377a3952a1 IpValidator default error messages moved to init(), PHPDoc updates 2015-10-29 12:05:32 +02:00
32d1b9512c Added IpValidator description to core-validators ru,en guides. IpValidaor PHPDoc enhanced 2015-10-24 10:35:02 +03:00
5242765257 Fixes #3506: Added \yii\validators\IpValidator to perform validation of IP addresses and subnets 2015-10-22 14:21:31 +03:00