Page MenuHomePhorge

Fix accessing private parent class properties in QueryFuture
ClosedPublic

Authored by aklapper on Jul 28 2024, 21:26.
Tags
None
Referenced Files
F3006698: D25755.1740586056.diff
Tue, Feb 25, 16:07
F3005724: D25755.1740539579.diff
Tue, Feb 25, 03:12
F2998984: D25755.1740418990.diff
Sun, Feb 23, 17:43
F2996644: D25755.1740382978.diff
Sun, Feb 23, 07:42
F2996400: D25755.1740374528.diff
Sun, Feb 23, 05:22
F2996398: D25755.1740374255.diff
Sun, Feb 23, 05:17
F2996397: D25755.1740374200.diff
Sun, Feb 23, 05:16
F2995548: D25755.1740345901.diff
Sat, Feb 22, 21:25

Details

Summary

PHPStan complains about Access to private property $exception of parent class Future and Access to private property $result of parent class Future in QueryFuture.
Thus call the corresponding public functions provided by Future instead.

Test Plan

Run static code analysis; read the code.

Diff Detail

Repository
rP Phorge
Branch
phutilFuturePrivateVars
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/infrastructure/storage/future/QueryFuture.php:47XHP86Unsafe Usage of Dynamic String
Unit
Tests Passed
Build Status
Buildable 1474
Build 1474: arc lint + arc unit

Event Timeline

Seems good thanks. It seems we can also have it shorter with canResolve() 🤔

https://we.phorge.it/source/arcanist/browse/master/src/future/Future.php$253-263

src/infrastructure/storage/future/QueryFuture.php
54

Evaluate this instead

This revision is now accepted and ready to land.Jul 29 2024, 10:35

Use canResolve() as found by Valerio (so much for my reading skills)

This revision was landed with ongoing or failed builds.Jul 29 2024, 16:41
This revision was automatically updated to reflect the committed changes.