PHPunit Next Major pipeline failure

Created on 15 June 2024, 10 months ago
Updated 6 September 2024, 7 months ago

Problem/Motivation

PHPunit Next Major pipeline: https://git.drupalcode.org/issue/feeds-3430449/-/jobs/1869217#L6303

  • As book is now contributed module we need to make changes in our tests as it starts failing for current and previous minor if I put in the require-dev section
  • Laminas/laminas-feed ExtensionManagerInterface is also deprecated which is implemented in ZfExtensionManagerSfContainer and SyndicationParser (Needs extra effort here)
  • DataProviders should be static
  • Fix all deprecated phpunit methods like returnValue(), returnValueMap(), returnCallback() and many more.

Proposed resolution

  • Add drupal/book-book: "^1" in the require-dev section of composer json.
  • Fix all phpunit deprecation methods
📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India ankitv18

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

Merge Requests

Comments & Activities

  • Issue created by @ankitv18
  • First commit to issue fork.
  • First commit to issue fork.
  • Merge request !190Re-enable book tests. → (Merged) created by megachriz
  • Pipeline finished with Failed
    8 months ago
    Total: 293s
    #255635
  • Pipeline finished with Failed
    8 months ago
    Total: 1532s
    #255636
  • Pipeline finished with Failed
    8 months ago
    Total: 522s
    #255660
  • 🇳🇱Netherlands megachriz

    The tests of the previous minor fail because of a critical bug in the Book module that occurs on Drupal 10.2:
    🐛 BookOutline" plugin does not exist Needs review

  • 🇳🇱Netherlands megachriz

    It would be nice if drupal/book is only used when on Drupal 11. So I searched for how to conditionally composer require something and I found this:
    On https://stackoverflow.com/questions/51333587/php-composer-require-depend...

    So I created a metapackage called "megachriz/drupalbook" and published it on GitHub and Packagist.
    https://github.com/MegaChriz/drupalbook
    https://packagist.org/packages/megachriz/drupalbook

    Let's see if I did this correctly.

  • Status changed to Needs review 8 months ago
  • 🇳🇱Netherlands megachriz

    All tests are passing, I will check the code changes in a few days.

  • 🇮🇳India ankitv18

    All changes looks good and great to see all the pipelines are passing without single warning.. great improvisation.

    Only thing I'm concerned is about megachriz/drupalbook as version^1 consists of only drupal/core:^10 and version^2 consists of drupal/core:^11 and drupal/book:^1.0

    Rest all looks perfectly in place.

  • 🇮🇳India ankitv18

    With referring #5 I believe once book module fixes at bug then book issue for previous minor also get fixed and then we can get back to the drupal/book package, Correct me if I'm wrong!!

  • 🇳🇱Netherlands megachriz

    @ankitv18
    Thanks for giving feedback!

    Only thing I'm concerned is about megachriz/drupalbook as version^1 consists of only drupal/core:^10 and version^2 consists of drupal/core:^11 and drupal/book:^1.0

    My idea behind this is: use drupal/book version 1 only on Drupal 11, else do not use drupal/book at all. Can you explain further what your concern is here?

    With referring #5 I believe once book module fixes at bug then book issue for previous minor also get fixed and then we can get back to the drupal/book package, Correct me if I'm wrong!!

    Yes, if 🐛 BookOutline" plugin does not exist Needs review gets fixed, we can stop using megachriz/drupalbook as dev dependency of Feeds and use drupal/book^1.0.1 instead.

  • Status changed to RTBC 8 months ago
  • 🇮🇳India ankitv18

    alright then I guess this one is ready to move ahead ~~ marking this RTBC

  • 🇮🇳India ankitv18

    @megachriz can we merge this and plan for Drupal 11 release: https://www.drupal.org/project/feeds/issues/3430449 📌 Automated Drupal 11 compatibility fixes for feeds Needs review

  • 🇳🇱Netherlands megachriz

    I think that August 29 would be a good date for the next release. I'd like to create releases for all Feeds related projects on the same day. The Feeds related projects that I maintain are:

    • Feeds
    • Feeds Extensible Parsers
    • Feeds Tamper
    • Tamper
    • Feeds Textarea Fetcher
    • Commerce Feeds

    Commerce Feeds is not compatible with Drupal 11 yet in its dev version. That one requires 🐛 [D11] RouteNotFoundException thrown when viewing imported product variations Fixed to be fixed. I hope to finish that one and Commerce Feeds this Thursday. Then I need some time to write the release notes for each project.
    Tamper and Feeds Textarea Fetcher look release ready. I did some basic testing for Feeds, Feeds Extensible Parsers and Feeds Tamper, but it would be good to test them on error handling too - because of the replacement of watchdog_exception(). And not every piece of code where watchdog_exception() was used is covered by tests. But I don't want to put too much time into testing either so the releases can still happen this month.

  • 🇮🇳India ankitv18

    Alrighty!! I would suggest if we merge this issue then it would unblock the next major pipeline for all the other issues.
    Issue#3468323 would also gets the complete green pipeline.

  • Pipeline finished with Skipped
    8 months ago
    #261490
    • megachriz committed 47a8421d on 8.x-3.x
      Issue #3454788 by megachriz, ankitv18: Fixed PHPStan issues and tests...
  • Status changed to Fixed 8 months ago
  • 🇳🇱Netherlands megachriz

    Recent changes in Drupal 11 dev caused tests to fail again, but I've fixed them. 😅

    Merged the code.

  • 🇳🇱Netherlands megachriz

    @ankitv18
    Unfortunately, while working on Commerce Feeds today, I found a new bug in Feeds that gives a warning on D10 and is disruptive on D11.
    Therefore, I think it's not realistic anymore to do the releases on August 29. I won't have time this weekend to fix the bug.

    The bug is that when an array is used for an unique target, Drupal 11 throws an InvalidQueryException.
    Some details here: https://git.drupalcode.org/project/commerce_feeds/-/merge_requests/5/dif...

    I hope to create a bug report for this early next week. I'm done for today.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024