-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
#6131 #6196
#6131 #6196
Conversation
Would you help add some unit tests? |
Do you have any naming convetion ? maybe $result could be better here. |
Yes, |
Isn't this change breaking BC? What am I missing? |
I think it is. |
I think we can take this change because the existing code turns |
Technically it is valid in HTML5 but it's not a good practice because of JS and CSS issues with such IDs. Agree that it's more like a fix. |
but if it is valid in HTML5 it generated valid ids before so changing it may break code that was relying on the ids... |
Any suggestion? Or perhaps we can let it slip in the release since it's very unlikely that someone would use such IDs... |
Also |
Why it replaces |
Yes, it could. |
I written before I not sure how to make this. I just needed a tool to make IDs from long names in my custom widgets. There is Html::getInputId, but it accepts $model+$attribute so I can not use a ready $name to get $id. For me it is enough just to have separated function which not depend on a model. camel2id seems to be ok too, but now I not sure what and how other invalid chars must be replaced, and more matters is that Post[1] is not camel, so even function name will be wrong... |
btw, what is BC? :) |
BC means backwards compatibility. |
thnx Alex! :) what about to introduce name2camel()? |
Should not |
Changes Unknown when pulling c27a5f7 on flyiing:6131-dumb into * on yiisoft:master*. |
Seems to be outdated. Agreed with @klimov-paul |
Closes #6131