rdbms: Add a deprecationLogger callback
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 5 Apr 2018 16:13:08 +0000 (12:13 -0400)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 5 Apr 2018 22:25:08 +0000 (22:25 +0000)
commit8dfeac7446391b4b1dada5429a48fdf4c3095a7b
treed278b4d6eaabe19321a2b810507e0f39b3967b36
parent0bcb82eb7d426102585ff57f5886fd1810fbbe96
rdbms: Add a deprecationLogger callback

Much like the existing errorLogger, but for logging deprecation
warnings.

The default in the RDBMS layer is to call trigger_error() with
E_USER_DEPRECATED. The default in MediaWiki (via MWLBFactory) is to log
to the 'deprecated' log group, much like wfDeprecated() does, although
unfortunately we can't effectively use that directly since we have no
idea of a proper $callerOffset to pass.

Change-Id: Id13625e249516e84d72b6310953bb338a90976da
includes/db/MWLBFactory.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/lbfactory/ILBFactory.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/rdbms/loadbalancer/ILoadBalancer.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
tests/phpunit/includes/Storage/RevisionStoreDbTest.php