Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/r4032login a10444360f0d738e7517616fa30d60b5b1da0871
source : http://cgit.drupalcode.org/r4032login
------ ---------------------------------------------------
Line src/EventSubscriber/R4032LoginSubscriber.php
------ ---------------------------------------------------
169 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ----------------------------------------------
Line tests/src/Unit/R4032LoginSubscriberTest.php
------ ----------------------------------------------
83 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
95 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
96 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
97 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
98 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
100 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
102 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
105 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
253 Call to deprecated method getMock() of class
Drupal\Tests\UnitTestCase.
------ ----------------------------------------------
[ERROR] Found 10 errors
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#35 | 3042799-35.patch | 15.6 KB | Nixou |
#33 | 3042799-33.patch | 8.87 KB | Nixou |
#23 | 3042799-22.patch | 9.27 KB | edysmp |
#22 | 3042799-22.patch | 9.83 KB | edysmp |
| |||
#22 | interdiff-18-22.txt | 408 bytes | edysmp |
Comments
Comment #2
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedHere is the patch, please review.
Comment #4
gun2dru CreditAttribution: gun2dru as a volunteer and at EPAM Systems commentedHello @mcdwayne,
Please review.
Comment #5
gun2dru CreditAttribution: gun2dru as a volunteer and at EPAM Systems commentedComment #7
anavarreThis should use dependency injection instead.
Also, there are still failures on the testbot:
Comment #8
jkswoods CreditAttribution: jkswoods commentedUpdated patch to use dependency injection. Tests are passing locally, so we'll see what testbot says...
Comment #9
jkswoods CreditAttribution: jkswoods commentedComment #10
Lilit_Ghazaryan CreditAttribution: Lilit_Ghazaryan at EPAM Systems commentedComment #11
Lilit_Ghazaryan CreditAttribution: Lilit_Ghazaryan at EPAM Systems commentedComment #12
Lilit_Ghazaryan CreditAttribution: Lilit_Ghazaryan at EPAM Systems commentedComment #13
pminf#7 wasn't addressed, working on this now.
Comment #14
pminfOh, patch from #10 (#11 and #12) did not contain changes from #8, which already addressed #7 with dependency injection. I have combined patch #10 and #12 and finally removed the obsolete function "drupal_set_message()" from the unit test.
Comment #15
pminfComment #16
Gogowitsch CreditAttribution: Gogowitsch as a volunteer and at QuoData GmbH Quality & Statistics for Merck KGaA commented@pminf: there are 2 things to improve from my perspective:
$kernel = $this-> createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
@param MessengerInterface $messenger;
: the trailing;
needs to be removedComment #17
katzillaChanged last recommendations from @gogowisch and applied a new patch. Tested and reviewed - works fine, all errors from drupal-check are gone after applying.
Comment #18
katzillaForgot one semikolon ^^
Comment #19
pminfThanks! #17 and #18 addressed #16. Everything should be fine now.
Comment #20
DamienMcKennaComment #21
jkswoods CreditAttribution: jkswoods at interactive investor commentedComment #22
edysmpGet info file compatilble with Drupal 9
See: https://www.drupal.org/node/3070687
Comment #23
edysmpAdding correct patch file.
Comment #24
smrutha CreditAttribution: smrutha at TATA Consultancy Services for Pfizer, Inc. commentedPatch #23 works for me.
drupal-check -d web/modules/contrib/r4032login
15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Comment #25
fabianderijkWorks like a charm!
Comment #26
dbielke1986 CreditAttribution: dbielke1986 commentedWorks for me, too.
I would welcome an official release.
:-)
Comment #27
Martijn de WitA new release for D9 would be great indeed :)
Comment #28
grasmash CreditAttribution: grasmash commentedOr even just a commit to a dev branch! :)
Comment #29
grasmash CreditAttribution: grasmash commentedFor those who need to use this module with Drupal 9 now, feel free to use my fork (which has the patch committed):
Comment #30
GrimreaperHello,
Thanks everyone for working on this.
From what I see, only maintainers action is needed now. Or am I missing something?
Is a new maintainer needed for the module? Because none has replied to this issue or #3148547: Automated Drupal 9 compatibility fixes.
Comment #31
Nixou CreditAttribution: Nixou commentedThanks you everyone.
I take the point this morning :
Comment #32
Nixou CreditAttribution: Nixou commentedComment #33
Nixou CreditAttribution: Nixou commentedI committed directly to the 2.x branch the .info modification so I hope I can run test without composer error then.
I attach the reroll patch without the .info modification part.
Comment #35
Nixou CreditAttribution: Nixou commentedWe need to adapt fuctionnal test by adding default theme as required by https://www.drupal.org/node/3083055.
Comment #36
Nixou CreditAttribution: Nixou commentedComment #38
Nixou CreditAttribution: Nixou commentedComment #39
GrimreaperThanks!
Comment #40
martinhansen CreditAttribution: martinhansen at PeaceWorks Technology Solutions commentedExcellent!