Commit graph

9 commits

Author SHA1 Message Date
Tim Starling
daee97fb6b Reduce memory usage on ServiceContainer destruction
The closures in ServiceContainer::$serviceInstantiators are circular
references which prevent destruction of the object. So, delete these
when destroy() is called. Also delete the service instances for good
measure.

Change-Id: Ic8487cb533a09a8fcc69eba4f5d1bbb71558ae08
2018-09-03 16:36:32 +00:00
daniel
b57fdd5d70 [MCR] Allow extensions to manipulate service instances
Bug: T195212
Change-Id: I93c53328e3b4a5cecc934707dd4786a39bce6553
2018-06-15 16:06:38 +02:00
Timo Tijhof
9f02f548ea services: Update comment mentioning non-existent method
Follows-up bca436db92.

Change-Id: I1e356d30912fa47799656ee8210a5fdd3d008edb
2018-06-15 13:19:13 +01:00
Timo Tijhof
935ccd6335 services: Add linebreak between regular and spread parameter
Follows-up 1e680456b4, which removed some array_merge/call_user_func
abstraction, but improved readability a lot, but the absence of a
line break makes it slightly less obvious how and what parameters
are being passed. It's usually either comma-separated segments on
the same line that as the open parenthesis, or one expression per
line.

Change-Id: Ic388cf41ed3ed60d9b47c04392242e40cdcb69b0
2018-06-15 00:22:52 +01:00
Max Semenik
1e680456b4 Get rid of call_user_func(_array)(), part 3
Also cleaned up nearby code in a couple places.

Change-Id: Ibf44ee7c0ceb739d7e79406e4ff39303c316e285
2018-06-10 02:21:24 +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
Umherirrender
3f1a52805e Use short type bool/int in param documentation
Enable the phpcs sniffs for this and used phpcbf

Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925
2017-08-20 13:20:59 +02:00
Paladox
54c56da85a Fix php code style
Preparation change for updating mediawiki code sniffer to 0.8.0

Change-Id: Ib0b3fe4afea9096ffa3a1347b4f7e07d3398b0b2
2017-05-05 12:03:54 +00:00
Reedy
a0fa3e4dc0 Rename includes/Services to includes/services for consistency
Change-Id: I900fab26a7cf5a339233f55c31168f8c2963bc8c
2016-09-23 00:08:15 +00:00
Renamed from includes/Services/ServiceContainer.php (Browse further)