pestle
pestle copied to clipboard
Add support for nested directories in CRUD model generation
Hey Alan!
I've been using pestle for a few days now and it's wonderful.
A feature I would love to have is the ability to use pestle magento2:generate:crud_model
with Thing/OtherThing
as the model argument.
It's sort of working as is, but requires a few manual changes to the created files. I could try and tackle it myself if you're okay with that at this stage of the development.
@adamonsoon Good catch! A pul request would be super welcome! Any time frame on when you think you can get it done, or is this more a "when I can snatch a free moment" sort of thing?
@astorm, I'll probably have some time on the weekend.
At first glance it looks like adding a modified version of getModelInterfaceShortName
(and possibly others) which replaces forward slashes with back slashes could ~~do the trick~~ edit: be one of the required changes, now that I've looked at it a bit more closely.
@adamonsoon Did you manage to steal some time to work on this last weekend? If not, do you mind if I tackle it this week?
@astorm, I ended up getting sick and not doing much of anything. I don't mind if you tackle it. I'll submit a pull request with some other minor issues I've found when generating grid/form ui.
Boooooooo germs. Hope you're feeling better soon!
@adamonsoon Looks like I won't be able to get to this in this sprint -- it's a little trickier to implement that I thought (paths, namespace paths, etc. oh my!) so for this release I've added some validation code to pestle doesn't product invalid class file names
Still totally open to the idea of Thing/OtherThing
created a model in a nest folder with an appropriate PHP namespace/classname. Happy to accept any pull requests along those line. Leaving issue open, detaching from this week's milestone.