v1.2.0
🔥 1.2 is a major update with several new features and breaking changes (for some). Use php artisan ddd:config update to rebuild your existing config file according to the latest version, and be sure to review the Upgrade Guide for full details about upgrading from 1.1.x.
[1.2.0] - 2024-11-23
Breaking
- Stubs are now published to
base_path('stubs/ddd')instead ofresource_path('stubs/ddd'). In other words, they are now co-located alongside the framework's published stubs, within a ddd subfolder. - Published stubs now use
.stubextension instead of.php.stub(following Laravel's convention). - If you are using published stubs from pre 1.2, you will need to refactor your stubs accordingly.
Added
- Support for the Application Layer, to generate domain-specific objects that don't belong directly in the domain layer:
// In config/ddd.php 'application_path' => 'app/Modules', 'application_namespace' => 'App\Modules', 'application_objects' => [ 'controller', 'request', 'middleware', ],
- Support for Custom Layers, additional top-level namespaces of your choosing, such as
Infrastructure,Integrations, etc.:// In config/ddd.php 'layers' => [ 'Infrastructure' => 'src/Infrastructure', ],
- Added config utility command
ddd:configto help manage the package's configuration over time. - Added stub utility command
ddd:stubto publish one or more stubs selectively. - Added
ddd:controllerto generate domain-specific controllers. - Added
ddd:requestto generate domain-spefic requests. - Added
ddd:middlewareto generate domain-specific middleware. - Added
ddd:migrationto generate domain migrations. - Added
ddd:seederto generate domain seeders. - Added
ddd:stubto manage stubs. - Migration folders across domains will be registered and scanned when running
php artisan migrate, in addition to the standard applicationdatabase/migrationspath. - Ability to customize generator object naming conventions with your own logic using
DDD::resolveObjectSchemaUsing().
Changed
ddd:modelnow extends Laravel's nativemake:modeland inherits all standard options:--migration|-m--factory|-f--seed|-s--controller --resource --requests|-crR--policy-mfsc--all|-a--pivot|-p
ddd:cacheis nowddd:optimize(ddd:cacheis still available as an alias).- Since Laravel 11.27.1, the framework's
optimizeandoptimize:clearcommands will automatically invokeddd:optimize(ddd:cache) andddd:clearrespectively.
Deprecated
- Domain base models are no longer required by default, and
config('ddd.base_model')is nownullby default. - Stubs are no longer published via
php artisan vendor:publish --tag="ddd-stubs". Instead, usephp artisan ddd:stubto manage them.
What's Changed
- [1.2] Official Release by @jaspertey in #77
- Release 1.2 by @jaspertey in #81
Full Changelog: v1.1.3...v1.2.0