Skip to content

Conversation

@wsamoht
Copy link
Contributor

@wsamoht wsamoht commented Feb 11, 2025

Summary

Support for Laravel's model AsArrayObject cast was added in #1393. It, however, was added using PHP's \ArrayObject object when it should be Laravel's Illuminate\Database\Eloquent\Casts\ArrayObject.

As it is now, using Laravel's methods like toArray throw an error in the editor (like VS Code) saying the method is invalid.

Reference

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Update the README.md
  • Code style has been fixed via composer fix-style

@barryvdh barryvdh merged commit 3d4e377 into barryvdh:master Feb 22, 2025
32 checks passed
@wsamoht wsamoht deleted the fix-as-array-object branch February 22, 2025 17:04
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