wiki.techinc.nl/tests/phpunit/includes
Bartosz Dziewoński c045fa0291 Replace gettype() with get_debug_type() in exception messages
get_debug_type() does the same thing but better (spelling type names
in the same way as in type declarations, and including names of
object classes and resource types). It was added in PHP 8, but the
symfony/polyfill-php80 package provides it while we still support 7.4.

Also remove uses of get_class() and get_resource_type() where the new
method already provides the same information.

For reference:
https://www.php.net/manual/en/function.get-debug-type.php
https://www.php.net/manual/en/function.gettype.php

To keep this safe and simple to review, I'm only changing cases where
the type is immediately used in an exception message.

Change-Id: I325efcddcb58be63b1592b9c20ac0845393c15e2
2024-07-31 19:24:39 +02:00
..
actions tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
api Replace gettype() with get_debug_type() in exception messages 2024-07-31 19:24:39 +02:00
auth Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
block Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
cache Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
Category tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
changes Merge "RecentChange: Replace use of legacy error arrays" 2024-07-10 11:40:11 +00:00
changetags Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
collation
CommentStore Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
composer
config
content content: Widen @covers tags in phpunit tests 2024-07-21 21:03:10 +00:00
db Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
debug Use MainConfigNames constants in tests where possible 2024-07-10 10:11:22 +00:00
deferred Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
diff diff: migrate TextSlotDiffRenderer to use StatsFactory 2024-06-28 19:29:31 +00:00
editpage Hard deprecate public access to EditPage::internalAttemptSave() 2024-07-21 15:03:54 +00:00
exception Use MainConfigNames constants in tests where possible 2024-07-10 10:11:22 +00:00
export Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
ExternalLinks
externalstore
filebackend Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
filerepo Use $this->setRequest and $this->setGroupPermissions in PHPUnit tests 2024-07-11 18:38:00 +00:00
GlobalFunctions Use constants provided by MainConfigNames for config names 2024-05-18 01:26:46 +08:00
HookContainer
Html Add "implements Stringable" to every class with "function __toString()" 2024-06-13 00:23:39 +00:00
http Use StatusValue::getMessages() instead of deprecated methods 2024-05-18 14:45:54 +00:00
import ImportLinkCacheIntegrationTest: Set named user in context 2024-06-27 09:02:56 +02:00
installer Add tests for WebInstaller::getAcceptLanguage 2024-07-02 18:57:33 +00:00
interwiki tests: Avoid usage of deprecated setContentLang() 2024-07-19 17:28:39 +02:00
jobqueue Stop using LBFactory in UserEditCountInitJobTest 2024-07-18 15:20:12 +02:00
language Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
languages [i18n] Change the names of the Arabic months 2024-07-18 18:44:26 +00:00
libs Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
linkeddata tests: Use namespaced classes (@covers) 2024-06-14 00:15:40 +02:00
linker Drop duplicate test cases and @dataProviders from tests 2024-07-19 10:18:31 +00:00
logging logging: Hard-deprecate LogFormatter::newFromRow/newFromEntry 2024-07-29 20:29:25 +00:00
mail
media tests: Use LanguageFactory in FormatMetadataTest 2024-07-20 22:44:35 +02:00
Message Deprecate Message::objectParams() and related code 2024-05-28 22:03:46 +00:00
Navigation
objectcache objectcache: Update tests that are really for ObjectCacheFactory 2024-07-24 02:57:23 +00:00
Output OutputPage: Inline getCdnCacheEpoch() into checkLastModified() 2024-07-26 15:49:25 -04:00
OutputTransform HandleParsoidSectionLinks: also run this pass if COLLAPSABLE_SECTIONS 2024-07-30 17:22:55 -04:00
page Replace deprecated LogFormatter::newFromRow/newFromEntry 2024-07-29 22:26:41 +02:00
pager tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
ParamValidator/TypeDef REST: avoid crash on non-strings in request body 2024-07-16 17:18:31 +00:00
parser Extract LintErrorChecker out of SignatureValidator 2024-07-29 14:35:40 -04:00
password Namespace includes/password 2024-05-18 16:17:38 +01:00
Permissions Use real type hints for services etc. in includes/Permissions/ 2024-07-31 08:56:17 +00:00
poolcounter Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
preferences Extract LintErrorChecker out of SignatureValidator 2024-07-29 14:35:40 -04:00
profiler
rcfeed Add namespace and deprecation alias to MachineReadableRCFeedFormatter 2024-05-19 17:00:02 +03:30
registration Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
Request
ResourceLoader ResourceLoader: Limit injection of valid skins to names only 2024-07-23 22:07:19 +00:00
Rest Use real type hints for services etc. in includes/Rest/ 2024-06-11 22:40:44 +02:00
Revision Drop duplicate test cases and @dataProviders from tests 2024-07-19 10:18:31 +00:00
search Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
session Replace gettype() with get_debug_type() in exception messages 2024-07-31 19:24:39 +02:00
shell
site User objectCacheFactory methods not deprecated ObjectCache methods 2024-06-06 09:59:24 +01:00
SiteStats Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
skins tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
sparql
specialpage Use expression builder instead of raw sql 2024-07-23 23:30:45 +02:00
specials Replace deprecated LogFormatter::newFromRow/newFromEntry 2024-07-29 22:26:41 +02:00
Status Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
Storage Merge "Use MainConfigNames constants in tests where possible" 2024-07-11 12:46:04 +00:00
title Merge "Use MainConfigNames constants in tests where possible" 2024-07-11 12:46:04 +00:00
upload tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
user Merge "Use MainConfigNames constants in tests where possible" 2024-07-11 12:46:04 +00:00
utils Use constants provided by MainConfigNames for config names 2024-05-18 01:26:46 +08:00
watchlist Replace db with getDb for Tests 2024-06-23 23:47:56 +01:00
WikiMap tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
xml
AutoLoaderTest.php
MediaWikiServicesTest.php
MockServiceWiring.php
SampleTest.php
TestUser.php
TestUserRegistry.php