This issue has been left open to track the related issue but we should be handling these types of issue on per change record basis not a per file basis. Thanks for everyone who has worked on this issue so far! Any help on this follow ups would be great!
These are issue that have created instead of this issue:
- #2920000: Add Change record to @deprecated for TranslationManager->formatPlural() change
- #2920003: Add Change record to @deprecated for redirect.destination service
- #2920005: Add Change record to @deprecated for email-validator service
- #2920008: Add Change record to @deprecated for UrlHelper::stripDangerousProtocols()
- #2920009: Add Change record to @deprecated for Date format changes
- #2920010: Add Change record to @deprecated for AssetCollectionOptimizerInterface::getAll() and ::deleteAll()
- #2920012: Add Change record to all code @deprecated for hook_element_info() is replaced by annotated classes
- #2920014: Add Change record to @deprecated for Renderer service wrappers
- #2920015: Add change record to @deprecated for drupal_render_children()
- #2920018: Add Change record to @deprecated for element_info service
(you can also see these in the "referenced by sidebar)
To learn how to handle these issues and find more like them see the parent issue #2873705: Add change records to all @deprecated code
See #37 and #38 for more info
Original Report
There are 13 deprecations in this file. 6 were already resolved and the 7 remaining were added as part of DrupalCon Vienna 2017 Sprints. For this, several change records were created/updated which need to be reviewed and published before committing the patch.
This is a summary of the deprecations and the change notices:
Deprecated code | Change record | Current status |
---|---|---|
const LOCALE_PLURAL_DELIMITER | https://www.drupal.org/node/2571563 | Published |
function drupal_get_destination() | https://www.drupal.org/node/2448603 | Published |
function valid_email_address() | https://www.drupal.org/node/2912661 | Draft |
function check_url() | https://www.drupal.org/node/2560027 | Published |
function format_date() | https://www.drupal.org/node/1876852 | Published |
function drupal_clear_css_cache() | https://www.drupal.org/node/2317841 | Published |
function drupal_clear_js_cache() | https://www.drupal.org/node/2317841 | Published |
function drupal_pre_render_link() | https://www.drupal.org/node/2912702 | Draft |
function drupal_render_root() | https://www.drupal.org/node/2912696 | Draft |
function drupal_render() | https://www.drupal.org/node/2912696 | Draft |
function drupal_render_children() | https://www.drupal.org/node/2912757 | Draft |
function element_info() | https://www.drupal.org/node/2235461 | Published - Updated at sprint |
function element_info_property() | https://www.drupal.org/node/2235461 | Published - Updated at sprint |
Comment | File | Size | Author |
---|
Comments
Comment #2
kwhiteComment #3
kwhiteI was only successful finding change records for 6 of the 13 deprecated tags in this file, so there's still work to be done. But here's a preliminary patch.
Comment #4
kwhiteComment #5
sorabh.v6Comment #6
sorabh.v6Hi @kwhite, I reviewed patch file provided in #4. Many of the @deprecated has been linked to appropriate change record. But there are still some @deprecated which need to be linked to @see. Lines with @deprecated which doesn't have @see are 181, 759, 864, 876, 898, 1014, 1032.
Thanks for the patch file.
Comment #7
Mile23Correct.
Correct.
Correct.
Correct.
Correct.
Correct.
That still leaves:
Comment #9
davemckain CreditAttribution: davemckain commentedI shall have a wee look at this during the DrupalCon Vienna2017 code sprint. I'll be looking at valid_email_address() first.
I couldn't find a change record for this one, so have drafted a new one: https://www.drupal.org/node/2912661. Someone who knows about things will need to fix this, as I'm not totally confident I know what I am doing :-)
Comment #10
JO0st CreditAttribution: JO0st commentedI will work on the drupal_pre_render_link during drupalcon vienna
Comment #11
Janec CreditAttribution: Janec commentedHi, I'm in Vienna I'll try "Retrieves the default properties for the defined element type." @line 1009
Comment #12
jyraya CreditAttribution: jyraya at European Commission and European Union Institutions, Agencies and Bodies commentedHi, I am in Vienna too and I'll work on the method "element_info_property"
Comment #13
billywardrop CreditAttribution: billywardrop as a volunteer commentedI will work on drupal_render_root()
Comment #14
jyraya CreditAttribution: jyraya at European Commission and European Union Institutions, Agencies and Bodies commentedI've just put the patch for the "element_info" method instead of element_info_property as discussed with @janec and @dinarcon.
So, element_info_property is still to do
Comment #15
sthomps5 CreditAttribution: sthomps5 commenteddrupal_render() - I am working on this. Vienna2017
Comment #16
davemckain CreditAttribution: davemckain commentedI've created a patch to valid_email_address() that adds in the missing @see reference to the newly created Change Record for this. (See #9 for background.)
Comment #17
billywardrop CreditAttribution: billywardrop as a volunteer commentedThe change for the function drupal_render_root() happened in #2346937-38: Implement a Renderer service; reduces drupal_render / _theme service container calls and no change record was created. I draft a change record for this.
Comment #18
JO0st CreditAttribution: JO0st commentedThe function pre_render_link changed in #2305839: Convert hook_element_info() to annotated classes. The change record attached to it doesn't contain the information about pre_render_link. I will create a new one for it.
Comment #19
billywardrop CreditAttribution: billywardrop as a volunteer commentedI couldn't find a change record for drupal_render_root(), so I have drafted a new one: https://www.drupal.org/node/2912696
Comment #20
anyaabchiche CreditAttribution: anyaabchiche commentedHi, I am at DrupalCon sprints.
I reviewed the last patch, and it does not include the changes made in the patch number 14.
Comment #21
davemckain CreditAttribution: davemckain commentedSorry about that! Here's the new patch including all of the previous ones.
Comment #22
davemckain CreditAttribution: davemckain commentedI am going to look at drupal_render_children() next. That's the last one to be done here.
Comment #23
JO0st CreditAttribution: JO0st commentedThese are the changes added records for the pre_render_link
Comment #24
Janec CreditAttribution: Janec commentedpatch for element_info_property
Comment #25
sthomps5 CreditAttribution: sthomps5 commenteddrupal_render_root() change record updated to include drupal_root(). After discussion, the change is similar and happens in the same commit (da8ea3bfaa86cae97d5765968f696875c259f137).
https://www.drupal.org/node/2912696
Comment #26
sthomps5 CreditAttribution: sthomps5 commentedPatch for drupal_render().
Comment #27
billywardrop CreditAttribution: billywardrop as a volunteer commentedI have created the patch for drupal_render_root()
Comment #28
anyaabchiche CreditAttribution: anyaabchiche commentedThere was a mistake on the change record: https://www.drupal.org/node/2912696, I have just fixed it.
Comment #29
Mile23Generally, you want to include all changes in one patch, so that one person can submit it, and another person can review it. Set the issue status to 'Needs Review' and it will run the tests against the patch you've submitted.
Comment #30
anyaabchiche CreditAttribution: anyaabchiche commentedThere was a mistake on the change record: https://www.drupal.org/node/2235461
I have fixed it.
Comment #31
dinarcon CreditAttribution: dinarcon at Agaric commentedHi @Mile23,
Totally agree. Sorry for the noise here. We are creating individual patches for each function so each sprinter gets acquainted with the process of working on issues and creating patches. We are also peer reviewing each other's work.
Comment #32
mairi CreditAttribution: mairi commentedI have created the patch for drupal_render_children() and the change record is https://www.drupal.org/node/2912757.
Comment #33
mairi CreditAttribution: mairi commentedComment #34
dinarcon CreditAttribution: dinarcon at Agaric commentedAt DrupalCon Vienna 2017, I mentored a group of sprinters who worked collaboratively on this issue:
@mairi, @billywardrop, @sthomps5, @Janec, @JO0st, @davemckain, and @davemckain investigated if changed records already existed and created/updated ones as appropriate.
@anyaabchiche did patch reviews and updated changes records.
Comment #35
dinarcon CreditAttribution: dinarcon at Agaric commentedUpdating issue summary.
Comment #36
dinarcon CreditAttribution: dinarcon at Agaric commentedComment #37
xjmAmazing work on this, everyone! The research in the summary is very helpful and this issue is a big step for our update documentation and the smoother upgrade path.
In order to add these changes, let's create child issues for each of the change records in the summary here, and each child issue can also check for other places in core that also need to mention each change record. This is important to make sure we have complete scope for each change record (so someone doesn't have to repeat the research again for things related to these change records in different files). (@tedbow and I will help with this.)
Meanwhile, adding issue credit here for everyone who helped work on this at Vienna. We'll also make sure everyone is credited on the child issues.
Comment #38
tedbow@xjm thanks for the explanation here!
I created the new issues. There were 10. I made did make them childs of #2873705: Add change records to all @deprecated code directly though. I hope that was ok.
I added a reference this issue in all of the new issues so you can see them in the sidebar here under "Referenced by"
In each new issue in the summary you will find a reference to related change record.
Remember #2873705: Add change records to all @deprecated code gives very detailed instructions on how to handle these issues. So it is probably a good idea to read that over if you have not.
Thanks to everyone for identifying these changes
@deprecated
tags and as needing the change record links!Comment #39
tedbowComment #40
xjmI added all the contributors from this issue to #2920018: Add Change record to @deprecated for element_info service for issue credit. :)
Let's keep this one open for now as a plan issue, so that contributors can follow the progress on the child issues.
Comment #41
tedbowComment #44
benjifisherI am very confused. :-(
According to the table in the issue summary, the deprecated const LOCALE_PLURAL_DELIMITER is covered by the change record TranslationManager->formatPlural() returns a PluralTranslatableMarkup. Two problems:
There is so much wrong here that I am afraid, in my confusion, to try and fix it.
The change records says,
What am I missing? We are being consistent by returning two different classes from the same method? Or are we changing from TranslatableMarkup to PluralTranslatableMarkup to be consistent with something else? If so, consistent with what?
Furthermore, the changes to TranslationManager.php for that issue do not involve the
formatPlural()
method, and those changes do not include the string (case insensitive search) "formatPlural".Maybe what the change record means is that, after #2570107: Make format_plural() return a PluralTranslatableString object to remove reliance on a static, unpredictable safe list,
formatPlural()
returned PluralTranslatableString, and then #2576533: Rename SafeStringInterface to MarkupInterface and move related classes changed the name of that class to PluralTranslatableMarkup (although the issue summary does not mention that). The change record does list both of those issues, but they are not mentioned in its description.Finally, #2570107: Make format_plural() return a PluralTranslatableString object to remove reliance on a static, unpredictable safe list is the issue in which LOCALE_PLURAL_DELIMITER was marked as deprecated, even though the change record does not mention this.
I am feeling less confused than when I started writing this comment. I am still hesitant to make changes, but I think this is what is needed:
The update of #2576533 should review all the classes involved in the renaming. If one was left out, then I am suspicious of the entire list.
Comment #45
andypostFiled #3029336: Properly deprecate check_url()
Comment #50
andypostComment #51
andypostChecked at least
common.inc
and after 9.0 all deprecated been removed