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

[Form] deprecate some options for single_text widgets #28721

Merged

Conversation

@xabbuh
Copy link
Member

commented Oct 4, 2018

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@xabbuh xabbuh added this to the next milestone Oct 4, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 3681b21 to 29f1daf Oct 4, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 29f1daf to 65a765e Oct 4, 2018

@HeahDude
Copy link
Member

left a comment

Nice move, I like that 👍

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch 12 times, most recently from c1bc7a2 to d10e7a7 Oct 8, 2018

fabpot added a commit that referenced this pull request Oct 10, 2018

feature #28738 [OptionsResolver] Passing Options argument to deprecat…
…ion closure (yceruto)

This PR was squashed before being merged into the 4.2-dev branch (closes #28738).

Discussion
----------

[OptionsResolver] Passing Options argument to deprecation closure

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28721 (comment)
| License       | MIT
| Doc PR        | symfony/symfony-docs#10439

As spotted here #28721, we sometimes need more advanced cases, where the deprecation of the value depends on another option:
```php
$resolver->setDeprecated('date_format', function (Options $options, $dateFormat) {
    if (null !== $options['date_format'] && 'single_text' === $options['widget']) {
         return sprintf('Using the "date_format" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2.', self::class);
    }

    return '';
});
```
There is still a decision to make:
> We're in time to change the arguments position (Options $options, $value) to be consistent with other closure signatures.

WDYT?

Commits
-------

2936051 [OptionsResolver] Passing Options argument to deprecation closure
@xabbuh

This comment has been minimized.

Copy link
Member Author

commented Oct 10, 2018

Status: Needs work

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from d10e7a7 to 11f32ca Oct 10, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 11f32ca to 3f951a5 Oct 10, 2018

@xabbuh

This comment has been minimized.

Copy link
Member Author

commented Oct 10, 2018

Status: Needs Review

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 3f951a5 to 882a4cc Oct 10, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 882a4cc to 81b3d9a Oct 22, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 81b3d9a to e9cbc61 Nov 16, 2018

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch 2 times, most recently from 241290a to 0ab3e8d Jan 2, 2019

@xabbuh

This comment has been minimized.

Copy link
Member Author

commented Jan 5, 2019

Status: Needs Review

@xabbuh xabbuh force-pushed the xabbuh:datetime-type-singletext-deprecations branch from 0ab3e8d to 89ff331 Jan 16, 2019

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Jan 27, 2019

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 89ff331 into symfony:master Jan 27, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Jan 27, 2019

feature #28721 [Form] deprecate some options for single_text widgets …
…(xabbuh)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] deprecate some options for single_text widgets

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

89ff331 deprecate some options for single_text widgets

@xabbuh xabbuh deleted the xabbuh:datetime-type-singletext-deprecations branch Jan 27, 2019

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Mar 7, 2019

minor #10982 Added a note about the deprecations of DateTimeType (jav…
…iereguiluz)

This PR was merged into the master branch.

Discussion
----------

Added a note about the deprecations of DateTimeType

Documents symfony/symfony#28721.

Commits
-------

89f0296 Added a note about the deprecations of DateTimeType

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.