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

[Feature Request]: TODO list for make commands #759

Open
6 of 11 tasks
gturpin-dev opened this issue Nov 20, 2024 · 3 comments
Open
6 of 11 tasks

[Feature Request]: TODO list for make commands #759

gturpin-dev opened this issue Nov 20, 2024 · 3 comments
Assignees
Labels
Console Stewardship Maintenance of the repository CI/CD scripts, README, etc.
Milestone

Comments

@gturpin-dev
Copy link
Contributor

gturpin-dev commented Nov 20, 2024

Description

Hey @brendt This is my TODO list for future make commands that I'll work on soon
Tell me if you prefer to skip issue and make it and discord or elsewhere.
Could you assign me to this ?

Maybe you can tell me if you want some stuff in priority or if some commands seems useless for you.
I'll update this list while reading the whole docs

  • make:initializer
  • make:response
  • make:route ( for custom routes, not sure if it's helpful )
  • make:view ( maybe one command with flags to make class or class component or raw view file )
  • make:middleware ( with some flags like --http for middleware type )
  • make:config ( not sure if it's helpful, but it could create a file named xxx.config.php with the suggested name as usual and maybe return a basic config object ? ) || Or another idea could be to have a select component where user can choose the config type to create ( e.g. DatabaseConfig or EventBusConfig other config types )
  • make:migration => could create a migration class or with a flag like --raw a sql migration
  • make:command => a generator command that make another command, the circle is now complete 😄
  • make:generator-command => maybe a basic stub that follow other basic make commands using PublishesFiles and prompts
  • make:event or make:event-handler => a class with a method with the #[EventHandler] attribute
  • make:discovery => is it ready yet ?

Benefits

Keep an eye on progress of make commands 😄

@gturpin-dev gturpin-dev added Feature Request Request a feature that is not currently in the framework. Triage New issues that need to be reviewed by the Tempest team. labels Nov 20, 2024
@brendt
Copy link
Member

brendt commented Nov 20, 2024

make:route make:route ( for custom routes, not sure if it's helpful )

I don't think this is necessary atm

make:view ( maybe one command with flags to make class or class component or raw view file )

Do you intend this command to also make regular view files, or only components? I think this will be especially useful to make view components

make:middleware ( with some flags like --http for middleware type )

Hmm, a flag could work. If no flags were provided, you'd get a dropdown list. But maybe you should use an enum instead of a flag?

make:middleware [type]

make:config ( not sure if it's helpful, but it could create a file named xxx.config.php with the suggested name as usual and maybe return a basic config object ? ) || Or another idea could be to have a select component where user can choose the config type to create ( e.g. DatabaseConfig or EventBusConfig other config types )

Both are cool, I think the most useful implementation would be make:config without arguments, getting a prompt with all available configs, selecting one, and then create a default file in the right place.

make:generator-command => maybe a basic stub that follow other basic make commands using PublishesFiles and prompts

Maybe just a flag in make:command?

make:event or make:event-handler => a class with a method with the #[EventHandler] attribute

Hmm, not sure if this is really useful. By the time you've ran the command, you could have also made the class manually.

@brendt
Copy link
Member

brendt commented Nov 20, 2024

I shared some thoughts, but overall great list, I'm really excited about this! It's ok to keep it as one issue, I'd prefer separate PRs though :)

@brendt brendt added Console Stewardship Maintenance of the repository CI/CD scripts, README, etc. and removed Triage New issues that need to be reviewed by the Tempest team. Feature Request Request a feature that is not currently in the framework. labels Nov 20, 2024
@gturpin-dev
Copy link
Contributor Author

I don't think this is necessary atm

You're right, updated 😄

Do you intend this command to also make regular view files, or only components? I think this will be especially useful to make view components

Yes that was my thought when I wrote raw view file, maybe we can keep consistency with other commands, so having an Enum or a dropdown list ?

Hmm, a flag could work. If no flags were provided, you'd get a dropdown list. But maybe you should use an enum instead of a flag?
make:middleware [type]

This makes sense to me, I'd go for an enum match for the first parameter "type" and then if nothing given, we give a dropdown list.
Is this already provided by the "missing input component" when we have an enum parameter ?
Otherwise It could be a great addition 👀

Both are cool, I think the most useful implementation would be make:config without arguments, getting a prompt with all available configs, selecting one, and then create a default file in the right place.

I think it's the better choice. I'll check later but I think all config are discovered by interface or something like that, so even the select prompt could be automated 😄

Maybe just a flag in make:command?

Yeah, probably better 👌

Hmm, not sure if this is really useful. By the time you've ran the command, you could have also made the class manually.

True, same goes for command bus and other things with no boilerplate in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Console Stewardship Maintenance of the repository CI/CD scripts, README, etc.
Projects
None yet
Development

No branches or pull requests

2 participants