Page MenuHomeDevCentral

UserExternalSource: cast user_id property as integer
ClosedPublic

Authored by dereckson on Jul 2 2016, 08:59.
Tags
None
Referenced Files
F57217478: D447.id.diff
Mon, Nov 16, 09:14
F57217475: D447.id1082.diff
Mon, Nov 16, 09:14
F57217449: D447.id1081.diff
Mon, Nov 16, 09:13
F57129072: D447.diff
Sun, Nov 15, 03:09
F56819432: D447.id1081.diff
Mon, Nov 9, 15:12
F56814275: D447.id.diff
Mon, Nov 9, 13:28
F56779459: D447.id1082.diff
Mon, Nov 9, 07:19
F56741582: D447.diff
Sun, Nov 8, 20:58
Subscribers
None

Details

Summary

Code using the UserExternalSource model expects user ID to be
an integer, and not a string:

$externalUser = UserExternalSource::find(1);
// Does something with $externalUser->user_id

Eloquent allows to specify attributes casting with a $casts array.

Test Plan

Tested through D445 new unit test which provide:
$this->assertSame($externalUser->user_id, 1);

Diff Detail

Repository
rGROVE Auth Grove
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to UserExternalSource: cast user_id property as integer.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited edge metadata.
This revision is now accepted and ready to land.Jul 2 2016, 08:59
This revision was automatically updated to reflect the committed changes.