Page MenuHomePhabricator

Paramater type inheritence fix
ClosedPublic

Authored by avivey on May 10 2016, 8:18 PM.
Tags
None
Referenced Files
F15547253: D15881.diff
Sat, Apr 26, 6:27 PM
F15545671: D15881.id.diff
Sat, Apr 26, 11:55 AM
F15540094: D15881.diff
Fri, Apr 25, 6:32 AM
F15535723: D15881.id38248.diff
Thu, Apr 24, 6:25 AM
F15502690: D15881.id.diff
Mon, Apr 14, 3:14 AM
F15486715: D15881.id.diff
Thu, Apr 10, 9:06 AM
F15389222: D15881.id.diff
Mar 15 2025, 5:00 AM
F15384202: D15881.id38249.diff
Mar 14 2025, 7:07 PM
Subscribers

Details

Summary

These parameters wrongly extend List.

Test Plan

Used createdStart field for a search - didn't get error about "should be a list".
git grep 'extends ConduitListParameterType'.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey retitled this revision from to Paramater type inheritence fix.
avivey updated this object.
avivey edited the test plan for this revision. (Show Details)
avivey added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/conduit/parametertype/ConduitEpochParameterType.php
42–44

I'd expect this to just be null, any particular reason for this?

This revision is now accepted and ready to land.May 10 2016, 8:24 PM
src/applications/conduit/parametertype/ConduitEpochParameterType.php
42–44

I just assumed this needs to be a valid value.

avivey edited edge metadata.

Default to null (Using parent's method).

src/applications/conduit/parametertype/ConduitEpochParameterType.php
42–44

I think nothing actually uses it right now, but null is more consistent with the behavior of ConduitIntParameterType, $request->getInt(), $request->getStr(), etc.

Defaulting the List type to array() is just so that you can do this sort of thing:

$value = $some_list_value->getValue();
$added = array_diff($value, $old); // <-- Always safe, don't need to check for null. 

There's generally no similar simplification available for giving other types defaults other than null.

This revision was automatically updated to reflect the committed changes.