v1.0.0
v1 Highlights 🚀
Updated command syntax, 16 new generator commands, and support for autoloading and auto-discovery (domain service providers, commands, policies, factories). Minimum supported Laravel version is now 10.25.
Upgrading from 0.x
Things to be aware of when upgrading from 0.x:
- If the config file was published, it should be removed, re-published, and re-configured according to the latest format. A helper command
ddd:upgrade
is available to assist with this. - If stubs were published, they should also be re-published and inspected to ensure everything is up-to-date.
- In production,
ddd:cache
should be run during the deployment process to optimize autoloading. See the Autoloading in Production section for more details.
Full change details below.
[1.0.0] - 2024-03-31
Added
ddd:list
to show a summary of current domains in the domain folder.- For all generator commands, if a domain isn't specified, prompt for it with auto-completion suggestions based on the contents of the root domain folder.
- Command aliases for some generators:
- Data Transfer Object:
ddd:dto
,ddd:data
,ddd:data-transfer-object
,ddd:datatransferobject
- Value Object:
ddd:value
,ddd:valueobject
,ddd:value-object
- View Model:
ddd:view-model
,ddd:viewmodel
- Data Transfer Object:
- Additional generators that extend Laravel's generators and funnel the generated objects into the domain layer:
ddd:cast {domain}:{name}
ddd:channel {domain}:{name}
ddd:command {domain}:{name}
ddd:enum {domain}:{name}
(Laravel 11 only)ddd:event {domain}:{name}
ddd:exception {domain}:{name}
ddd:job {domain}:{name}
ddd:listener {domain}:{name}
ddd:mail {domain}:{name}
ddd:notification {domain}:{name}
ddd:observer {domain}:{name}
ddd:policy {domain}:{name}
ddd:provider {domain}:{name}
ddd:resource {domain}:{name}
ddd:rule {domain}:{name}
ddd:scope {domain}:{name}
- Support for autoloading and discovery of domain service providers, commands, policies, and factories. (co-authored by @pelmered)
Changed
- (BREAKING) For applications that published the config prior to this release, config should be removed, re-published, and re-configured.
- (BREAKING) Generator commands no longer receive a domain argument. Instead of
ddd:action Invoicing CreateInvoice
, one of the following would be used:- Using the --domain option:
ddd:action CreateInvoice --domain=Invoicing
(this takes precedence). - Shorthand syntax:
ddd:action Invoicing:CreateInvoice
. - Or simply
ddd:action CreateInvoice
to be prompted for the domain afterwards.
- Using the --domain option:
- Improved the reliability of generating base view models when
ddd.base_view_model
is something other than the defaultDomain\Shared\ViewModels\ViewModel
. - Domain factories are now generated inside the domain layer under the configured factory namespace
ddd.namespaces.factory
(defaultDatabase\Factories
). Factories located in/database/factories/<domain>/*
(v0.x) will continue to work as a fallback when attempting to resolve a domain model's factory. - Minimum supported Laravel version is now 10.25.
Chore
- Dropped Laravel 9 support.
What's Changed
- Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0 by @dependabot in #47
- v1.0 by @JasperTey in #46
New Contributors
Full Changelog: v0.10.0...v1.0.0