Skip to content

[Bug]: $modifyChildQueryUsing ignored if $modifyQueryUsing is defined #179

@gp-lnuff

Description

@gp-lnuff

What happened?

Seems to be an intended consequence of #178 .
I'm not sure why it would be intended, but it leads to unexpected behaviour when both Closures are defined - $modifyChildQueryUsing is just left unused.
I would say either revert it or amend the logic in buildTree() to make use of the second Closure when it's defined.

How to reproduce the bug

  • Make a SelectTree
  • Define $modifyQueryUsing
  • Observe result set
  • Define $modifyChildQueryUsing
  • Notice how the result set is unchanged

Or, set a breakpoint on line 188 of SelectTree.php and notice how it is never hit

Package Version

4.0.5

PHP Version

8.4.12

Laravel Version

12.31.1

Which operating systems does with happen with?

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions