Releases: lunarstorm/laravel-ddd
Releases · lunarstorm/laravel-ddd
v0.9.0
[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
[0.8.1] - 2023-12-05
Chore
- Update dependencies.
What's Changed
- Update dependencies, namely larastan. by @JasperTey in #36
Full Changelog: v0.8.0...v0.8.1
v0.8.0
[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 publishedmodel.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 usingclass_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 toApp\Models\NonExistentModel
orIlluminate\Database\Eloquent\NonExistentModel
, they fall outside of the domain namespace and will not be generated for you.
- If the configured
Fixed
- Resolve long-standing issue where
ddd:model
would not properly detect whether the configuredddd.base_model
already exists, leading to unintended results.
Chore
- Update composer dependencies.
What's Changed
- Fix custom base model support by @JasperTey in #35
Full Changelog: v0.7.0...v0.8.0
v0.7.0
[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
. SpecifyingReporting/Internal
orReporting\\Internal
will also be accepted and normalized to dot notation internally. - Implement abstract
Lunarstorm\LaravelDDD\Factories\DomainFactory
extension ofIlluminate\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 toDatabase\Factories\Reporting\Internal\InvoiceReportFactory
.
- Implements
Changed
- Default base model implementation in
base-model.php.stub
now usesDomainFactory::factoryForModel()
inside thenewFactory
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; seebase-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
[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
- 26 domain factories need model property by @JasperTey in #27
- Normalize factory class names by @JasperTey in #28
Full Changelog: v0.6.0...v0.6.1
v0.6.0
[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
- Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in #24
- Generate model factories by @JasperTey in #25
Full Changelog: v0.5.1...v0.6.0
v0.5.1
[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
- Minor cleanups by @JasperTey in #23
Full Changelog: v0.5.0...v0.5.1
v0.5.0
[0.5.0] - 2023-06-14
Added
- Ability to generate actions (
ddd:action
), which by default generates an action class based on thelorisleiva/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
- Bump aglipanci/laravel-pint-action from 2.2.0 to 2.3.0 by @dependabot in #17
- Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in #18
- Implement
ddd:action
generator. by @JasperTey in #20
Full Changelog: v0.4.0...v0.5.0
v0.4.0
[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
andddd:base-view-model
. (resolves #13)
What's Changed
- Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in #11
- 0.4.0 by @JasperTey in #16
Full Changelog: v0.3.0...v0.4.0
v0.3.0
[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 previouslysrc/Domains
), thereby generating objects with the singularDomain
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