Skip to content

Releases: lunarstorm/laravel-ddd

v0.9.0

11 Mar 16:59
1cfaa38
Compare
Choose a tag to compare

[0.9.0] - 2024-03-11

Changed

  • Internals: normalize generator file paths using DIRECTORY_SEPARATOR for consistency across different operating systems when it comes to console output and test expectations.

Chore

  • Add Laravel 11 support.
  • Add PHP 8.3 support.

What's Changed

  • Bump aglipanci/laravel-pint-action from 2.3.0 to 2.3.1 by @dependabot in #37
  • Bump ramsey/composer-install from 2 to 3 by @dependabot in #38
  • Adding Laravel 11 support to dependencies and test matrix. by @JasperTey in #39

Full Changelog: v0.8.1...v0.9.0

v0.8.1

05 Dec 21:00
2f75eab
Compare
Choose a tag to compare

[0.8.1] - 2023-12-05

Chore

  • Update dependencies.

What's Changed

Full Changelog: v0.8.0...v0.8.1

v0.8.0

13 Nov 03:45
97f508f
Compare
Choose a tag to compare

[0.8.0] - 2023-11-12

BREAKING

  • The default domain model stub model.php.stub has changed. If stubs were published prior to this release, you may have to delete and re-publish; unless the published model.php.stub has been entirely customized with independent logic for your respective application.

Changed

  • Implement proper support for custom base models when using ddd:model:
    • If the configured ddd.base_model exists (evaluated using class_exists), base model generation is skipped.
    • If ddd.base_model does not exist and falls under a domain namespace, base model will be generated.
    • Falling under a domain namespace means Domain\**\Models\**.
    • If ddd.base_model were set to App\Models\NonExistentModel or Illuminate\Database\Eloquent\NonExistentModel, they fall outside of the domain namespace and will not be generated for you.

Fixed

  • Resolve long-standing issue where ddd:model would not properly detect whether the configured ddd.base_model already exists, leading to unintended results.

Chore

  • Update composer dependencies.

What's Changed

Full Changelog: v0.7.0...v0.8.0

v0.7.0

23 Oct 01:41
0a3d435
Compare
Choose a tag to compare

[0.7.0] - 2023-10-22

Added

  • Formal support for subdomains (nested domains). For example, to generate model Domain\Reporting\Internal\Models\InvoiceReport, the domain argument can be specified with dot notation: ddd:model Reporting.Internal InvoiceReport. Specifying Reporting/Internal or Reporting\\Internal will also be accepted and normalized to dot notation internally.
  • Implement abstract Lunarstorm\LaravelDDD\Factories\DomainFactory extension of Illuminate\Database\Eloquent\Factories\Factory:
    • Implements DomainFactory::resolveFactoryName() to resolve the corresponding factory for a domain model.
    • Will resolve the correct factory if the model belongs to a subdomain; Domain\Reporting\Internal\Models\InvoiceReport will correctly resolve to Database\Factories\Reporting\Internal\InvoiceReportFactory.

Changed

  • Default base model implementation in base-model.php.stub now uses DomainFactory::factoryForModel() inside the newFactory method to resolve the model factory.

BREAKING

  • For existing installations of the package to support sub-domain model factories, the base model's newFactory() should be updated where applicable; see base-model.php.stub.
use Lunarstorm\LaravelDDD\Factories\DomainFactory;

// ...

protected static function newFactory()
{
    return DomainFactory::factoryForModel(get_called_class());
}

What's Changed

  • feat: Add support for subdomains in newFactory method by @meditto in #29
  • Bump actions/checkout from 3 to 4 by @dependabot in #32
  • Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in #33
  • feat: Add support for subdomains in newFactory method (#29) by @JasperTey in #31

New Contributors

Full Changelog: v0.6.1...v0.7.0

v0.6.1

15 Aug 01:11
8c95778
Compare
Choose a tag to compare

[0.6.1] - 2023-08-14

Fixed

  • Ensure generated domain factories set the protected $model property.
  • Ensure generated factory classes are always suffixed by Factory.

What's Changed

Full Changelog: v0.6.0...v0.6.1

v0.6.0

14 Aug 22:36
6cf1aaf
Compare
Choose a tag to compare

[0.6.0] - 2023-08-14

Added

  • Ability to generate domain model factories, in a few ways:
    • ddd:factory Invoicing InvoiceFactory
    • ddd:model Invoicing Invoice --factory
    • ddd:model Invoicing Invoice -f
    • ddd:model -f (if relying on prompts)

What's Changed

Full Changelog: v0.5.1...v0.6.0

v0.5.1

27 Jun 19:14
8097a11
Compare
Choose a tag to compare

[0.5.1] - 2023-06-27

Changed

  • Clean up default stubs; get rid of extraneous ellipses in comment blocks and ensure code style is consistent.

Fixed

  • Ensure generator commands show a nicely sanitized path to generated file in the console output (previously, double slashes were present). Only applies to Laravel 9.32.0 onwards, when file paths were added to the console output.

Chore

  • Upgrade test suite to use Pest 2.x.

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

14 Jun 16:25
6067313
Compare
Choose a tag to compare

[0.5.0] - 2023-06-14

Added

  • Ability to generate actions (ddd:action), which by default generates an action class based on the lorisleiva/laravel-actions package.

Changed

  • Minor cleanups and updates to the default ddd.php config file.
  • Update stubs to be less opinionated where possible.

What's Changed

Full Changelog: v0.4.0...v0.5.0

v0.4.0

08 May 15:13
e08819d
Compare
Choose a tag to compare

[0.4.0] - 2023-05-08

Changed

  • Update argument definitions across generator commands to play nicely with PromptsForMissingInput behaviour introduced in Laravel v9.49.0. (resolves #12)

Fixed

  • Ensure the configured domain path and namespace is respected by ddd:base-model and ddd:base-view-model. (resolves #13)

What's Changed

Full Changelog: v0.3.0...v0.4.0

v0.3.0

24 Mar 00:07
c51feca
Compare
Choose a tag to compare

[0.3.0] - 2023-03-23

Added

  • Increase test coverage to ensure expected namespaces are present in generated objects.

Changed

  • Domain generator commands will infer the root domain namespace based on the configured ddd.paths.domains.
  • Change the default domain path in config to src/Domain (was previously src/Domains), thereby generating objects with the singular Domain root namespace. (resolves #9)

What's Changed

  • 9 when configuring the domains path namespaces are still using domains by @JasperTey in #10

Full Changelog: v0.2.0...v0.3.0