Page MenuHomePhorge

PHP 8.4: Do not pass null to exit() in PhutilArgumentParser
AbandonedPublic

Authored by aklapper on Mon, Feb 17, 18:57.
Tags
None
Referenced Files
F2993479: D25888.1740282064.diff
Sat, Feb 22, 03:41
F2992416: D25888.1740216290.diff
Fri, Feb 21, 09:24
F2992151: D25888.1740203793.diff
Fri, Feb 21, 05:56
F2988405: D25888.1740150874.diff
Thu, Feb 20, 15:14
F2988362: D25888.1740148042.diff
Thu, Feb 20, 14:27
F2988335: D25888.1740145697.diff
Thu, Feb 20, 13:48
F2987705: D25888.1740117216.diff
Thu, Feb 20, 05:53
F2986189: D25888.1740096419.diff
Thu, Feb 20, 00:06

Details

Summary

Per the Changelog at https://www.php.net/manual/en/function.exit.php, since PHP 8.4.0, "exit() is now a proper function, therefore it follows the usual type juggling semantics is affected by the strict_types declare".

ERROR 8192: exit(): Passing null to parameter #1 ($status) of type string|int is deprecated at [/arcanist/src/parser/argument/PhutilArgumentParser.php:494]

Closes T15990

Test Plan

Run ./bin/arc diff --create --help under PHP 8.4 and check for additional final output.

Diff Detail

Repository
rARC Arcanist
Branch
T15990 (branched from master)
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 1726
Build 1726: arc lint + arc unit

Unit TestsFailed

TimeTest
661 msArcanistBundleTestCase::testGitRepository
EXCEPTION (Exception): Expected patch and actual patch for 5dec8bf28557f078d1987c4e8cfb53d08310f522 differ. Wrote actual patch to '/var/www/html/phorge/arcanist/src/parser/__tests__/patches//5dec8bf28557f078d1987c4e8cfb53d08310f522.gitpatch.real'. #0 /var/www/html/phorge/arcanist/src/parser/__tests__/ArcanistBundleTestCase.php(87): ArcanistBundleTestCase->runGitRepositoryTests(Object(PhutilDirectoryFixture)) #1 /var/www/html/phorge/arcanist/src/unit/engine/phutil/PhutilTestCase.php(639): ArcanistBundleTestCase->testGitRepository()
45 msArcanistBaseCommitParserTestCase::testBasics
2 assertion(s) passed.
45 msArcanistBaseCommitParserTestCase::testHalt
1 assertion(s) passed.
45 msArcanistBaseCommitParserTestCase::testJump
1 assertion(s) passed.
44 msArcanistBaseCommitParserTestCase::testJumpReturn
1 assertion(s) passed.
View Full Test Results (1 Failed · 99 Passed)