49 Commits

Author SHA1 Message Date
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
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
13f27e4d92 Fix #18817: Use paragonie/random_compat for random bytes and int generation 2021-08-09 10:25:36 +03:00
4e2045c040 release version 2.0.41 2021-03-04 00:51:35 +03:00
ccb14ff667 release version 2.0.39 2020-11-10 13:58:35 +03:00
fbadefecae Fixed reference to mailer application component in docs
The application component is named "mailer" by default, not "mail".
2019-02-22 14:49:57 +01:00
f2d2393de6 DocBlock fix for \yii\mail\MessageInterface (#15671) [skip ci] 2018-02-19 14:24:55 +03: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
69673c0c94 Rename Object -> BaseObject for PHP 7.2 compatibility
issue #7936
2017-07-19 10:51:46 +02: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
4b9e48b8dc improved docs: link term "path alias" to the guide 2017-06-02 10:45:20 +02:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
32f4dc8997 Fixes #5385: links created from classes to corresponding guide articles (#12920) 2016-11-04 18:55:14 +03:00
c584acd296 Reverted accidental change 2016-07-29 00:57:10 +03:00
edc62172fa Fixes #12037: Fixed 2.0.7 regression in memcahe/memcached cache backend 2016-07-28 23:35:31 +03:00
d804950d09 Update phpDoc BaseMailer::compose() 2016-02-20 18:44:29 +03:00
8f26e93b20 Update phpDoc MailerInterface::compose() 2016-02-20 16:58:13 +03:00
5c4e2d4372 Removed unnecessary parentheses 2016-02-16 14:08:43 +03:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
67658cf57d Replaced static with $this in phpdoc since current IDEs are finally able to handle it correctly 2015-05-31 13:39:30 +03:00
05cc9ae405 improved HTML to Text fallback in BaseMailer
fixes #6748
2015-01-10 15:07:12 +01:00
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
a2a6028253 Fixes #3992
Fixes #4147
2014-07-01 14:45:44 -04:00
eb60aaecdf Update BaseMessage.php
See 0ff0f9d32e

https://github.com/yiisoft/yii2/issues/4071
2014-06-29 04:41:13 +04:00
2457e24795 Fixes #4071: mail component renamed to mailer, yii\log\EmailTarget::$mail renamed to yii\log\EmailTarget::$mailer 2014-06-26 18:28:28 +04:00
bc00449c5f removed wrong use statement for MailEvent 2014-06-25 23:12:11 +02:00
775141ab96 move mail event class
fixes #3899
2014-06-25 20:19:17 +02:00
313139968e Update BaseMailer.php 2014-05-02 18:34:13 +03:00
cdadc01ba2 Update BaseMailer.php 2014-05-02 17:33:25 +03:00
a324b26c7f BaseMailer: strip <style> content from TextBody fix
If ```$htmlLayout``` contains <style> tags with CSS rules,
strip_tags here: https://github.com/yiisoft/yii2/blob/master/framework/mail/BaseMailer.php#L189
won't clean those CSS rules.

Actual html: 
```html
<html>
    <head>
        <style>
            .text-secondary {color: #93959A;}
            [...]
            [Other CSS rules]
            [...]
        </style>
    </head>
    <body>
        <div>Some content</div>
    </body>
</html>
```

Will look this way in TEXT version of Email: 
```
.text-secondary {color: #93959A;}
[...]
[Other CSS rules]
[...]
Some content
```

--------------

If TEXT version of Email differs drastically from visible content of HTML version,
it can be result that some penalty points will apply to such mails: 
http://wiki.apache.org/spamassassin/Rules/MPART_ALT_DIFF_COUNT


Since it's default behaviour for both yii2-app-advanced and yii2-app-basic (where stripped from tags html used for TextBody),
I believe people will stumble in this for sure, without even knowing that their emails can be penalized.


You can reproduce it by placing CSS styles in email view or layout
and test it here: http://www.mail-tester.com/ (SpamAssassin section).
2014-05-02 17:01:03 +03:00
3437c571a1 phpdoc controller did not find some setters
fixes #3255
2014-04-26 13:03:08 +02:00
3fdcf11f24 updated phpdoc 2014-04-09 18:51:45 +02:00
f2b20d99d5 Merge branch 'master' into refactor-errorhandler
* master:
  Fixes #2912: Relative view files will be looked for under the directory containing the view currently being rendered
  app end improvement.
  improvement of Application::end() handling.
  typo fix.
  Fixes #2910: Added `Application::end()`

Conflicts:
	framework/base/Application.php
2014-03-30 00:27:51 +01:00
c93231e26b improved session error handling
fixes #1946
2014-03-29 23:54:26 +01:00
92bd71cd84 Fixes #2912: Relative view files will be looked for under the directory containing the view currently being rendered 2014-03-28 21:54:32 -04:00
ccd16e184f added mailer to the message when using compose
more expected behavior when chaining methods using
Mailser::compose()

fixes #2723
2014-03-25 15:05:34 +01:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
e2aacad8aa Added links to PHP.net to apidoc 2014-03-07 19:41:43 +01:00
eaaa5b1bb5 fix code style 2014-03-04 06:12:30 +02:00
4e6aa21198 The directory holding email templates is renamed from mails to mail 2014-02-12 15:01:01 -05:00
c9eca1d596 Fixed refactoring 2014-01-25 13:35:27 +04:00
0dfc8b1f7c refactored BaseMailer about message file name generation. 2014-01-24 11:48:20 -05:00
349f2c9e32 phpdoc fixes, unused variable 2014-01-12 23:40:21 +04:00
0c38655217 psr-4 move 2014-01-10 21:41:43 -05:00