logging: Document LSP violations in RCDatabaseLogEntry

- RCDatabaseLogEntry::newFromId currently doesn't work, because the parent has
  'logging' fields hardcoded. Make the failure explicit with a LogicException to
  avoid sneaky failures and/or DB query errors. There's no need to
  implement the missing part, given the lack of a use case.
- Same for ::getSelectQueryData

Change-Id: I748733da1a34f9af1cd431c933809c23dc37a3d6
This commit is contained in:
Daimona Eaytoy 2020-02-22 14:26:23 +01:00 committed by Umherirrender
parent a061a61bb8
commit 27346b8cba

View file

@ -23,6 +23,8 @@
* @since 1.19
*/
use Wikimedia\Rdbms\IDatabase;
/**
* A subclass of DatabaseLogEntry for objects constructed from entries in the
* recentchanges table (rather than the logging table).
@ -31,6 +33,16 @@
*/
class RCDatabaseLogEntry extends DatabaseLogEntry {
public static function newFromId( $id, IDatabase $db ) {
// Make the LSP violation explicit to prevent sneaky failures
throw new LogicException( 'Not implemented!' );
}
public static function getSelectQueryData() {
// Make the LSP violation explicit to prevent sneaky failures
throw new LogicException( 'Not implemented!' );
}
public function getId() {
return $this->row->rc_logid;
}