Page MenuHomePhabricator

Update Figlet implementation to be PHP8 compatible
ClosedPublic

Authored by cspeckmim on Apr 25 2023, 2:53 PM.
Tags
None
Referenced Files
F13457499: D21860.id.diff
Sun, Jul 14, 6:27 PM
F13457095: D21860.id52105.diff
Sun, Jul 14, 4:52 PM
F13452601: D21860.diff
Sat, Jul 13, 7:21 PM
F13435861: D21860.id.diff
Thu, Jul 11, 6:25 AM
F13435281: D21860.id52105.diff
Thu, Jul 11, 3:41 AM
F13423018: D21860.id.diff
Mon, Jul 8, 11:12 PM
F13409083: D21860.diff
Sat, Jul 6, 8:00 AM
F13381868: D21860.diff
Sun, Jun 30, 3:10 AM
Subscribers

Details

Summary

As of PHP ~v8 the zip_open and associated functions have been deprecated and
removed. The replacement is the ZipArchive API. This updates the figlet
implementation to use this API which has been present in PHP since 5.2.

Additionally in PHP 8 the use of squiggly brackets for indexing into arrays is
also deprecated. This updates to remove two uses of squiggly brackets and
replace with square brackets.

These two deprecations would result in being unable to load differential
revisions in which someone had commented using figlet remarkup.

Refs T13588

Test Plan

Applied these changes to an install and loaded a revision that had comments
where someone utilized figlet remarkup. The revision loaded properly and the
figlet comment rendered properly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 25 2023, 2:59 PM

(It would also probably be fine to just remove support for compressed figlet fonts, they're probably saving like 5KB?)

Oh whoops. I didn't realize figlet font file format wasn't compressed