Commit graph

21 commits

Author SHA1 Message Date
Juan Osorio
98b9a92912 objectcache: Adds support for TLS to RedisConnectionPool
Servers of the form 'tls://dnsname.com:123' and 'tls://0.0.0.0:123'

Bug: T237477
Change-Id: I9b93ed26449024e5583378c4d689e6adcb3cda95
2022-07-27 00:18:00 +00:00
Umherirrender
fe48e1223a cache: Fix various scalar and null types to match documentation
Adding float as type when INF is used as argument

Found by phan strict checks

Change-Id: I7e19cd0d9b09bf685e4e8387c900f303b669ad54
2022-03-14 17:36:04 +00:00
Siddharth VP
38295f9226 Fix typos in comments (N-R)
Change-Id: I2d1bdb7531ff5126114a391550c2615ea6e244b3
2022-01-09 23:14:44 +05:30
Reedy
7bf779524a Remove or replace usages of "sanity"
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
2021-11-19 23:19:42 +00:00
Umherirrender
cfcb3e4785 Use ::class for class name
This works also for non-existing classes,
because it is resolved on compile time

Change-Id: Id3132341856fb1eb20e8b494bb4acdfe3a394db6
2021-04-08 21:17:42 +02:00
Umherirrender
148e7e3940 Remove falsy check after new call
A new call can never return null or false

Change-Id: I792eb6c912828919c02bc5990f129d00accd0ab6
2020-06-18 19:41:01 +02:00
Reedy
40e522747c Fix some includes/libs PSR12.Properties.ConstantVisibility.NotFound
Change-Id: I92e2cbf39d2851d215e8be456e86bb99524dea5f
2020-05-16 02:32:53 +01:00
Daimona Eaytoy
41ee2f2c61 Upgrade phan to 0.9.1
Released just now.

Many old suppressions can now be removed. Enabling the issue for
undeclared variables is left to do later, given that there are
roughly 200 warning.

Change-Id: I99462a1e9232d6e75022912e2df82bc2038476ef
2020-01-25 10:53:26 +00:00
Aaron Schulz
8259668657 redis: Fix @throws tag in RedisConnectionPool
Change-Id: I11af27734720b72490bc095ec0e0cb1eb3262c62
2020-01-14 17:27:03 +00:00
Umherirrender
eb2373dcd1 Set visibility on php magic functions __destruct/sleep/wakeup/get/call
All the magic functions needs public visibility to be callable from php
internals like garbage collector

Change-Id: I1baf04bf8ff787da880d46e4a6daa77f5a6de73f
2019-12-05 18:52:55 +01:00
Umherirrender
baf063c7d5 Throw if Redis::SERIALIZER_IGBINARY is not defined
This makes it easier to find issues when redis was not compiled with
igbinary support.

Change-Id: Ic60a4c1c141f21a60cc6f4c773bd35e93290c2cd
2019-09-05 21:45:15 +02:00
Aaron Schulz
d8b952ae47 objectcache: clean up RedisBagOStuff and optimize changeTTLMulti()
Also fix some IDEA warnings in redis classes and make it easy for IDEs
to recognize the Redis (phpredis) class calls to RedisConnRef proxies.

Bug: T113916
Change-Id: If45a37da412ac37e8c07dc3d1053826aa0a62077
2019-07-18 01:46:49 +00:00
Aaron Schulz
81d611a808 Import PSR NullLogger instead of using absolute class references
Change-Id: Ie09170f51e203e0a4c9a780a53cc9f3829139c31
2019-07-13 23:35:52 -07:00
Reedy
c13fee87d4 Collapse some nested if statements
Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
2019-04-04 19:02:22 +00:00
Umherirrender
130ec2523d Fix PhanTypeMismatchDeclaredParam
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff

Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
2018-07-07 00:34:30 +00:00
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Gergő Tisza
a778ea1316 Ignore errors in RedisConnectionPool destructor
The destructor can be called on shutdown so any operation which
relies on another object or resource can fail. E.g. running
anything involving Redis (such as >>new Message('').''<<)
from shell.php and then exiting will result in a RedisException
since the PHP engine closes the Redis connection before destroying
the connection pool. Such errors can be safely ignored.

Change-Id: I38474a9dda89c82edbcb878facb4a97740e9189a
2017-08-14 14:28:41 +00:00
Aaron Schulz
82e2c924e4 Remove "@author Aaron Schulz" annotations
Bug: T139301
Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
2017-06-27 15:24:14 -07:00
Aaron Schulz
0d89c642bd Set a persistent connection ID for RedisConnectionPool
This re-uses the options hash as the ID so that re-used connections
do not clobber each others settings.

Change-Id: I17e5993ecdab1770259803e06956b85b9ebb2ba6
2017-04-21 17:17:09 -07:00
Yuriy Shnitkovskiy
73412f53fe Removed deprecated unused method in RedisConnectionPool.php
There are no usages of RedisConnectionPool::handleException() in core or extensions
so it can safely be removed.

Bug: T61113
Change-Id: Icd9ceb394625e9610f5071d13fbfd2760c464870
2017-01-10 14:51:44 +02:00
Aaron Schulz
10593ffaab Move RedisConnectionPool to /libs/redis
Change-Id: Ied4a85d7172ab76b90f6d9ce4d47a83c3fd7d111
2016-09-23 00:20:19 -07:00
Renamed from includes/clientpool/RedisConnectionPool.php (Browse further)