lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Refactor builder types

Open thekonz opened this issue 2 years ago • 5 comments

In laravel 9, a new interface Illuminate\Contracts\Database\Query\Builder was added to improve the readability of typehints like Illuminate\Database\Query\Builder|Illuminate\Database\Eloquent\Builder|Illuminate\Database\Eloquent\Relations\Relation.

This pr is just some refactoring to use that interface and I also found some duplicate code which i moved to a trait.

  • [x] Added or updated tests
  • [x] Documented user facing changes
  • [x] Updated CHANGELOG.md

(Breaking) Changes

When building custom directives, people now need to use the new Builder interface to typehint. So this would be something for a v7.

thekonz avatar Apr 28 '23 14:04 thekonz

I did some regex replacements for the @param docblocks and resolved other review issues.

thekonz avatar May 02 '23 19:05 thekonz

@thekonz I included the parts that clean up existing code in https://github.com/nuwave/lighthouse/pull/2390.

spawnia avatar May 03 '23 08:05 spawnia

I cleaned up a couple of remaining places where the interface could be used and added another change on top. It is somewhat unrelated but touches the same parts of the code and is also breaking, so I figured we might as well save ourselves the trouble of resolving merge conflicts and add it in one go.

spawnia avatar May 03 '23 09:05 spawnia

i think this pr is fine, i don't understand why my change would make codecov care all of a sudden. what's your merge strategy? merge v7 changes to master or a separate v7 branch?

thekonz avatar May 25 '23 12:05 thekonz

i don't understand why my change would make codecov care all of a sudden.

No worries, we can just ignore that.

what's your merge strategy? merge v7 changes to master or a separate v7 branch?

Merge to master once we decided to make the cut towards v7.

spawnia avatar May 25 '23 12:05 spawnia