Replies: 1 comment 5 replies
-
Hey Peter! Thanks for commenting... going to spill a bunch of my thoughts below:
I would like to expand the generator coverage, yes. I am also rounding the corner on a v1.0 spec, and started scribbling down a roadmap here some time back: https://github.com/orgs/lunarstorm/projects/5 - in there you'll see I've noted down some of the same items above. Now, you mentioned "controllers" - in the spirit of DDD as I understand it, controllers should be kept out of the domain's responsibility since it's part of the HTTP layer. What is your use case for needing this?
Interesting. I have thought of making the namespace configurable instead of strictly being inferred by the path. I just hadn't heard feedback from anyone who required it yet. Curious: what's your reasoning for not keeping the folder and namespace aligned?
Some of my other thoughts, and more for the v1.0+ target:
Happy to hear more thoughts. I will work on a few minor updates this weekend to address the items above. |
Beta Was this translation helpful? Give feedback.
-
First of all, thank you so much for this package. I've been looking for something more lightweight land flexible like this for generating classes with support for DDD, but not do a lot more things and force me into opinionated ways to structure my code. This looks really great! There are just some generator commands that I am missing, like jobs, commands, enums, controllers or service providers, but I guess I could extend this package myself. Or do you have plans for adding some of this? I could send PRs for that.
Now for my current main issue.
I have my Domains at
src/Domains
but the namespace is justDomain\*
. This is accomplished with this PSR-4 autoload directive:"Domain\\": "src/Domains/",
When I check in the code the namespace is just based on the configured domain path. I would like to be able to configure the namespace specifically.
I can make a PR for this if you want, but I'm not sure what the plan/purpose with the
paths
array in the config file. Why is this an array? To keep the support for setting multiple paths and have a reasonable structure of the config file, I think you have the break the backwards compatibility. For example like this in my case:This would also allow for more options here later without breaking backwards compatibility.
Let me know what you think.
Beta Was this translation helpful? Give feedback.
All reactions