Page MenuHomePhorge

Fix accessing private parent class properties in QueryFuture
ClosedPublic

Authored by aklapper on Jul 28 2024, 21:26.
Tags
None
Referenced Files
F2943002: D25755.1738154401.diff
Tue, Jan 28, 12:40
F2932575: D25755.1737740102.diff
Thu, Jan 23, 17:35
F2932559: D25755.1737740087.diff
Thu, Jan 23, 17:34
F2932556: D25755.1737740084.diff
Thu, Jan 23, 17:34
F2932522: D25755.1737738134.diff
Thu, Jan 23, 17:02
F2904831: D25755.1737334817.diff
Sun, Jan 19, 01:00
F2899528: D25755.1737262532.diff
Sat, Jan 18, 04:55
F2899404: D25755.1737261830.diff
Sat, Jan 18, 04:43

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.