We should try to use declare(strict_types=1) in all of the PHP files.
This helps prevent implicit type conversion issues.
We should try to use declare(strict_types=1) in all of the PHP files.
This helps prevent implicit type conversion issues.
Change #1286348 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/CheckUser@master] Add pre-commit hook enforcing declare(strict_types=1)
Change #1286348 abandoned by Mpostoronca:
[mediawiki/extensions/CheckUser@master] Add pre-commit hook enforcing declare(strict_types=1)
Change #1287877 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/ConfirmEdit@master] Add declare(strict_types=1) to all PHP files
Change #1287888 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/ConfirmEdit@master] Add declare(strict_types=1) to all PHP files
Change #1287877 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@master] Add declare(strict_types=1) to all PHP files
Change #1287888 abandoned by Dreamy Jazz:
[mediawiki/extensions/ConfirmEdit@master] Add declare(strict_types=1) to all PHP files
Reason:
Duplicate to I7854d9b0df2a4edd25a27065221303336cda8eae from what I can see
Change #1289350 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/CheckUser@master] Add declare(strict_types=1) to all PHP files
Change #1289350 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/CheckUser@master] Add declare(strict_types=1) to all PHP files
Change #1289350 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add declare(strict_types=1) to all PHP files
Change #1290789 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/AntiSpoof@master] Add declare(strict_types=1) to all PHP files
Change #1290790 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/EmailAuth@master] Add declare(strict_types=1) to all PHP files
Change #1290791 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/LoginNotify@master] Add declare(strict_types=1) to all PHP files
Change #1290792 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/IPReputation@master] Add declare(strict_types=1) to all PHP files
Change #1290796 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/ReportIncident@master] Add declare(strict_types=1) to all PHP files
Change #1290801 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/GlobalBlocking@master] Add declare(strict_types=1) to all PHP files
Change #1290802 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/MediaModeration@master] Add declare(strict_types=1) to all PHP files
Change #1290804 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/SecurePoll@master] Add declare(strict_types=1) to all PHP files
Change #1290809 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/IPInfo@master] Add declare(strict_types=1) to all PHP files
Change #1290812 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):
[mediawiki/extensions/OATHAuth@master] Add declare(strict_types=1) to all PHP files
Change #1290802 merged by jenkins-bot:
[mediawiki/extensions/MediaModeration@master] Add declare(strict_types=1) to all PHP files
Change #1290801 merged by jenkins-bot:
[mediawiki/extensions/GlobalBlocking@master] Add declare(strict_types=1) to all PHP files
Change #1290790 merged by jenkins-bot:
[mediawiki/extensions/EmailAuth@master] Add declare(strict_types=1) to all PHP files
Change #1290812 merged by jenkins-bot:
[mediawiki/extensions/OATHAuth@master] Add declare(strict_types=1) to all PHP files
Change #1290791 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@master] Add declare(strict_types=1) to all PHP files
Change #1290789 merged by jenkins-bot:
[mediawiki/extensions/AntiSpoof@master] Add declare(strict_types=1) to all PHP files
Change #1290792 merged by jenkins-bot:
[mediawiki/extensions/IPReputation@master] Add declare(strict_types=1) to all PHP files
Change #1290796 merged by jenkins-bot:
[mediawiki/extensions/ReportIncident@master] Add declare(strict_types=1) to all PHP files
Change #1290809 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Add declare(strict_types=1) to all PHP files
(Just to clarify, is the scope of this task Product Safety and Integrity -stewarded extensions? Just asking as the tags currently present on this task seem to be PSI-stewarded exts AFAICS, w/ the exception of ConfirmEdit (CAPTCHA extension) [which is apparently stewarded by the Editing-team?])
This is intended for extensions we steward, but as we are working on hCaptcha we have touched most of ConfirmEdit (CAPTCHA extension) code and so thought we'd include it
Change #1290804 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Add declare(strict_types=1) to all PHP files
If you're thinking about adding strict_types to anything else, I would recommend against it. This ticket caused 4 production errors in SecurePoll. Not sure that's worth whatever benefit strict_types provides.
https://gerrit.wikimedia.org/r/q/is:merged+strict+repo:mediawiki/extensions/SecurePoll
It also added some non-standard phpcs rules to the phpcs config.