Page MenuHomePhorge

Clarify comment in PhutilJSON about required PHP version
ClosedPublic

Authored by aklapper on Aug 26 2024, 10:29.
Tags
None
Referenced Files
F3883114: D25807.1746249726.diff
Fri, May 2, 05:22
F3689797: D25807.1745590167.diff
Thu, Apr 24, 14:09
F3675919: D25807.1745531391.diff
Wed, Apr 23, 21:49
F3675184: D25807.1745502603.diff
Wed, Apr 23, 13:50
F3646345: D25807.1745389390.diff
Tue, Apr 22, 06:23
F3605013: D25807.1745249784.diff
Sun, Apr 20, 15:36
F3554247: D25807.1744979962.diff
Thu, Apr 17, 12:39
F3553202: D25807.1744923167.diff
Wed, Apr 16, 20:52

Details

Summary

Future developers may want to clean up some code after bumping required versions, so explicitly state that JSON_UNESCAPED_SLASHES was introduced in PHP 5.4.0 and that the PHP JSON extension is a core PHP extension since PHP 8.0.0 and cannot be disabled anymore, to save time looking up stuff.

https://www.php.net/ChangeLog-5.php#5.4.0
https://www.php.net/manual/en/json.installation.php

Test Plan

Read the docs.

Diff Detail

Repository
rARC Arcanist
Branch
jsonUnescapedSlashesComment
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 1567
Build 1567: arc lint + arc unit

Unit TestsFailed

TimeTest
769 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(85): ArcanistBundleTestCase->runGitRepositoryTests(Object(PhutilDirectoryFixture)) #1 /var/www/html/phorge/arcanist/src/unit/engine/phutil/PhutilTestCase.php(639): ArcanistBundleTestCase->testGitRepository()
42 msArcanistBaseCommitParserTestCase::testBasics
2 assertion(s) passed.
55 msArcanistBaseCommitParserTestCase::testHalt
1 assertion(s) passed.
41 msArcanistBaseCommitParserTestCase::testJump
1 assertion(s) passed.
44 msArcanistBaseCommitParserTestCase::testJumpReturn
1 assertion(s) passed.
View Full Test Results (1 Failed · 74 Passed)

Event Timeline

This revision is now accepted and ready to land.Aug 26 2024, 13:45

P.S. try applying D25809 to check if the red unit test becomes green

This revision was landed with ongoing or failed builds.Aug 26 2024, 14:36
This revision was automatically updated to reflect the committed changes.

P.S. try applying D25809 to check if the red unit test becomes green

@valerio.bozzolan: It won't - my locale has always been en_US.utf8 so "my" issue isn't localization related (and it seems not to allow me to test your patch, as it "covers" your issue)...