diff options
author | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2022-04-25 09:43:53 +0200 |
---|---|---|
committer | Krinkle <krinkle@fastmail.com> | 2022-05-15 20:52:17 +0000 |
commit | 2982625e7526681a00b4defbf2f4a9c56a37eb10 (patch) | |
tree | 1c8f57c154a192d35d77709add707050c70724e2 /tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php | |
parent | 2632892f2f1a4c91de4fee77651c92fe9cde67bd (diff) | |
download | mediawikicore-2982625e7526681a00b4defbf2f4a9c56a37eb10.tar.gz mediawikicore-2982625e7526681a00b4defbf2f4a9c56a37eb10.zip |
import: Soft-deprecate WikiRevision::getUserObj and related methods
Reasoning:
* Not all code needs an actual User object. And even if, most code
doesn't need it to be validated. That's expensive.
Let the users decide.
* setUserObj() is almost never called anyway. And the few places that
call it go the extra mile and create a User object just to please this
setter. We can avoid or at least postpone this.
* All callers already fall back to getUser() when there is no
getUserObj().
* For a while we try to replace the User class with much smaller
interfaces, whenever possible. This is a chance to remove of one more.
* A "user IP" is a concept that doesn't even exist in this code. The
setter writes to the same property as setUsername(). This makes it
very easy to use these methods wrong, and this indeed already happened
in some places.
Change-Id: I6687305a5be68e8a068f11482625a0a6bd9626f2
Diffstat (limited to 'tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php')
0 files changed, 0 insertions, 0 deletions