topclaudy / compoships

Multi-columns relationships for Laravel's Eloquent ORM
MIT License
1.12k stars 132 forks source link

Update @extends PHPDocs #178

Open tychokamphuis-aqqo opened 4 weeks ago

tychokamphuis-aqqo commented 4 weeks ago

Thank you for all the great work on this project! This PR updates the @extends PHPDocs to align with the latest PHPDoc standards in Laravel, ensuring improved consistency and compatibility.

Please let me know if there’s anything you'd like adjusted or further explained.

Thanks again!

Justin-vdm commented 2 weeks ago

I’m encountering the same issues as well. Looking forward to seeing this improvement.

SlyDave commented 2 weeks ago

Might also be worth updating Database/Eloquent/Concerns/HasRelationships

currently they return:

    /**
     * Define a one-to-one relationship.
     *
     * @param string            $related
     * @param string|array|null $foreignKey
     * @param string|array|null $localKey
     *
     * @return \Awobaz\Compoships\Database\Eloquent\Relations\HasOne
     */

When you'd expect something like:

    /**
     * Define a one-to-one relationship.
     *
     * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
     *
     * @param  class-string<TRelatedModel>  $related
     * @param  string|array|null  $foreignKey
     * @param  string|array|null  $localKey
     * @return \Awobaz\Compoships\Database\Eloquent\Relations\HasOne<TRelatedModel, $this>
     */