Page MenuHomePhorge

Remove use of deprecated E_STRICT PHP constant
Needs ReviewPublic

Authored by aklapper on Feb 17 2025, 11:37.
Tags
None
Referenced Files
F3287988: D25886.1742824046.diff
Sun, Mar 23, 13:47
F3285454: D25886.1742801837.diff
Sun, Mar 23, 07:37
F3281040: D25886.1742669069.diff
Fri, Mar 21, 18:44
F3280845: D25886.1742660734.diff
Fri, Mar 21, 16:25
F3278351: D25886.1742619872.diff
Fri, Mar 21, 05:04
F3277789: D25886.1742602804.diff
Fri, Mar 21, 00:20
F3251720: D25886.1742369047.diff
Tue, Mar 18, 07:24
F3219976: D25886.1741793039.diff
Tue, Mar 11, 15:23

Details

Summary

The E_STRICT PHP constant is deprecated since PHP 8.4 per https://www.php.net/manual/en/migration84.deprecated.php.
Per https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant, the E_STRICT constant was still in use in-between PHP 7.0 and 7.4 for PHP's mysqli extension and PHP's htmlentities() function. Since rP23a49eb403c9ea6c58f4ae2f22416e90a9d24c14, Phorge requires 7.2.25. Phorge neither uses PHP's mysqli extension nor calls PHP's htmlentities() function.
Thus remove its usage, as E_STRICT is a part of E_ALL since PHP 5.4.0 per https://github.com/php/php-src/blob/php-5.4.0/NEWS#L69.

Closes T15989

Test Plan

None.

Diff Detail

Repository
rARC Arcanist
Branch
T15989 (branched from master)
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1724
Build 1724: arc lint + arc unit

Event Timeline

Finally something that can be tested using arc anoid - I guess?

Finally something that can be tested using arc anoid - I guess?

@valerio.bozzolan Could you elaborate? I don't see how to introduce an error to make arc anoid print a warning or such (running PHP 8.4.4 without this patch).
But in any case, I hope the explanation and all the links in the commit message make it clear enough; same for D25887.

Since using E_STRICT is deprecated, I thought the simple fact of using it from whatever Arcanist CLI (e.g. arc anoid) was triggering this new warning (with or without having an exception - since that line 18 is supposed to be always executed I think)