Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0 #46

Merged
merged 35 commits into from
Mar 31, 2024
Merged

v1.0 #46

merged 35 commits into from
Mar 31, 2024

Conversation

jaspertey
Copy link
Member

@jaspertey jaspertey commented Mar 25, 2024

This is the v1.0 draft in progress on the next branch.

To install:

composer require lunarstorm/laravel-ddd:dev-next

Changelog so far

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
  • 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.

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.
  • Improved the reliability of generating base view models when ddd.base_view_model is something other than the default Domain\Shared\ViewModels\ViewModel. (resolves [1.x] Fix Base Models #50)
  • Domain factories are now generated inside the domain layer under the configured factory namespace ddd.namespaces.factory (default Database\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.

jaspertey and others added 28 commits March 23, 2024 19:15
[1.x] Refactor and expand generator commands
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.6.0 to 2.0.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](dependabot/fetch-metadata@v1.6.0...v2.0.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
* Use Laravel Prompts for domain input prompt.

* Add version matrix to readme.
@pelmered
Copy link
Contributor

Looks great!

When do you plan to release this?

@jaspertey
Copy link
Member Author

Looks great!

When do you plan to release this?

By end of this week or earlier. Maybe a few more minor cleanups to the internals, and test driving it in a couple of apps throughout the week to make sure things are seamless.

@jaspertey jaspertey marked this pull request as ready for review March 31, 2024 00:35
@jaspertey jaspertey merged commit de613d9 into main Mar 31, 2024
21 checks passed
@jaspertey jaspertey deleted the next branch March 31, 2024 00:43
@jaspertey jaspertey restored the next branch March 31, 2024 00:50
@jaspertey jaspertey deleted the next branch March 31, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[1.x] Fix Base Models
2 participants