Commit Graph

55 Commits

Author SHA1 Message Date
Aleksander Machniak
0b38444c32 Fix removing/expiring redis/memcache records when using a key prefix 2025-04-18 14:41:25 +02:00
Aleksander Machniak
cfac0d6841 Remove apc cache driver 2025-04-06 15:52:06 +02:00
Dennis
edbfd1109b Add APCu cache driver (#9828) 2025-04-06 15:43:53 +02:00
Aleksander Machniak
f7d8852d17 Use str_starts_with() where applicable 2025-03-30 11:32:38 +02:00
Michael Voříšek
a30e0ad438 Infer file/line location in rcube::raise_error() from backtrace (#9422)
* \n\s+'file' => __FILE__,

* \n\s+'line' => __LINE__,

* 'line' => __LINE__, 'file' => __FILE__,

* 'file' => __FILE__, 'line' => __LINE__,

* rest

* more

* improve cs

* more cs

* revert rcube_utils::preg_error changes

* impl file/line from backtrace

* Revert "revert rcube_utils::preg_error changes"
2024-04-21 11:48:35 +02:00
Aleksander Machniak
20d9edce04 Code improvements 2024-03-31 19:22:56 +02:00
Aleksander Machniak
818945a8a2 Code improvements 2024-03-23 18:50:34 +01:00
Aleksander Machniak
a1f39f47b7 Fix phpstan errors 2024-02-10 19:20:04 +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
Aleksander Machniak
34500a4fa4 Fix "missing return statement" phpstan errors 2024-01-27 19:07:52 +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
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
a9167a0d2f Fix "static_lambda" CS (#9276) 2023-12-20 20:01:00 +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
37d75d96a3 Short array syntax, CS fixes 2020-11-27 19:51:33 +01:00
Aleksander Machniak
a5c2b4360c Fixes in context of undefined variables, and code style 2020-08-15 12:13:31 +02:00
Aleksander Machniak
d7d7ca046f Cache refactoring (#6312) (#6781) 2020-07-18 13:51:47 +02:00
Aleksander Machniak
4cc20eef72 Fix bug where cache keys could exceed length limit specified in db schema (#7004) 2019-11-10 08:56:11 +01:00
Aleksander Machniak
e7ebff56df PHPDoc fixes 2019-09-30 20:43:07 +02:00
Aleksander Machniak
57c67db029 Remove year(s) from copyright headers + some cleanup 2019-04-16 10:42:45 +02:00
Aleksander Machniak
981cd8726d Remove holes in cache index keys - makes the serialized representation shorter 2018-03-07 09:14:05 +01:00
Aleksander Machniak
d07b032bcd Refactor cache code with separate engine-specific classes 2018-03-03 17:28:40 +01:00
Edgaras Lukoševičius
e371469664 Add Redis as cache backend 2018-02-01 16:30:19 +02:00
Aleksander Machniak
a1f679adca Fixed redundancy in sql caching system and compatibility with Galera Cluster (#5439)
- Removed redundant 'created' column from cache and cache_shared tables
- Removed use of redundant data records
- Added missing primary keys (dictionary, cache, cache_shared tables)
2016-11-26 09:14:16 +01:00
Aleksander Machniak
e306328340 Fix storing "empty" values in rcube_cache/rcube_cache_shared (#5519) 2016-11-16 09:04:24 +01:00
Aleksander Machniak
7e90de4ef5 write_record() should return boolean value 2016-11-12 16:34:11 +01:00
Aleksander Machniak
4e0532808d Fix bug where it wasn't possible to store more that 2MB objects in memcache/apc (#5452)
Added memcache_max_allowed_packet and apc_max_allowed_packet settings
2016-10-16 11:19:30 +02:00
Aleksander Machniak
c1c0a0d815 Implemented rcube::sleep() method for disconnecting all external connection in long-running/sleeping scripts 2016-09-21 11:20:43 -04: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
9335f9cede Reset internal cache index in close() 2015-07-22 06:15:48 -04:00
Aleksander Machniak
a958748947 CS fixes 2015-06-07 15:26:33 +02:00
Aleksander Machniak
b120d42f5b Improved cache index changes detection (again) 2015-05-14 10:41:00 +02:00
Aleksander Machniak
044c1a0523 Simplified code + some CS fixes 2015-05-14 09:06:57 +02:00
Aleksander Machniak
652e11f82e Fix missing index update after write() call 2015-05-13 04:46:21 -04:00
Aleksander Machniak
b1e35a685c Performance: Improve changes detection, so we update index only if needed 2015-05-12 14:33:02 -04:00
Aleksander Machniak
11d5e7c100 Implemented memcache_debug also for session operations 2015-05-12 13:50:02 -04:00
Aleksander Machniak
9ed8584c3e Count memcache/apc debug lines 2015-05-12 04:14:39 -04:00
Aleksander Machniak
fff8e0f2ae Fix possible memcache/apc cache data consistency issues (#1490390)
And removed unused code
2015-05-12 09:09:13 +02:00
Aleksander Machniak
247b845a8e Workaround possible issue where some keys were ignored when deleting cached entries
by key name prefix and keys index is in inconsistent state (does not contain all keys)
2015-05-11 12:07:27 +02:00
Aleksander Machniak
44708ec647 Implemented memcache_debug and apc_debug options for cache operations tracking 2015-05-08 08:51:56 -04:00
Aleksander Machniak
2a31f6dbd7 Reset default db_max_allowed_packet, fix max packet size detection 2015-02-25 21:08:16 +01:00
Aleksander Machniak
81d4ff214e Fix setting max packet size for DB caches and check packet size also in shared cache 2015-02-19 10:24:09 +01:00
Aleksander Machniak
34a0902089 Use consistent column/table quoting in sql queries 2014-09-12 14:37:51 +02:00
Thomas Bruederli
5793309478 Limit cache data size to avoid database errors 2014-05-21 19:46:40 +02:00