Create enums for RequirementSeverity and deprecate drupal_requirements_severity() constants

Created on 26 December 2023, 12 months ago
Updated 25 February 2024, 10 months ago

Problem/Motivation

Split out from πŸ“Œ Add value objects to represent the return of hook_requirements Needs review we should create enums for RequirementSeverity as a first step. We can deprecate drupal_requirements_severity() and move this to the enum.

Steps to reproduce

Proposed resolution

  • Create enum for RequirementSeverity and deprecate constants.
  • Deprecate drupal_requirements_severity() and moving this to the enum.

Remaining tasks

  • Handle BC for contrib modules that will still be using constants.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 6 days ago

No maintainer
Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kim.pepper
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia
  • Status changed to Needs review 12 months ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Created a MR, but I know there will be test fails. I think the biggest issue is going to be BC support and converting from int values stored in config.

  • Pipeline finished with Failed
    12 months ago
    Total: 603s
    #68526
  • Pipeline finished with Canceled
    12 months ago
    Total: 574s
    #68541
  • Pipeline finished with Failed
    12 months ago
    Total: 515s
    #68546
  • Pipeline finished with Success
    12 months ago
    Total: 714s
    #68556
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Remaining tasks:

    • Handle BC for contrib modules that will still be using constants.
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    I think this issue is big enough without trying to introduce enums for RequirementPhase at the same time.

    Also adding that we are deprecating drupal_requirements_severity() and moving this to the enum.

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Can we add a simple deprecation test to make sure the current constants are returning a deprecation warning.

  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Yeah, I think we need tests to make sure the BC layer works when using those constants.

  • Pipeline finished with Success
    12 months ago
    Total: 635s
    #70838
  • Pipeline finished with Success
    12 months ago
    Total: 737s
    #70846
  • Status changed to Needs review 12 months ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Added a bc test for getMaxSeverity(). There are a few instances where we check the severity status.

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    BC tests added look great! Moving to NW for the CR.

  • Status changed to Needs review 12 months ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Updated CR

  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia
  • Pipeline finished with Success
    12 months ago
    Total: 508s
    #71928
  • Pipeline finished with Success
    12 months ago
    Total: 670s
    #71933
  • Pipeline finished with Canceled
    12 months ago
    Total: 48s
    #71969
  • Pipeline finished with Success
    12 months ago
    Total: 627s
    #71970
  • Pipeline finished with Success
    12 months ago
    Total: 627s
    #71977
  • Status changed to RTBC 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks! CR reads well.

  • Pipeline finished with Success
    12 months ago
    Total: 731s
    #73270
  • Pipeline finished with Success
    11 months ago
    Total: 650s
    #75966
  • Status changed to Needs work 11 months ago
  • The Needs Review Queue Bot β†’ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Status changed to RTBC 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Rebase on 11.x

  • Pipeline finished with Success
    11 months ago
    Total: 852s
    #80486
  • Pipeline finished with Canceled
    11 months ago
    Total: 246s
    #85196
  • Pipeline finished with Failed
    11 months ago
    Total: 563s
    #85205
  • Pipeline finished with Success
    11 months ago
    Total: 562s
    #85229
  • Status changed to Needs work 10 months ago
  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    Posted a lengthy review.

  • Pipeline finished with Success
    10 months ago
    Total: 481s
    #98211
  • Status changed to Needs review 10 months ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia
  • Pipeline finished with Failed
    10 months ago
    Total: 507s
    #98363
  • Status changed to Needs work 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
        There was 1 error:
        
        1)
        Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest::testRequirements
        Behat\Mink\Exception\ResponseTextException: The text "This is a
        requirements warning provided by the update_script_test module." was not
        found anywhere in the text of the current page.
        
        /builds/issue/drupal-3410938/vendor/behat/mink/src/WebAssert.php:907
        /builds/issue/drupal-3410938/vendor/behat/mink/src/WebAssert.php:293
        /builds/issue/drupal-3410938/core/tests/Drupal/Tests/WebAssert.php:956
        /builds/issue/drupal-3410938/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php:150
        /builds/issue/drupal-3410938/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
  • Pipeline finished with Failed
    10 months ago
    Total: 571s
    #99835
  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    Added further feedback, tests still failing.

  • Pipeline finished with Canceled
    9 months ago
    Total: 286s
    #116045
  • Pipeline finished with Failed
    9 months ago
    Total: 489s
    #116049
  • Pipeline finished with Failed
    8 months ago
    Total: 195s
    #141208
Production build 0.71.5 2024