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

feat: Add support for nested arrays in content #46

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

tasinttttttt
Copy link
Contributor

When content is a nested array, Diff::render() method throws an Array to string conversion error.

This PR fixes it by replacing the call to array_diff_assoc with Rogervila\ArrayDiffMultidimensional (https://github.com/rogervila/array-diff-multidimensional) class that performs a nested diff.

Check the added test_diff_nested_array_to_array test in DiffTest.php.

@overtrue overtrue merged commit 7757bc9 into overtrue:4.x Feb 14, 2023
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