Closed maxime-rainville closed 1 month ago
FieldList
is not in a vacuum - it's the subclass of ArrayList
which is a subclass of ViewableData
, uses a trait, and implements several interfaces.
The ACs should specify whether any of that is in scope, or if this card is only for methods defined directly in FieldList
, or if it's mostly about methods defined directly in FieldList
but the implementor can choose to strongly-type other methods if they feel it's relevant to the goal of the card (i.e. making it clearer what can/cannot be passed into FieldList
).
PRs merged
Many methods on FieldList will silently fail if you give them bad types.
e.g.:
$fields->addFieldsToTab('Root.Main', $field1, $field2, $field3)
will only add$field1
to the tab.Acceptance criteria
FieldList
that are not covered by other interfaces are strongly typed and have an explicit return type.addFieldsToTab
hard fails if the second parameter is not an array.Shared CI workflow run
PRs