Deprecate DateTimePlugs::DATE_RFC7231 constant

Created on 16 October 2020, about 4 years ago
Updated 3 March 2023, over 1 year ago

Problem/Motivation

A happy follow up to #1918820: HTTP header date formats . Some time after that I realized php still hadn't added this constant and I opened up this issue with php https://bugs.php.net/bug.php?id=74080 and it was pretty quickly fixed and made it into the 7.0.19 and 7.1.5 releases!

Now that Drupal 9 requires modern versions of PHP (>=7.3) this constant is no longer required. Yay! One more tiny backwards compatibility fix we can deprecate and remove!

Steps to reproduce

https://www.php.net/manual/en/class.datetimeinterface.php#datetime.const...

Proposed resolution

Deprecate and remove in 10.

Remaining tasks

User interface changes

n/a

API changes

deprecation.

Data model changes

n/a

Release notes snippet

📌 Task
Status

Needs work

Version

10.1

Component
Base 

Last updated 15 minutes ago

Created by

🇺🇸United States neclimdul Houston, TX

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    Seems like a valid thing, maybe even more for php8+

    Tagging for framework manager for their thoughts?

    Also not positive this will need a test or not.

  • Status changed to Needs work almost 2 years ago
  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇮🇳India pooja saraah Chennai

    Fixed failed commands on #2
    Attached patch against Drupal 10.1.x
    Attached reroll patch

  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
  • Status changed to Needs review almost 2 years ago
  • 🇺🇸United States neclimdul Houston, TX

    Link needs to point to a change record not the issue. Doesn't make sense to write the change record until the Framework Review has happened. So back to NR for the patch in #2.

  • Status changed to Needs work almost 2 years ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review almost 2 years ago
  • 🇫🇷France nod_ Lille

    Now the tag should work, sorry for the noise.

  • 🇮🇳India Nitin shrivastava

    Fix command failures in #10

  • Status changed to Needs work over 1 year ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
    +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
    @@ -49,8 +49,15 @@ class DateTimePlus {
    +   * @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0.
    

    This will need updating now

    We also need to check we're not using it anywhere in core

  • 🇮🇳India Yogesh Sahu

    done changes as mentioned on #19

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Removing credit for #20 as it removed the deprecation

    @larowlan these are the instances it's used so they will have to be updated too.

    Since we are deprecating will need a change record too

Production build 0.71.5 2024