-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: forbid single words as cell name input in make:cell
#7479
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
fix: forbid single words as cell name input in make:cell
#7479
Conversation
|
This seems like the wrong fix, honestly. This is why originally the intent was to have either the class with I know we had a cleanup recently that I didn't get a chance to look into, but if it removed the appending from either one then that should be fixed so that one or the other gets something appended. |
|
The recent fix is #7392 @lonnieezell Do you mean the original intent is like this?
It seems to be confusing. The current naming rule is already complicated and I personally would like to see them simplified.
or
or
|
|
The original intent was, I believe: Controller: BlogCell.php It's nice and simple, matches what we have a tendency to do elsewhere (view is lowercased, class has function attached, like UserModel or UserController). |
|
If we follow the following rule (it is valid in the current implementation), Controller: BlogCell.php @lonnieezell |
|
The appending of the |
That's the way I would handle it, yes.
While I understand what you're saying I think it's a better experience to automatically add it then to throw and error and make them try again. |
|
@lonnieezell If I understand correctly, the specification would be: $ php spark make:cell BlogCell
File created: APPPATH . 'Cells/BlogCell.php'
File created: APPPATH . 'Cells/blog.php'
$ php spark make:cell Another
File created: APPPATH . 'Cells/AnotherCell.php'
File created: APPPATH . 'Cells/another.php'
|
|
@paulbalandan Correct. |
Description
Fixes #7472
Checklist: