Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CanConvertToArrayTrait and ArrayHelper classes #703

Merged
merged 7 commits into from
Aug 26, 2024

Conversation

agibson-godaddy
Copy link
Contributor

@agibson-godaddy agibson-godaddy commented Aug 23, 2024

Summary

Release: #699

The main goal of this PR was to add the CanConvertToArrayTrait. Our existing implementation of this uses several methods from ArrayHelper 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

  • This setting is configured
  • Taxes are enabled

Steps

Steps should be in a step => success? format, like below:

  1. Do this
  2. And this
    • The result is this
  • Code review

Before merge

  • I have confirmed these changes in each supported minor WooCommerce version

@agibson-godaddy agibson-godaddy self-assigned this Aug 23, 2024
agibson-godaddy and others added 3 commits August 23, 2024 12:32
# Conflicts:
#	tests/bootstrap.php
#	woocommerce/changelog.txt
#	woocommerce/class-sv-wc-plugin.php
@nmolham-godaddy nmolham-godaddy self-assigned this Aug 26, 2024
Copy link
Contributor

@nmolham-godaddy nmolham-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, I finished off the rest of the TODO tests

@nmolham-godaddy nmolham-godaddy marked this pull request as ready for review August 26, 2024 04:23
@nmolham-godaddy nmolham-godaddy merged commit 021bdb8 into release/5.13.1 Aug 26, 2024
5 checks passed
@nmolham-godaddy nmolham-godaddy deleted the chore/add-convert-to-array-trait branch August 26, 2024 04:23
@agibson-godaddy
Copy link
Contributor Author

Thank you!!! Nice work 🎉

@ajaynes-godaddy ajaynes-godaddy changed the title [WIP] Add CanConvertToArrayTrait and ArrayHelper classes Add CanConvertToArrayTrait and ArrayHelper classes Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants