Skip to content

Create a value object class for $attributes within view, rector to fix typing #2103

Description

@iamdadmin

Description

Currently $attributes is a mix of ImmutableArray via arr() and array[].

  1. Standardise it so it's a value object class of it's own, probably tempest\view\attributes - TBD.
  2. Provide a courtesy rector script to re-type it from ImmutableArray in dev apps to the new type.
  3. Consider what API it needs to implement, either have it implement ArrayInterface for first party implementation of methods, or simply use the functions as needed; it should implement a with mapping to removeKeysExcept and without mapping to removeKeys, as well as a mapping to filter and any other methods required within tempest/view usage, probably map, each and a couple of obvious ones.
  4. Implement any additional custom methods to move handling of the $attributes array within the value object class itself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions