This code is surprisingly little changed since I added the class in
November 2003, and needs some modernisation.
* Remove the "linked" option, unused since 1.21. Similarly, make the
"match-whole" option implied. This allows the regexes to be
simplified. Nothing will be broken, according to CodeSearch.
* Instead of ucfirst(), use the canonical month name from the language.
This will work with e.g. French which does not capitalise month names.
* Stop caching DateFormatter instances in APC. Caching was added
in 2005 when initialisation was being done on every request, but now
it is only needed when parsing a page with {{#formatdate}}, which is
rarely, and the constructor overhead is only 200µs after Language
object data initialisation. Instead, use an in-process cache via a
factory service.
* Add docs and extra tests.
* Remove todo note obsolete since 38 minutes after the original commit.
* Rename many variables.
* Use double-slash comments
* Don't store the Language object, just get arrays.
* Use mb_strtolower() instead of Language::lc() -- any customisation of
Language::lc() would break PCRE case-insensitive matching.
* Use named subpatterns instead of "keys"
* Remove the ISO1/ISO2 distinction, the only difference was linking.
* Use closure variables instead of temporary object members
Change-Id: I25fb1203dba2930724d7bc28ad0d51f59f88e1ea
MWNamespace::clearCaches() has been removed entirely, along with the
$rebuild parameter to MWNamespace::getCanonicalNamespaces(). The rest of
MWNamespace is deprecated.
Diff best viewed with -C1 so git notices that NamespaceInfo is a copy of
MWNamespace.
Depends-On: Icb7a4a2a5d19fb1f2453b4b57a5271196b0e316d
Depends-On: Ib3c914fc99394e4876ac9fe27317a1eafa2ff69e
Change-Id: I1a03d4e146f5414ae73c7d1a5807c873323e8abc
Simplify the code of jobs that do not care about titles and removes
the direct Title dependency from JobQueue. Remove getTitle() from
IJobSpecification itself. Move all the Job::factory calls into a
single JobQueue::factoryJob() method.
Depends-on: Iee78f4baeca0c0b4d6db073f2fbcc56855114ab0
Change-Id: I9c9d0726d4066bb0aa937665847ad6042ade13ec
Even if there is only one database, if a DB_REPLICA connection
reference is obtained and an attempt is made to write it then
it will still fail. This can make it easier to spot incorrect
database usage even in a simple vanilla developer environment.
Note that methods like ILoadBalancer::getConnectionRef() can
be used for local connections as well as foreign ones.
Change-Id: I5523daad1bdd64624d3e0dd41bfd8d078b1078b0
Introduce a new handler, similar to SyslogHandler, that will be used to
replace udp2log. The main feature of the handler is being able to vary
the 'application name' with each record's channel. This way the channel
can be reconstructed later, e.g. when writing to plaintext files.
See also an overview of the plan here:
https://phabricator.wikimedia.org/T205856#4957430
Bug: T126989
Change-Id: I0c040825b31cd70f197dc8c1d406a103dc0ed1d1
Move source code to includes/resourceloader to match
test case. This is part of ResourceLoader and not meant
to be used elsewhere.
Merge two similar test cases for getting blobs and fetching
messages which were doing the same thing.
Rewrite the test names to be a better reflection of the stories
they test, add comments for why, and re-order them to put related
tests together.
Move test-utilities to the bottom and make them actually private.
Change-Id: I7a437eebf3ba6a722e286dfe77c2f9fe49ad222f