Commit Graph

56 Commits

Author SHA1 Message Date
Aleksander Machniak
66c1363fe8 Fix BC break intruduced in the last commit 2024-11-21 16:01:24 +01:00
Aleksander Machniak
58d28297a3 Code improvements, PHPDoc fixes 2024-03-29 16:18:20 +01:00
Aleksander Machniak
a1f39f47b7 Fix phpstan errors 2024-02-10 19:20:04 +01:00
Aleksander Machniak
966274d835 Fix phpstan errors 2024-02-09 21:11:50 +01:00
Michael Voříšek
d18406a8bd Fix binary operator spaces CS (#9330)
* align_single_space_minimal for assign

* assign operators grouping is not supported by PHP CS Fixer

* binary_operator_spaces = single_space

* fix anonymous function on single line

* align comments manually
2024-02-02 07:53:34 +01:00
Michael Voříšek
ff2d721680 Fix more CS whitespace (#9318)
* fix "no_useless_else" manually

* fix some "blank_line_before_statement"

* two manual changes

* Revert "fix some "blank_line_before_statement""

This reverts commit 2cc857c00e.

* fix some "blank_line_before_statement" using patched fixer (after "}" only)

* fix continue/break too
2024-01-25 19:17:29 +01:00
Michael Voříšek
4ee79b9e84 fix "explicit_string_variable" (#9315) 2024-01-22 08:05:59 +01:00
Michael Voříšek
b1a0067e5d Fix more CS (#9303)
* fix "class_attributes_separation"

* fix "ternary_to_null_coalescing"

* fix "no_extra_blank_lines"

* fix "php_unit_data_provider_name" - use snake_case

* fix remaining "function data_" manually

* move "php_unit_test_case_static_method_calls" to a better place in cnf

* fix 3.47.1 CS
2024-01-20 08:22:32 +01:00
Michael Voříšek
6a53a1d853 Fix CS (whitespace, visibility) (#9297)
* Fix "method_argument_space"

* Fix "control_structure_continuation_position"

* Fix "new_with_parentheses"

* Fix "blank_line_before_statement"

* Fix "visibility_required"

* Fix some "array_indentation"

* Fix some "array_indentation" - unify all "rcube::raise_error" calls

* rm useless eslint ignores and add rules counts

* sort eslint ignores

* fix eslint ignores grammar

* Revert "Fix "blank_line_before_statement""

* fix CS 3.46.0
2024-01-04 14:26:35 +01:00
Michael Voříšek
2643be3eaa Fix single quotes CS (#9283)
* Fix "single_quote"

* fix "escape_implicit_backslashes"

* fix typo from f363481c

* fix single quotes in JS

* fix some minor JS CS

* fix CS v3.45.0
2023-12-31 16:36:55 +01:00
Michael Voříšek
3e458fa5fd Refer native constants unambiguously (#9275)
* Fix "native_constant_invocation" CS

* "self_accessor" was fixed in 9269 PR

* "php_unit_strict" was fixed in 9268 PR
2023-12-23 17:02:19 +01:00
Michael Voříšek
e7d7e62146 Modernize more basic CS II (#9254)
* fix "integer_literal_case"

* fix "phpdoc_separation"

* fix "phpdoc_var_without_name"

* fix "operator_linebreak"

* fix "no_alias_language_construct_call"

* fix "list_syntax"

* fix "concat_space"

* fix "array_syntax"

* fix "binary_operator_spaces"

* fix "binary_operator_spaces" relaxed

* fix "phpdoc_types_order"

* fix "phpdoc_trim"

* fix "native_type_declaration_casing"

* fix "method_chaining_indentation"

* fix "phpdoc_no_package"

* fix "elseif"

* fix PHP CS Fixer config itself too

* fix "native_type_declaration_casing"
2023-12-17 13:14:45 +01:00
Michael Voříšek
ca8b17d191 Modernize more basic CS (#9258)
* fix "yoda_style"

* fix "is_null"

* rm useless rule ignores

* add full "PhpCsFixer:risky" ruleset

* fix "implode_call"

* fix "no_alias_functions"

* fix "array_push"

* fix "long_to_shorthand_operator"

* fix "ternary_to_elvis_operator"

* fix "logical_operators"

* fix "fopen_flags"

* rename "returns" phpdoc tags to "return"

* fix "php_unit_construct"

* fix "function_to_constant"

* fix "php_unit_data_provider_return_type"

* fix "php_unit_set_up_tear_down_visibility"

* some safe "string_length_to_empty"

* fix "phpdoc_align"

* fix "phpdoc_no_alias_tag"

* fix "trailing_comma_in_multiline"

---------

Co-authored-by: Aleksander Machniak <alec@alec.pl>
2023-12-17 09:51:11 +01:00
Michael Voříšek
a8707ae220 Fix and assert basic CS using CI (#9246)
* Assert CS using CI

* fix "single_blank_line_at_eof"

* fix "statement_indentation"

* fix "switch_case_semicolon_to_colon"

* fix "control_structure_braces"

* fix "statement_indentation"

* fix "no_whitespace_in_blank_line"

* fix "no_trailing_whitespace_in_comment"

* fix "no_trailing_whitespace"

* fix "single_space_around_construct"

* fix "spaces_inside_parentheses"

* fix "ternary_operator_spaces"

* fix "trim_array_spaces"

* fix "whitespace_after_comma_in_array"

* fix "cast_spaces"

* fix "unary_operator_spaces"

* fix "no_trailing_comma_in_singleline"

* fix "ordered_imports"

* fix "no_unused_imports"

* Check composer.json format

* fix CI job name

* file header comments are not phpdoc

* fix "phpdoc_indent"

* fix "braces_position"

* fix "phpdoc_types"

* fix "no_blank_lines_after_class_opening"

* fix "no_multiple_statements_per_line"

* fix "multiline_comment_opening_closing"

* fix "single_line_empty_body"

* fix "non_printable_character"

* fix "phpdoc_trim_consecutive_blank_line_separation"

* fix "include"

* fix "no_mixed_echo_print"

---------

Co-authored-by: Aleksander Machniak <alec@alec.pl>
2023-12-16 15:37:43 +01:00
Michael Voříšek
5425d1a84a Fix invalid phpdocs (#9252)
* fix missing return type in phpdoc
* fix "phpdoc_scalar"
* Fix phpdoc variable names typos
* fix wrong phpdoc tags
2023-12-10 16:20:50 +01:00
Aleksander Machniak
019801a430 Removed support for MS SQL Server and Oracle (#7854) 2022-09-11 11:01:03 +02:00
Aleksander Machniak
9c6979f17a Fix PHP8 warnings 2021-10-09 17:23:02 +02:00
Aleksander Machniak
f2688ba492 Use ?? operator where applicable 2021-09-21 19:12:06 +02:00
Aleksander Machniak
e2187b8f2d Fix various PHP 8.1 warnings 2021-08-27 16:52:54 +02:00
Aleksander Machniak
6ff862d7d8 Fix a couple of PHP8 warnings (#8175) 2021-08-25 18:57:50 +02:00
Aleksander Machniak
529c1a29a3 Fix invalid IMAP SEARCH command in some rare case on messages cache synchronization (#7895) 2021-02-20 09:36:47 +01:00
johndoh
cfd4fa170f Fix a few PHP notices (#7791) 2020-12-19 19:36:58 +01:00
Aleksander Machniak
7e5301f636 CS fixes, short array syntax, PHP8 fixes, tests 2020-11-28 18:52:36 +01:00
Aleksander Machniak
545a1569f1 Steps -> Actions refactoring (#7688)
* Move action handling code to rcmail class
* Add rcmail_action class
* Add action aliases
* Get rid of $OUTPUT global
* Move some methods from rcmail to rcmail_action
* PHP8 compat. fixes
* Add framework for testing actions
* Fix obvious code mistakes
2020-11-01 11:25:38 +01:00
Aleksander Machniak
a5c2b4360c Fixes in context of undefined variables, and code style 2020-08-15 12:13:31 +02:00
Aleksander Machniak
1613f3ab4c INSERT OR REPLACE implementation (#6771)
For now with support in postgres and mysql databases.
For now used in rcube_cache, rcube_imap_cache and enigma plugin
2020-01-19 18:43:48 +01:00
Aleksander Machniak
e7ebff56df PHPDoc fixes 2019-09-30 20:43:07 +02:00
Aleksander Machniak
4ef87fe856 Support $HasAttachment/$HasNoAttachment keywords (#6201)
We use these only to display the attachment icon on the messages list.
2019-05-25 09:37:45 +02:00
Aleksander Machniak
57c67db029 Remove year(s) from copyright headers + some cleanup 2019-04-16 10:42:45 +02:00
Aleksander Machniak
b0c83111de Fix rcube_imap_cache in mode set to MESSAGE only 2018-12-13 16:23:28 +00:00
ka7
9a35768c26 spelling fixes (#5690) 2017-03-12 12:14:19 +01:00
Aleksander Machniak
c478536741 Make SQL selects less expensive in memory for some cases where we fetch big data chunks 2016-06-10 18:45:28 +02:00
Aleksander Machniak
85f4209074 Code improvements: CS fixes, improved internal cache cleanup on folder selection, removed redundant cache 2015-10-02 10:56:35 +02:00
Aleksander Machniak
a958748947 CS fixes 2015-06-07 15:26:33 +02:00
Aleksander Machniak
9d4d48ad4c Remove debug code 2014-11-02 17:50:32 +01:00
Aleksander Machniak
96a7f6cc1b CS fixes 2014-11-02 10:57:33 +01:00
Aleksander Machniak
2268aa676d Fix handling of uuencoded messages if messages_cache is enabled (#1490108) 2014-10-22 19:02:23 +02:00
Aleksander Machniak
dd6f784ec4 Fix syntax error 2014-09-22 10:31:15 +02:00
Aleksander Machniak
e7af012bc2 Fix binary operator use for Oracle 2014-09-18 15:32:15 +02:00
Aleksander Machniak
34a0902089 Use consistent column/table quoting in sql queries 2014-09-12 14:37:51 +02:00
Aleksander Machniak
0ca75d4880 Fix messages index cache update under some conditions (e.g. proxy) (#1489756) 2014-04-11 19:28:52 +02:00
Aleksander Machniak
5f31429de5 Fix preparation of message object before saving into the cache.
The bug cased e.g. displaying HTML content as plain text for messages
with Content-Type: text/html.
2013-11-28 15:20:58 +01:00
Aleksander Machniak
64c924ea06 Fix regression where wrong set of message identifiers was used
in sql query that was supposed to fetch list of messages from cache
2013-10-15 09:22:09 +02:00
Aleksander Machniak
aceb0149b8 Add possibility to programmatically set cache mode, so it is possible
to cache only indexes/threads but not messages
2013-10-07 09:26:37 +02:00
Aleksander Machniak
21601b4deb Make cached message size limit configurable - messages_cache_threshold (#1489317) 2013-09-06 18:21:09 +02:00
Aleksander Machniak
b6be23ac4b Fix issue where too big message data was stored in cache causing sql errors (#1489316) 2013-09-03 15:16:17 +02:00
Aleksander Machniak
12f1190a62 Fix typos in sql queries of garbage collector (expired -> expires) 2013-06-13 13:04:20 +02:00
Aleksander Machniak
603e048f73 Fix thread cache syncronization/validation (#1489028) 2013-06-13 11:07:35 +02:00
Aleksander Machniak
60b6d7c389 Fix database cache expunge issues (#1489149) - added 'expires' column 2013-06-09 11:07:46 +02:00
Aleksander Machniak
be4b5c2fe5 Fix "duplicate entry" errors on inserts to imap cache tables (#1489146) 2013-06-05 15:20:53 +02:00