yii2-gii: Wrong capitals for class/files when table is uppercase
What steps will reproduce the problem?
yiisoft/yii2-gii uses BaseInflector::id2camel() to generate class names but, when getting upper case table names from db like MY_TABLE, id2camel() does not work properly.
If it is ok, I could do a PR removing id2camel() and doing an inline conversion inside Generator::generateClassNames().
What is the expected result?
'MY_TABLE' --> MyTable
What do you get instead?
'MY_TABLE' --> MYTABLE
Additional info
| Q | A |
|---|---|
| Yii version | 2.0.15.1 |
| PHP version | 7.1.17 |
| Operating system | Win10 |
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (21 by maintainers)
Yeah, I am on it. I would already do but i had no time this weekend. I’ll do this week. 👍
Just tested here breaking it in parts:
Result: