There are some Drupal 9 compatibility related issues. Which needs to be fixed.
➜ contrib git:(8.8.x) ✗ drupal-check seckit
7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------------------------------
Line src/Tests/SecKitTestCaseTest.php
------ ------------------------------------------------------------------------------------------------------
13 Class Drupal\seckit\Tests\SecKitTestCaseTest extends deprecated class Drupal\simpletest\WebTestBase:
in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
55 Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
------ ------------------------------------------------------------------------------------------------------
[ERROR] Found 2 errors
Comment | File | Size | Author |
---|---|---|---|
#30 | 3074080-30.patch | 24.84 KB | aspilicious |
#23 | 3074080-23.patch | 24.84 KB | sidharthap |
#23 | interdif_19_22.txt | 324 bytes | sidharthap |
#19 | 3074080-19.patch | 24.53 KB | andypost |
| |||
#19 | interdiff.txt | 1.28 KB | andypost |
Comments
Comment #2
pranit84This patch fixes the drupal-check related issues.
➜ contrib git:(8.8.x) ✗ drupal-check seckit
7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Comment #3
pranit84Comment #4
pranit84Comment #5
joshi.rohit100Seems we already had issue for this - https://www.drupal.org/project/seckit/issues/3042610
Comment #6
joshi.rohit100This seems not correct as drupalPostForm() submits the form while drupalGet() takes to that page.
Same here.
Comment #7
andypostSee more details in https://www.drupal.org/node/3030340
Comment #8
volegerThe test has to be moved to the /tests/src/Functional/SecKitTestCaseTest.php location
Namespace also need to be changed
Comment #9
Kristen PolComment #10
Kristen PolPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing title and tag cleanup here based on that discussion.
Comment #11
sidharthapAddressing #8 and #6 comments. attaching a new patch moving the file to test directory.
Comment #12
sidharthapComment #13
volegerBlocked by #3081327: drupalPostForm lacks headers
Comment #14
alexpottThere's no need to wait for a fix to core - also maybe a fix to core is not really necessary as there is a way to add headers to any request made by the test system. Here's a patch that converts the test
Comment #15
alexpottShould be green.
Comment #16
alexpottYeah right @alexpott... third time's a charm.
Comment #17
andypostYay! Only 39 cs bugs left...
Comment #18
alexpottWell most of those exist in HEAD too... but I guess we can fix them here too. This should help... let's see where we are after this.
Comment #19
andypostClean-up leftovers
Comment #20
selva.swamy@gmail.com CreditAttribution: selva.swamy@gmail.com as a volunteer and for Drupal India Association commentedGetting below issue for this patch when running drupal-check on latest version from GIT
7/7 [============================] 100%
------ -------------------------------------------------------------------------
Line tests\src\Functional\SecKitTestCaseTest.php
------ -------------------------------------------------------------------------
Class PHPUnit\Framework\TestCase not found and could not be autoloaded.
------ -------------------------------------------------------------------------
[ERROR] Found 1 error
Comment #21
DamienMcKennaComment #22
jenlamptonI believe that if you add drupal 9 as an option to the
composer.json
file in this project you can get a nice little Compatible with Drupal 9 badge in the Project information section on the module page.Below is a code sample from a module that has the badge.
It also looks like it may possible to get the badge by adding the 'core_version_requirement' key in the modules info.yml file, which, in turn, will add the version to the require section of
composer.json
. Example follows.Do you want to include this change in the patch here or open a separate issue?
Comment #23
sidharthapAdded core version in patch.
Comment #24
sidharthapComment #25
suzymasriPatch #23 worked for me. It would be great if we can have it merged so we're able to use/test it on D9 projects :)
Comment #26
DamienMcKennaThe composer.json file is not required in order to get the badge, see the relevant change notice for details.
Comment #27
DamienMcKennaFYI to add the D9 support badge you have to edit the project page and fill in the "Drupal 9 porting info" field; per Gábor, the intended automation around the D9 compatibility hasn't been completed, so we need to edit these fields for now.
Comment #28
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedPatch looks good, and since the
composer.json
change is not strictly necessary, I believe this is ready to go.Comment #29
aspilicious CreditAttribution: aspilicious commentedPatch does not apply with composer patches
Comment #30
aspilicious CreditAttribution: aspilicious commentedHmm, patch did apply but not in composer...
Re-uploading to see if it works. I don't need any credits.
Comment #31
aspilicious CreditAttribution: aspilicious commentedIt applies on latest dev and everything is green. So I can confirm this one is good to go.
Comment #33
mcdruidPushed this to 8.x-1.x initially; I understand we may want to create a new branch but this seemed to include some fixes/cleanup that are good to have in the existing branch too.
Fixed one typo in a comment on commit
s/is/if
.Thanks everyone!
Comment #34
mcdruidAh, I'm not actually certain we want this in 8.x-1.x with:
...as that means 8.7 is out of luck, IIUC.
I will try to look at fixing that; probably with a new branch.
Comment #35
aspilicious CreditAttribution: aspilicious commentedAll major modules are doing this, so it's fine.
Comment #36
naveenvalecha@mcdruid
Can you cut a new D9 supported release?
Comment #37
mcdruidI made an RC1 yesterday on a new semver branch:
https://www.drupal.org/project/seckit/releases/2.0.0-rc1
I am still getting my head around how the new branches etc.. are supposed to work though, so please let me know if I've missed anything.
Comment #38
ressa CreditAttribution: ressa at Ardea commentedThanks @mcdruid, I can confirm that the latest release of the Security Kit module can be added with
composer require drupal/seckit:^2.0
and that it also passes the Upgrade Status Drupal 9 compatibility check, without errors and only two warnings:Upgrade Status report
Contributed projects
Security Kit 2.0.0-rc1
Check manually
Comment #39
mcdruidThanks @ressa, however are those messages about PHPUnit a false positive?
See, for example: https://www.drupal.org/project/upgrade_status/issues/3137754
If it is an actual problem with the module, I'm not sure I understand what needs to be fixed.
Comment #40
ressa CreditAttribution: ressa at Ardea commentedI believe I didn't have
drupal/core-dev
installed at that point, @mcdruid. But since they are warnings, they are perhaps not that important, at least from a Upgrade Status point of view? I suppose you don't see the warnings, perhaps because you have PHPUnit installed?