Page MenuHomePhabricator

Add a lint rule forbidding use of "each()"
ClosedPublic

Authored by epriestley on Dec 9 2021, 9:55 PM.
Tags
None
Referenced Files
F14815209: D21741.diff
Mon, Jan 27, 7:27 PM
Unknown Object (File)
Thu, Jan 23, 5:26 AM
Unknown Object (File)
Tue, Jan 21, 7:03 PM
Unknown Object (File)
Tue, Jan 21, 12:40 PM
Unknown Object (File)
Tue, Jan 21, 9:57 AM
Unknown Object (File)
Fri, Jan 10, 10:07 PM
Unknown Object (File)
Sat, Jan 4, 7:38 AM
Unknown Object (File)
Dec 24 2024, 9:27 AM
Subscribers

Details

Summary

Ref T13588. "each()" has been a bad idea for a long time, and was formally deprecated in PHP 7.2 and removed in PHP 8.0.

Catch use of "each()" in lint and reject it.

Test Plan

Added and ran unit tests.

Screen Shot 2021-12-09 at 1.53.30 PM.png (201×586 px, 62 KB)

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

... and was formally deprecated in PHP 7.4 and removed in PHP 8.0.

The lint emitted says 7.2 (which appears to be correct), a minor inconsistency in the revision description

Ah, yep, should be 7.2 -- thanks!

This revision was not accepted when it landed; it landed in state Needs Review.Dec 9 2021, 11:59 PM
This revision was automatically updated to reflect the committed changes.