Restore support for ^8 || ^9

Created on 9 July 2025, 26 days ago

Problem/Motivation

This module used to support ^8 || ^9 || ^10. Recent commits bump this to ^10.1 as the minimum version. There's no major reason why that's needed, only to get the tests passing. A little bit of jumping through hoops in DurationFieldBrowserTestBase would allow this to keep working with a wider range of core versions.

Steps to reproduce

Proposed resolution

Add another conditional check on \Drupal::VERSION in DurationFieldBrowserTestBase.
Re-expand core_version_requirement

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dww

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

Merge Requests

Comments & Activities

  • Issue created by @dww
  • Merge request !34Task #3534848 "Restore support for 8 and 9" β†’ (Merged) created by dww
  • πŸ‡ΊπŸ‡ΈUnited States dww
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    The minimum Drush version had to be lowered to to support older versions of Drupal.

    Two tests failed for me with Drupal 9.5.11, PHP 8.1, and PHPUnit 9.6.23

    There were 2 failures:
    
    1) Drupal\Tests\duration_field\Unit\Normalizer\DurationIntervalNormalizerTest::testSupportsNormalization
    Failed asserting that false is true.
    
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /var/www/html/tests/src/Unit/Normalizer/DurationIntervalNormalizerTest.php:50
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:146
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:99
    
    2) Drupal\Tests\duration_field\Unit\Normalizer\DurationIntervalNormalizerTest::testSupportsDenormalization
    Failed asserting that false is true.
    
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /var/www/html/tests/src/Unit/Normalizer/DurationIntervalNormalizerTest.php:66
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:146
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:99
    
    FAILURES!
    Tests: 83, Assertions: 748, Failures: 2.
    
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Duration field uses PHP 8.0 syntax.

    Drupal 9.2 is the lowest version with stable php 8 support.

  • Pipeline finished with Skipped
    17 days ago
    #550231
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024