Page MenuHomePhorge

Fix accessing private parent class properties in QueryFuture
ClosedPublic

Authored by aklapper on Jul 28 2024, 21:26.
Tags
None
Referenced Files
F3553194: D25755.1744923128.diff
Wed, Apr 16, 20:52
F3491542: D25755.1744784372.diff
Tue, Apr 15, 06:19
F3389279: D25755.1744455473.diff
Fri, Apr 11, 10:57
F3387488: D25755.1744437210.diff
Fri, Apr 11, 05:53
F3374774: D25755.1744296180.diff
Wed, Apr 9, 14:43
F3372736: D25755.1744251667.diff
Wed, Apr 9, 02:21
F3372732: D25755.1744251525.diff
Wed, Apr 9, 02:18
F3372088: D25755.1744248102.diff
Wed, Apr 9, 01:21

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 1472
Build 1472: 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.