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

Add The Ability to Disable Kebab Casing #58

Closed
wants to merge 6 commits into from

Conversation

onairmarc
Copy link

This PR adds the ability for users of this package to disable kebab casing.

@onairmarc
Copy link
Author

@inxilpro for some reason, the last 9 workflows are still pending. Not exactly sure why. I didn't know GitHub had different run groups for GHA. 🤷🏻‍♂️

@inxilpro
Copy link
Contributor

OK. I reverted the whitespace changes, but now that I look the PR I have some concerns. Before I bring them up, though, what are you hoping to achieve with this? Do you prefer a different casing standard, other than kebab? Or do you actually have a scenario where you would like whatever is passed to the command?

I think the better way to approach this would be to introduce a config variable that defaults to kebab but accepts studly and camel and snake as options. That way if you prefer studly case, you can configure it once. Would that suit your needs?

@inxilpro
Copy link
Contributor

I updated the PR to allow for more naming configurations, but I'm not 100% sure you would want to do this… If you browse the first 10-15 pages of Packagist's most popular packages there isn't a single one that's camel- or studly-cased (and only a couple that are snake-case).

@onairmarc
Copy link
Author

For the purposes of external packages, yes, I'd agree that kebab case would more than likely be the go-to for package naming. However, the make:module command is also generating directories in kebab case which is what this PR aims to allow the user to disable.

@inxilpro
Copy link
Contributor

However, the make:module command is also generating directories in kebab case which is what this PR aims to allow the user to disable.

So, given a module called "Shopping Cart" and a company named "Galactic Empire" would your preference be:

  • path: Modules/shoppingCart
  • composer name: galactic-empire/shopping-cart
  • namespace: GalacticEmpire\ShoppingCart

?

@onairmarc
Copy link
Author

OK. I reverted the whitespace changes, but now that I look the PR I have some concerns. Before I bring them up, though, what are you hoping to achieve with this? Do you prefer a different casing standard, other than kebab? Or do you actually have a scenario where you would like whatever is passed to the command?

I think the better way to approach this would be to introduce a config variable that defaults to kebab but accepts studly and camel and snake as options. That way if you prefer studly case, you can configure it once. Would that suit your needs?

I think this is a much better solution than the one I submitted!

@onairmarc
Copy link
Author

onairmarc commented Dec 18, 2023

However, the make:module command is also generating directories in kebab case which is what this PR aims to allow the user to disable.

So, given a module called "Shopping Cart" and a company named "Galactic Empire" would your preference be:

  • path: Modules/shoppingCart
  • composer name: galactic-empire/shopping-cart
  • namespace: GalacticEmpire\ShoppingCart

?

Path: Modules/ShoppingCart
Composer Name: galacticempire/shoppingcart
Namespace: GalacticEmpire\ShoppingCart

@onairmarc
Copy link
Author

@inxilpro is there any movement on this? Is there anything I can do to help get this into a mergable state?

@onairmarc onairmarc closed this Jan 29, 2024
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.

2 participants