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
F3493986: D25886.1744786444.diff
Tue, Apr 15, 06:54
F3479692: D25886.1744764577.diff
Tue, Apr 15, 00:49
F3390244: D25886.1744464041.diff
Fri, Apr 11, 13:20
F3388272: D25886.1744445947.diff
Fri, Apr 11, 08:19
F3388268: D25886.1744445936.diff
Fri, Apr 11, 08:18
F3368200: D25886.1744206466.diff
Tue, Apr 8, 13:47
F3364677: D25886.1744159292.diff
Tue, Apr 8, 00:41
F3339970: D25886.1743628848.diff
Tue, Apr 1, 21:20

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.

The E_STRICT notice was removed from PHP's mysqli extension in https://github.com/php/php-src/commit/e895e962867123aff6ea703ff41670b7eb5c47f1 for PHP 7.4.0.
Since rP23a49eb403c9ea6c58f4ae2f22416e90a9d24c14, Phorge requires 7.2.25.
Phorge does not call PHP's htmlentities() function.

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, thus there is no gain in keeping it.

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)