Page MenuHomePhabricator

Paramater type inheritence fix
ClosedPublic

Authored by avivey on May 10 2016, 8:18 PM.
Tags
None
Referenced Files
F14369616: D15881.id38248.diff
Fri, Dec 20, 5:01 PM
Unknown Object (File)
Sat, Dec 7, 5:39 AM
Unknown Object (File)
Wed, Dec 4, 1:14 PM
Unknown Object (File)
Nov 20 2024, 7:07 PM
Unknown Object (File)
Nov 18 2024, 11:41 AM
Unknown Object (File)
Nov 5 2024, 4:53 AM
Unknown Object (File)
Nov 1 2024, 2:51 PM
Unknown Object (File)
Oct 28 2024, 11:18 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.