Commit graph

9 commits

Author SHA1 Message Date
Aaron Schulz
ea10f22dff Disallow empty paths in LockManager
Fix broken FileBackend test that had paths normalizing to null.

Change-Id: I8a7e88ae44118cc9578e1b306a5a008ccefc23af
2018-07-26 11:02:43 -07: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
Kunal Mehta
251a0b97e5 Treat phpdbg as run from the command line when checking PHP_SAPI
phpdbg is a gdb-style debugger for PHP that is run from the command
line. However, it has a different PHP_SAPI value, so it was impossible
to run maintenance scripts with it (until now).

To avoid having to check both PHP_SAPI values in a bunch of places,
introduce wfIsCLI() to easily check whether running from the
command-line or not.

We're (CI team) interested in generating code coverage with phpdbg
instead of xdebug, hence this patch.

Bug: T184043
Change-Id: Id1f994ca146d7858cd8bb6ab6cdbb7718ff524fb
2018-01-03 23:00:37 -08:00
Aaron Schulz
82e2c924e4 Remove "@author Aaron Schulz" annotations
Bug: T139301
Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
2017-06-27 15:24:14 -07:00
Amir Sarabadani
5fd5727601 Fix small typos in includes/lib/lockManager/LockManager.php
Change-Id: Ib3e3c6e01dc1ad4604b1cf6c95467f25444f38a2
2016-12-14 12:33:12 +03:30
Kunal Mehta
090d0267da Use wikimedia/wait-condition-loop
Since the WaitConditionLoop class was first introduced in 1.28 (current
master), no back-compat alias is added.

Bug: T146256
Depends-On: Ia84774d83da79fea1e167fe065c69549981f753b
Change-Id: Ibd4f15c87105b8caccbd1f661b74b6efa012b77f
2016-10-01 00:25:43 -07:00
Aaron Schulz
a2dd3480da Cleanup MemcLockManager and move it to /libs
* Remove wf* function and ObjectCache dependencies.
* Use the base class session field.
* Lower physical lock structure TTL and move it to the base
  class as a constant.
* Resolve TODO about acquiring mixed lock types in one pass.
* Only mark servers down for 30 seconds in case of long-running
  scripts.

Change-Id: Icd4be407e599524cc620975d27e85666d2532b95
2016-09-30 06:33:32 -07:00
Aaron Schulz
49e0691b71 Move RedisLockManager to /libs
Change-Id: Ia476f117243cf0f6984e373d460b24db18584704
2016-09-23 00:30:47 -07:00
Aaron Schulz
25a1651aad Make LockManager use StatusValue and move classes to /libs
Change-Id: Ifa41fc2939f3515d4a056746b0fcbff79786d25b
2016-09-19 04:34:28 +00:00
Renamed from includes/filebackend/lockmanager/LockManager.php (Browse further)