Problem/Motivation

Working on that.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review

That was easier than expected.

adriancid’s picture

Thanks

adriancid’s picture

Status: Needs review » Fixed
berdir’s picture

Thanks. Note that being able to test as a patch, I would have needed to add a line to composer.json for drupal/core. That said, now that it's committed, you should be able to set up a weekly test run or so on https://www.drupal.org/node/1779880/qa against D10 to see that it works on DrupalCI as well.

adriancid’s picture

Thanks, its done

berdir’s picture

Almost. D10 requires PHP 8.1 :)

adriancid’s picture

Thanks, I updated the test.

berdir’s picture

Status: Fixed » Needs review

I'm sorry, I really did miss the composer.json change, I thought the definition is missing. Opened another MR.

berdir’s picture

That test has a race condition: https://www.drupal.org/pift-ci-job/2420740. It's calling strtotime() in the provider (which is executed during test discovery) and the implementation and expect it to return the same. If too much time passes between defining the test and running it (for example when running all tests at once because the functional test then runs first), you get a different result. It's probably less likely to happen on CI as it runs tests one-by one, but it's still possible to have a second-switch in the middle of discovering/running the test as that example shows.

Also, noticed while looking at that: \Drupal\node_revision_delete\NodeRevisionDelete::getTimeString() is too simple, singular/plural rules are more complicated than that, some languages have more than a single plural version. It's most likely also impossible to correctly translate that grammatically into certain languages and hard to understand what it is from the placeholder names. A better approach would be to use https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation..., for each time option with a complete string.

adriancid’s picture

Thanks, I will try to update the code with your recommendations.

berdir’s picture

Yeah, sorry for just dumping that here. The D10 test is green now, had to retry twice, the second error was a weird git thing. But the linked fails will probably happen from time to time. time related tests are very tricky.

I copy pasted those issues into a new one for each problem, so you can merge the second MR and close this again.

adriancid’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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