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:

(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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kwhite created an issue. See original summary.

kwhite’s picture

Title: Add Change record to @deprecated for common.inc » Add Change Record to @deprecated for common.inc
kwhite’s picture

I 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.

kwhite’s picture

Status: Active » Needs review
sorabh.v6’s picture

Assigned: Unassigned » sorabh.v6
sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
Status: Needs review » Needs work

Hi @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.

Mile23’s picture

  1. +++ b/core/includes/common.inc
    @@ -129,6 +129,8 @@
    + * @see https://www.drupal.org/node/2571563
      */
     const LOCALE_PLURAL_DELIMITER = PluralTranslatableMarkup::DELIMITER;
    

    Correct.

  2. +++ b/core/includes/common.inc
    @@ -154,6 +156,8 @@
    + * @see https://www.drupal.org/node/2448603
      */
     function drupal_get_destination() {
    

    Correct.

  3. +++ b/core/includes/common.inc
    @@ -220,6 +224,8 @@ function valid_email_address($mail) {
    + * @see https://www.drupal.org/node/2560027
      */
     function check_url($uri) {
    

    Correct.

  4. +++ b/core/includes/common.inc
    @@ -318,6 +324,8 @@ function format_size($size, $langcode = NULL) {
    + * @see https://www.drupal.org/node/1876852
      */
     function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) {
    

    Correct.

  5. +++ b/core/includes/common.inc
    @@ -419,6 +427,8 @@ function base_path() {
    + * @see https://www.drupal.org/node/2317841
      */
     function drupal_clear_css_cache() {
    

    Correct.

  6. +++ b/core/includes/common.inc
    @@ -736,6 +746,8 @@ function drupal_attach_tabledrag(&$element, array $options) {
    + * @see https://www.drupal.org/node/2317841
      */
     function drupal_clear_js_cache() {
    

    Correct.

That still leaves:

  • valid_email_address()
  • drupal_pre_render_link()
  • drupal_render_root()
  • drupal_render()
  • drupal_render_children()
  • element_info()
  • element_info_property()

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

davemckain’s picture

Issue tags: +Vienna2017

I 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 :-)

JO0st’s picture

I will work on the drupal_pre_render_link during drupalcon vienna

Janec’s picture

Hi, I'm in Vienna I'll try "Retrieves the default properties for the defined element type." @line 1009

jyraya’s picture

Hi, I am in Vienna too and I'll work on the method "element_info_property"

billywardrop’s picture

I will work on drupal_render_root()

jyraya’s picture

I'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

sthomps5’s picture

drupal_render() - I am working on this. Vienna2017

davemckain’s picture

I'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.)

billywardrop’s picture

The 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.

JO0st’s picture

The 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.

billywardrop’s picture

I couldn't find a change record for drupal_render_root(), so I have drafted a new one: https://www.drupal.org/node/2912696

anyaabchiche’s picture

Hi, I am at DrupalCon sprints.

I reviewed the last patch, and it does not include the changes made in the patch number 14.

davemckain’s picture

Sorry about that! Here's the new patch including all of the previous ones.

davemckain’s picture

I am going to look at drupal_render_children() next. That's the last one to be done here.

JO0st’s picture

These are the changes added records for the pre_render_link

Janec’s picture

patch for element_info_property

sthomps5’s picture

drupal_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

sthomps5’s picture

Patch for drupal_render().

billywardrop’s picture

I have created the patch for drupal_render_root()

anyaabchiche’s picture

There was a mistake on the change record: https://www.drupal.org/node/2912696, I have just fixed it.

Mile23’s picture

Generally, 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.

anyaabchiche’s picture

There was a mistake on the change record: https://www.drupal.org/node/2235461
I have fixed it.

dinarcon’s picture

Hi @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.

mairi’s picture

I have created the patch for drupal_render_children() and the change record is https://www.drupal.org/node/2912757.

mairi’s picture

Status: Needs work » Needs review
dinarcon’s picture

Issue summary: View changes

At 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.

dinarcon’s picture

Issue summary: View changes

Updating issue summary.

dinarcon’s picture

Issue summary: View changes
xjm’s picture

Amazing 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.

tedbow’s picture

@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!

tedbow’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)
xjm’s picture

Title: Add Change Record to @deprecated for common.inc » [meta] Add Change Record to @deprecated for common.inc
Category: Task » Plan
Status: Closed (duplicate) » Active

I 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.

tedbow’s picture

Issue summary: View changes

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

benjifisher’s picture

I 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:

  1. That change record does not mention LOCALE_PLURAL_DELIMITER.
  2. That change record is wrong in several ways.

There is so much wrong here that I am afraid, in my confusion, to try and fix it.

The change records says,

In #2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list we made TranslationManager->formatPlural() return a TranslatableMarkup object. To be consistent we now return a PluralTranslatableMarkup from TranslationManager->formatPlural().

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:

  1. Rewrite the change record as described above ("what the change record means is ...").
  2. Add a paragraph to the change record about deprecating LOCALE_PLURAL_DELIMITER.
  3. Update the issue summary of #2576533 to include PluralTranslatableString -> PluralTranslatableMarkup.

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.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

andypost’s picture

andypost’s picture

Status: Active » Closed (outdated)

Checked at least common.inc and after 9.0 all deprecated been removed