Add CanConvertToArrayTrait
and ArrayHelper
classes
#703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Release: #699
The main goal of this PR was to add the
CanConvertToArrayTrait
. Our existing implementation of this uses several methods fromArrayHelper
so I copied over those as well. For now I only copied over the methods the trait actually needs. I'm not opposed to adding the rest, I just did it like this because I was also rewriting the tests (ones in mwc-common are kind of old) so I was reducing the amount of work required there in one go.Note that the framework does already have some array helpers starting here. I propose we eventually follow up with another PR to start moving those methods over to the new
ArrayHelper
class (forwarding the old methods to the new for backwards compatibility). Again just didn't do that in this PR to keep this one smaller.QA
If applicable, add specific steps for the reviewer to perform as part of their QA process prior to approving this pull request. Steps should be in a step -> success? format, like below
Setup
List any configuration requirements for testing
Steps
Steps should be in a step => success? format, like below:
Before merge