diff options
author | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2024-07-31 18:56:55 +0200 |
---|---|---|
committer | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2024-07-31 19:33:57 +0200 |
commit | df4cbf5ac603b1dbaf5129d3f87f56badc17c8d0 (patch) | |
tree | 4768be15b11805af8c9fba7cdb702b34bb948644 /tests/phpunit/includes/jobqueue/JobTest.php | |
parent | c045fa0291778f15c63b9bb73b1b840fe85ef62f (diff) | |
download | mediawikicore-df4cbf5ac603b1dbaf5129d3f87f56badc17c8d0.tar.gz mediawikicore-df4cbf5ac603b1dbaf5129d3f87f56badc17c8d0.zip |
Replace gettype() with get_debug_type() in debug/log/test output
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
In this commit I'm only changing code where it looks like the result
is used only for some king of debug, log, or test output. This
probably won't break anything important, but I'm not sure whether
anything might depend on the exact values.
Change-Id: I7c1f0a8f669228643e86f8e511c0e26a2edb2948
Diffstat (limited to 'tests/phpunit/includes/jobqueue/JobTest.php')
-rw-r--r-- | tests/phpunit/includes/jobqueue/JobTest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/jobqueue/JobTest.php b/tests/phpunit/includes/jobqueue/JobTest.php index ac7f30a8ca13..ba8ff124d03b 100644 --- a/tests/phpunit/includes/jobqueue/JobTest.php +++ b/tests/phpunit/includes/jobqueue/JobTest.php @@ -48,7 +48,7 @@ class JobTest extends MediaWikiIntegrationTestCase { ], [ $this->getMockJob( [ (object)[] ] ), - 'someCommand Special: 0=object(stdClass) ' . $requestId + 'someCommand Special: 0=stdClass ' . $requestId ], [ $this->getMockJob( [ $mockToStringObj ] ), |