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 InputWidget::createInputField() #14441

Merged
merged 2 commits into from
Jul 13, 2017
Merged

Add InputWidget::createInputField() #14441

merged 2 commits into from
Jul 13, 2017

Conversation

cebe
Copy link
Member

@cebe cebe commented Jul 12, 2017

to implement behavior described in class docs directly in the class
itself instead of relying on subclasses to respect the description.

fixes #14294

Q A
Is bugfix? no
New feature? yes
Breaks BC? no
Tests pass? yes
Fixed issues #14294

@cebe cebe added this to the 2.0.13 milestone Jul 12, 2017
* @see Html::activeInput()
* @see Html::input()
*/
protected function createInputField($type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this ambigious as it renders a HTML tag and not actually creating a Field? Perhabs a better name is renderInput()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@cebe cebe force-pushed the input-widget branch 2 times, most recently from 4ef72d5 to 23a850b Compare July 13, 2017 10:16
to implement behavior described in class docs directly in the class
itself instead of relying on subclasses to respect the description.

fixes yiisoft#14294
@samdark samdark merged commit a5b393a into yiisoft:master Jul 13, 2017
@samdark
Copy link
Member

samdark commented Jul 13, 2017

Merged. Good one.

@SilverFire
Copy link
Member

SilverFire commented Jul 13, 2017

Introducing InputWidget::renderInput() with $type as a required parameter causes declaration compatibility exceptions in PHP 7+ since the method name is common and was used by other developers in their extensions.

In my projects this change affected at least three widgets:

hiqdev/yii2-combo@af68b15
https://github.com/kartik-v/yii2-widget-datepicker/blob/master/DatePicker.php#L297
https://github.com/omnilight/yii2-bootstrap-daterangepicker/blob/master/DateRangePicker.php#L114

@SilverFire SilverFire added the severity:BC breaking Either breaks backwards compatibility or fixed previously made breakage label Jul 13, 2017
@cebe
Copy link
Member Author

cebe commented Jul 13, 2017

Ooops ... @SilverFire can you open an issue?

@cebe
Copy link
Member Author

cebe commented Jul 13, 2017

reopened #14294 (comment)

SilverFire added a commit that referenced this pull request Jul 13, 2017
…vior described in `InputWidget` class docs to the class itself"

This reverts commit a5b393a.

See #14441 (comment) for reasons
qiangxue pushed a commit to yiisoft/yii2-framework that referenced this pull request Jul 13, 2017
…vior described in `InputWidget` class docs to the class itself"

This reverts commit a5b393a3c101bebeb0c60aac4e11d5a7c6dd8244.

See yiisoft/yii2#14441 (comment) for reasons
@cebe cebe deleted the input-widget branch September 11, 2017 16:19
hiqsol pushed a commit to yiisoft/cache that referenced this pull request Jul 14, 2018
…vior described in `InputWidget` class docs to the class itself"

This reverts commit a5b393a3c101bebeb0c60aac4e11d5a7c6dd8244.

See yiisoft/yii2#14441 (comment) for reasons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:BC breaking Either breaks backwards compatibility or fixed previously made breakage type:enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error in InputWidget's phpdoc?
4 participants