Add the 'core_version_requirement' key in info.yml
see https://www.drupal.org/node/3070687

CommentFileSizeAuthor
#5 3142959-5.patch7.05 KBmark_fullmer
#2 3142959-2.patch421 bytesnitvirus

Comments

nitvirus created an issue. See original summary.

nitvirus’s picture

Assigned: nitvirus » Unassigned
Status: Active » Needs review
StatusFileSize
new421 bytes

Adding a patch for info.yml file

nitvirus’s picture

Status: Needs review » Needs work

The last submitted patch, 2: 3142959-2.patch, failed testing. View results

mark_fullmer’s picture

StatusFileSize
new7.05 KB

Here's a minimal test that verifies that the form element works as designed (additional test coverage should be added, but this is a start). Once the core_version_requirement is committed to the project, this test should pass when run against Drupal 9 core.

bramdriesen’s picture

You should have combined the two patches. Now you have one that adds the compatibility and one that adds the test.

mark_fullmer’s picture

While it is conventional to only make one commit per issue, it is acceptable to make multiple commits before marking an issue as fixed.

In this case, I believe that is the preferable strategy since, as I say above, the core_version_requirement must be first committed to the project before the tests can be run with Drupal 9.0 core.

In other words, in order to demonstrate successful, passing tests via the Drupal test runner, we must make two commits.

bramdriesen’s picture

Status: Needs work » Reviewed & tested by the community

Ah that I didn't know ;) test looks great, and the other patch as well. So I would say RTBC.

  • d82be28 committed on 8.x-1.x
    Issue #3142959: Drupal 9 readiness (part 1).
    

  • 90a5d16 committed on 8.x-1.x
    Issue #3142959: Drupal 9 readiness (part 2).
    
nightlife2008’s picture

Hey guys, great work!

I've committed the drupal 9 requirement to the info.yml file and released beta3: https://www.drupal.org/project/media_library_form_element/releases/8.x-1... so the automated test can run.

I've reviewed the test-patch and want to first test it out myself before actually committing it. I did commit it to the dev-branch of the module, should you want to review it as well (https://git.drupalcode.org/project/media_library_form_element/-/commit/9...)

I've changed the test-module's name to "media_library_form_element_test" (singular) cfr. "media_library_test".

I personally have little PHPUnit experience, let alone FunctionalJavascript testing etc, so I've first need to get my test-groove on :-)

@marc should you have any pointers on steps to run the test in a local sandbox project... they're welcome ;-)

Greets,
Kim

nightlife2008’s picture

Status: Reviewed & tested by the community » Fixed

I will create a new Issue to flesh uit any tests.

nightlife2008’s picture

Status: Fixed » Closed (fixed)
bramdriesen’s picture

Great work!