Skip to content

Releases: sethsandaru/eloquent-docs

v2.0.1

13 May 03:14
Compare
Choose a tag to compare

A small patch to remove the composer.lock (following other libraries)

v2.0.0 [Laravel 11]

20 Apr 09:24
d497307
Compare
Choose a tag to compare

This will be a major update - breaking changes.

News & Improvements

  • Supports PHP 8.2 & PHP 8.3
  • Supports Laravel 11
  • Bumps PHPUnit to 10.x
  • Adds the in-house doctrine manager 😎 since Laravel dropped Doctrine. This makes the codebase a bit nicer.
  • Makes DBAL become a required dependency and gets rid of the installDependencies part. EloquentDocs needs DBAL so it doesn't really make sense to put it in require-dev lol
  • Improves the date/datetime casting. Now it will render either Carbon or CarbonImmutable based on your configuration.
  • Improves boolean
  • Adds more tests

Installation

For Laravel 11 users, can install the latest version:

composer require sethsandaru/eloquent-docs --dev

For Laravel 9 & 10 users:

composer require sethsandaru/eloquent-docs ^1 --dev

Notes

  • EloquentDocs doesn't support the DB URI connection at the moment. You need to specify the host, port, username, password, and database.
  • SQLite users only need to specify the DB_DATABASE, and use the full path.
  • 1.x will no longer receive feature/improvement updates but bug/security fixes. I encourage everybody to upgrade to the latest Laravel version.

v1.2.3

29 Oct 13:43
Compare
Choose a tag to compare

Release v1.2.3

  • #19 Improvement: Ignore abstract model classes while using bulk generation command by @sethsandaru

v1.2.2

24 Sep 07:36
Compare
Choose a tag to compare

Release v1.2.2

Improvement

  • #17 (PgSQL) Render numeric type as float

v1.2.1

16 May 13:40
025889b
Compare
Choose a tag to compare

Release v1.2.1

Fixes

  • Registered bit as string for Doctrine\DBAL

Improvements

  • Added more test cases
  • Removed typo

Happy generating phpDoc for your Eloquent Models!

v1.2.0

13 Apr 14:54
Compare
Choose a tag to compare

v1.2.0 Release

New Feature

  • Bulk generate command from a given model path.
    • php artisan eloquent:bulk-phpdoc "app/Models/*.php"

Minor Updates

  • Accessor/Attribute will be generated using camelCase from now on.
  • Some chores.

v1.1.4 [2023-02-18]

18 Feb 05:30
18d9ff7
Compare
Choose a tag to compare

Release v1.1.4

  • Supported Laravel 10
  • Deprecated Laravel 8 (super old and out of support, consider upgrading to 9+)
  • Added Matrix build (PHP 8.1, 8.2. Laravel 9, 10)
  • Fixed some indents

v1.1.2 [2022-01-02]

02 Jan 09:15
607ff44
Compare
Choose a tag to compare

Release

  • Fixed an issue when first-time install the package that made the Laravel's discovery goes wrong

v1.1.1 [2023-01-02]

02 Jan 09:05
6bd419a
Compare
Choose a tag to compare

Release

  • Fixed an issue when trying to generate a Model that's having any enum column (error from Doctrine)

v1.1.0 [2022-09-03]

03 Sep 09:11
bdbe58b
Compare
Choose a tag to compare

Release

--short-class will render the short class name (without the full namespace path).

Assuming everybody is registering the relationships like this way:

public function articles(): HasMany
{
    return $this->hasMany(Article::class);
}

=> it will render: *property-read Article[]|\Illuminate\Support\Collection $articles

Limitation:

  • It won't use the short class name for Collection & Carbon (it never knows if your class has already import those yet), there would be other approaches indeed, which can be waited.

Fixes

  • Date/datetime columns without casts now will be considered as string (avoid type mismatch while coding)
    • Always a good approach to add your own date/datetime columns to the $casts method
  • Changed the *many relationships access type from \Illuminate\Support\Collection to Illuminate\Database\Eloquent\Collection
    • EloquentCollection has some specific methods (eg: load) so you can use in your cases better
  • get*Attribute that defined an exact return type now will be added correctly in the phpDoc