Page MenuHomePhabricator

Paramater type inheritence fix
ClosedPublic

Authored by avivey on May 10 2016, 8:18 PM.
Tags
None
Referenced Files
F13233139: D15881.id.diff
Tue, May 21, 1:44 AM
F13230297: D15881.id38249.diff
Mon, May 20, 10:33 PM
F13221490: D15881.diff
Sun, May 19, 2:49 AM
F13215837: D15881.id38248.diff
Fri, May 17, 8:13 PM
F13202298: D15881.diff
Tue, May 14, 10:31 PM
Unknown Object (File)
Mon, May 6, 11:45 PM
Unknown Object (File)
Mon, Apr 29, 3:48 PM
Unknown Object (File)
Wed, Apr 24, 11:45 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.