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

[1.2] ddd:model options, migrations, application layer #69

Merged
merged 37 commits into from
Oct 22, 2024
Merged

Conversation

jaspertey
Copy link
Member

@jaspertey jaspertey commented Oct 14, 2024

Added

  • Experimental: Ability to configure the Application Layer, to generate domain objects that don't typically belong inside the domain layer.
    // In config/ddd.php
    'application' => [
        'path' => 'app/Modules',
        'namespace' => 'App\Modules',
        'objects' => [
            'controller',
            'request',
            'middleware',
        ],
    ],
  • Added ddd:controller to generate domain-specific controllers in the application layer.
  • Added ddd:request to generate domain-spefic requests in the application layer.
  • Added ddd:middleware to generate domain-specific middleware in the application layer.
  • Added ddd:migration to generate domain migrations.
  • Added ddd:seeder to generate domain seeders.
  • Migration folders across domains will be registered and scanned when running php artisan migrate, in addition to the standard application database/migrations path.

Changed

  • ddd:model now internally extends Laravel's native make:model and inherits all standard options:
    • --migration|-m
    • --factory|-f
    • --seed|-s
    • --controller --resource --requests|-crR
    • --policy
    • -mfsc
    • --all|-a
    • --pivot|-p
  • ddd:cache is now ddd:optimize (ddd:cache is still available as an alias).
  • For Laravel 11.27.1+, the framework's optimize and optimize:clear commands will automatically invoke ddd:optimize and ddd:clear respectively.

Deprecated

  • Domain base models are no longer required by default, and config('ddd.base_model') is now null by default.

@jaspertey jaspertey marked this pull request as ready for review October 15, 2024 01:45
@jaspertey jaspertey changed the title [1.2] ddd:model options, migrations, interaction with application layer [1.2] ddd:model options, migrations, application layer Oct 15, 2024
@jaspertey jaspertey changed the base branch from main to next October 22, 2024 12:38
@jaspertey jaspertey merged commit c944c79 into next Oct 22, 2024
23 checks passed
@jaspertey jaspertey deleted the develop-next branch October 22, 2024 12:43
@jaspertey jaspertey mentioned this pull request Oct 22, 2024
1 task
jaspertey added a commit that referenced this pull request Nov 23, 2024
* [1.2] ddd:model options, migrations, application layer (#69)
* [1.2] Refactoring stubs (#71)
* [1.2] Custom Layers (#76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant