aboutsummaryrefslogtreecommitdiffstats
path: root/includes/mail
diff options
context:
space:
mode:
authorBartosz Dziewoński <dziewonski@fastmail.fm>2024-06-13 01:59:33 +0200
committerBartosz Dziewoński <dziewonski@fastmail.fm>2024-06-13 00:23:39 +0000
commitccd423225fd6e6e6f2b4b6145cb5ed14877ac6ee (patch)
treeb884cdc2672fa969a1ab40f8b0550d9bb5de14ff /includes/mail
parent850949da86f6af49ca14e129b67ad28e30f804d3 (diff)
downloadmediawikicore-ccd423225fd6e6e6f2b4b6145cb5ed14877ac6ee.tar.gz
mediawikicore-ccd423225fd6e6e6f2b4b6145cb5ed14877ac6ee.zip
Add "implements Stringable" to every class with "function __toString()"
In PHP 8, but not in PHP 7.4, every class with a __toString() function implicitly implements the Stringable interface. Therefore, the behavior of checks like "instanceof Stringable" differs between these PHP versions when such classes are involved. Make every such class implement the interface so that the behavior will be consistent. The PHP 7.4 fallback for the Stringable interface is provided by symfony/polyfill-php80. Change-Id: I3f0330c2555c7d3bf99b654ed3c0b0303e257ea1
Diffstat (limited to 'includes/mail')
-rw-r--r--includes/mail/MailAddress.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php
index a1909d17a2cf..2470b7c26f7d 100644
--- a/includes/mail/MailAddress.php
+++ b/includes/mail/MailAddress.php
@@ -33,7 +33,7 @@ use MediaWiki\Mail\UserEmailContact;
* @since 1.6.0
* @ingroup Mail
*/
-class MailAddress {
+class MailAddress implements Stringable {
public string $name;
public string $realName;