Page MenuHomePhorge

Clarify comment in PhutilJSON about required PHP version
ClosedPublic

Authored by aklapper on Aug 26 2024, 10:29.

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)...