-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 help deprecation #6335
Fix help deprecation #6335
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.x #6335 +/- ##
============================================
+ Coverage 77.23% 77.50% +0.26%
+ Complexity 2618 2603 -15
============================================
Files 140 142 +2
Lines 7779 7779
============================================
+ Hits 6008 6029 +21
+ Misses 1771 1750 -21
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution! There are parts I don't understand. If you are fixing many unrelated things, consider making more commits with explanations 🙏
"Fix help deprecation" does not help understanding what you are doing.
@@ -40,7 +40,7 @@ You MUST use Symfony's [`help`](https://symfony.com/doc/4.4/reference/forms/type | |||
Before: | |||
```php | |||
$formMapper | |||
->add('field', null, [ | |||
->add('field', null, [], [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! can we add both examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean addHelp
& setHelps
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I meant like:
->add('field_with_help_in_form_options', null, ['help' => '<p>...</p>'])
->add('field_with_help_in_field_description_options', null, [], ['help' => '<p>...</p>'])
The idea with the original example I wrote was showing that if the help
message contains HTML
, the user should add help_html
, so maybe I should've added two separated examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe.. But in new example we showing two moments how stop throwing deprecating notices
Thank you @kirya-dev |
/** | ||
* NEXT_MAJOR: Remove this method. | ||
* | ||
* @deprecated since sonata-project/admin-bundle 3.x and will be removed in version 4.0. Use Symfony Form "help" option instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version where this method was deprecated is already released, so "3.74" should be used instead of "3.x".
Too many deprecation notices
I am targeting this branch, because receive too many deprecation notices and in upgrades was not actual instructions.
Closes #6319.
Addition for #6215.
Changelog