Skip to content

feat: support objects in remaining dot array helpers#10296

Open
michalsn wants to merge 4 commits into
codeigniter4:4.8from
michalsn:feat/dot-array-objects
Open

feat: support objects in remaining dot array helpers#10296
michalsn wants to merge 4 commits into
codeigniter4:4.8from
michalsn:feat/dot-array-objects

Conversation

@michalsn

@michalsn michalsn commented Jun 9, 2026

Copy link
Copy Markdown
Member

Description
This PR replaces #10269. It extends the remaining dot-path helpers so dot_array_has(), dot_array_only(), and dot_array_except() can read through array-like object values while keeping the existing array return contract for projection helpers.

The code now uses one lookup path for arrays and objects. It preserves keys from traversable objects and does not convert objects that are not part of the requested path. If an object is returned or left untouched, it stays an object. If only part of an object is selected or removed, that part is returned as an array.

Supersedes #10269
Closes #10225

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added enhancement PRs that improve existing functionalities 4.8 PRs that target the `4.8` branch. labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants