Commit graph

11 commits

Author SHA1 Message Date
Kunal Mehta
79de8fd02f Use wikimedia/object-factory 1.0.0
Deprecate the unnamespaced version and move it to includes/compat.

Bug: T147167
Depends-On: I39c805bfb98b32f32f3d0dc1eee9e823afe1c21a
Change-Id: I3780c7adf51683f3f7adb35a88f9a25a0a2e2530
2018-02-04 12:52:44 -08:00
Bryan Davis
aaf1e17088 Remove "@author Bryan Davis" and "Brad Jorsch" annotations
Undo traces of a practice we carried over from past projects and
existing examples that is neither universal nor actively encouraged in
the MediaWiki codebase.

Bug: T139301
Change-Id: I5c9c89b72a45a44aa4264a5e57b003c1a86cdf6e
Co-Authored-By: Brad Jorsch <bjorsch@wikimedia.org>
2017-06-26 15:25:46 -06:00
umherirrender
54c1e18eec Remove various double empty newlines
The double empty newline is not needed between functions, variable or at
end of file

Change-Id: Ib866a95084c4601ac150a2b402cfa184ebc18afa
2015-12-27 18:55:12 +00:00
Gergő Tisza
c3ea1b85b4 Move PSR-3 support check right after autoloader setup
This ensures that, in case "composer install" has not been run,
the user will see the error message about setting up dependencies
(as opposed a plain "Class not found" error because some other
dependency was used first).

Change-Id: Ib6026123770d21cc9f8960a1de361c8178b1b044
2015-12-13 22:18:07 -08:00
Reedy
56634389cc Fixup MW for HHVM Repo Authorative mode
https://github.com/facebook/hhvm/issues/5834
https://github.com/facebook/hhvm/issues/5833

Change-Id: I138ffa5df874c5660897dc7feab36adef9f32aea
2015-11-30 17:25:47 +00:00
Timo Tijhof
41b5aa343f Remove redundant escaping for namespace references in documentation
Follows-up b264cee. No longer needed as of 0c9e9cc.

Change-Id: I31745f55885eeec2bb8cf2c9ffe9e98242cd5baa
2015-11-23 23:02:32 +00:00
Bryan Davis
701b9a0dc8 LoggerFactory: Only check for Psr\Log\LoggerInterface once
LoggerFactory::getInstance() will be called many times during the course
of handling a typical MediaWiki request. The interface_exists() guard
condition it uses is an attempt to provide an informative error message
when Composer managed libraries are not installed. This check is only
needed on the first invocation of getInstance() to be effective. Using
an additional boolean to guard the interface_exists() call will allow
the PHP runtime to avoid a potentially expensive (at least compared to
a static boolean comparison) function call.

This is the sort of thing that smells of premature optimization, but its
addition is in fact informed by examination of performance reports from
the Wikimedia production environment.

Bug: T115729
Change-Id: I437bcb5326b06145081f2b86f6c4d0c8dc1a318c
2015-10-26 12:57:28 -06:00
Bryan Davis
b264cee6d4 Fix namespaced class references for Doxygen
Doxygen doesn't quite grok PHP's use of the reverse solidus (backslash)
character as a namespace separator. The C++ based parser it uses needs
them to be escaped in comments just as if they were being used in
a literal string context in PHP.

Change-Id: I9aff9dd0fb74a95039da1091c2f247cf71fd085a
2015-10-08 11:10:33 -06:00
Florian
760c1a16b6 Fix doxygen warnings for missing commands
Follow up: I14c4d7521f81ddd8c7b56facc1f0ae34f86b2299

Change-Id: I8c69f52da577b3baecc622e3fab16f7c7b3db1f5
2015-07-20 20:05:02 +02:00
Bryan Davis
19c8f103c6 phpdoc: make references to \MediaWiki\Logger\Spi fully qualified
Change-Id: I4a5dbc3894ea175053e1238e7fc5de4c4cf085ca
2015-04-10 09:58:43 -06:00
Bryan Davis
1195e11a8a Move MWLogger classes to MediaWiki\Logger namespace
Move the MWLogger PSR-3 logging related classes into the
MediaWiki\Logger namespace. Create shim classes to ease migration of
existing MWLoggerFactory usage to the namespaced classes.

Bug: T93406
Change-Id: I359cc81fbd2dcf8937742311dcc7d3dee08747b0
2015-04-03 11:32:24 -07:00
Renamed from includes/debug/logger/Factory.php (Browse further)