shield icon indicating copy to clipboard operation
shield copied to clipboard

fix: Bug in fetchIdentities when using first()

Open b1tc0re opened this issue 6 months ago • 1 comments

Description This PR fixes a critical bug when using withIdentities()->first() and improves test reliability.

Fixed identity loading bug:

  • Added missing ID population for first() method in fetchIdentities
  • Resolved "undefined array key id" error when calling withIdentities()->first()
  • Now correctly handles identity relationships for single results

Checklist:

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

b1tc0re avatar Aug 07 '25 01:08 b1tc0re

Thanks! However, there's no bug per se - methods like withIdentities(), withGroups(), and withPermissions() are intended to be used with the find* methods.

That said, we're always open to improvements. If you're interested, feel free to update all the relevant methods and documentation accordingly.

michalsn avatar Aug 07 '25 05:08 michalsn