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: 734ed5d241416246f54f7e7f857c97a06fc249a8
------ ----------------------------------------------------------------------------------
Line login_security.module
------ ----------------------------------------------------------------------------------
125 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
125 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
214 Call to deprecated function drupal_get_messages().
240 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
240 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
242 Call to deprecated function drupal_set_message().
259 Call to deprecated function drupal_set_message().
259 Call to deprecated function format_date().
264 Call to deprecated function drupal_set_message().
264 Call to deprecated function format_date().
283 Call to deprecated function db_delete().
289 Call to deprecated function db_delete().
317 Call to deprecated function db_delete().
333 Call to deprecated function db_insert().
358 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
358 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
384 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
384 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
411 Call to deprecated function format_date().
460 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
460 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
461 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
461 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
465 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
465 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
466 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
466 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
------ ----------------------------------------------------------------------------------
------ ---------------------------------------------------
Line src/Form/LoginSecurityAdminSettings.php
------ ---------------------------------------------------
241 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ----------------------------------------------------------------------------------
Line src/Tests/LoginSecurityInterfaceTest.php
------ ----------------------------------------------------------------------------------
40 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
40 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
------ ----------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------
Line src/Tests/LoginSecuritySoftBlockTest.php
------ ----------------------------------------------------------------------------------
24 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
24 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
------ ----------------------------------------------------------------------------------
------ -----------------------------------------
Line src/Tests/LoginSecurityTestBase.php
------ -----------------------------------------
22 Call to deprecated function db_query().
23 Call to deprecated function db_query().
------ -----------------------------------------
------ ----------------------------------------------------------------------------------
Line src/Tests/LoginSecurityUserBlockingTest.php
------ ----------------------------------------------------------------------------------
50 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
50 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
64 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
64 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
105 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
105 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
106 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
106 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
150 Call to deprecated function db_truncate().
170 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
170 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
171 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
171 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
217 Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.
217 Call to deprecated method getUsername() of class Drupal\user\Entity\User.
217 Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.
------ ----------------------------------------------------------------------------------
[ERROR] Found 50 errors
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#21 | 3042720-9_0.patch | 23.49 KB | jcnventura |
#19 | interdiff_14-16.txt | 5.25 KB | satyaki_dutta |
#16 | drupal_9_3042720-16.patch | 16.03 KB | satyaki_dutta |
#14 | drupal_9_3042720-14.patch | 16.58 KB | satyaki_dutta |
#9 | interdiff.txt | 8.26 KB | lhridley |
Comments
Comment #2
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedHere is the patch,please review.
Comment #3
DamienMcKennaComment #4
Daniel KorteAdd
core_version_requirement
keyComment #5
nikolas.tatianenko CreditAttribution: nikolas.tatianenko as a volunteer and at EPAM Systems commentedHi all,
I've found 2 more deprecation issues.
FILENAME LINE ERROR
web/modules/contrib/login_security/src/Tests/LoginSecurityTestBase.php 10 Class Drupal\login_security\Tests\LoginSecurityTestBase extends deprecated class Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, use Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340. Replacement available from drupal:8.6.0.
web/modules/contrib/login_security/src/Tests/LoginSecurityTestBase.php 19 Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, use Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340. Replacement available from drupal:8.6.0.
========
Rector review result
24/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] Rector is done!
========
Drupal-check review result
8/8 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
=========
Upgrade status review result = no errors
=========
Tested at Drupal 8.8 and Drupal 9-beta3
Comment #6
driverok CreditAttribution: driverok at EPAM Systems commentedChecked #5.
Still some issues with tests and module schema.
Updated #5 with fixes for tests and schema.
Now tests look good:
Testing modules/login_security/
......... 9 / 9 (100%)
Time: 11.92 minutes, Memory: 6.00 MB
OK (9 tests, 233 assertions)
Please check.
Comment #7
nikolas.tatianenko CreditAttribution: nikolas.tatianenko as a volunteer and at EPAM Systems commentedComment #8
mradcliffeGreat work on the patch. Things look accurate. However
Functional tests extending BrowserTestBase should be moved underneath the
tests/src/Functional
directory per PHPUNit file structure, namespace and required metadata.So the directory and the namespace in the files need to be updated.
Comment #9
lhridley CreditAttribution: lhridley as a volunteer and commentedRerolled patch after moving tests to appropriate directory and adjusting namespacing.
Also reran for coding standards and made the latest corrections, included in this patch.
Interdiff is attached also.
Comment #10
lhridley CreditAttribution: lhridley as a volunteer and commentedComment #11
minakshiPh CreditAttribution: minakshiPh at TATA Consultancy Services for Pfizer, Inc. commentedHi @Ihridley,
I have tested the patch in #9 and it shows following error while applying on the local; so marking to needs work.
Comment #12
divyesh19Patch #9 looks good and applies cleanly.
Able to install module on D8.8.7 as well as D9 after applying the patch.
Comment #13
orlando.thoeny#9 works for me using Core 9.0.2 & dev 734ed5d of this module.
This patch also includes https://www.drupal.org/project/login_security/issues/3134020
Comment #14
satyaki_dutta CreditAttribution: satyaki_dutta commentedPlease review the patch made on report from upgrade status module.
Comment #15
DamienMcKenna@satyaki_dutta: Given there was already a patch that had reached RTBC, were there additional changes necessary?
Comment #16
satyaki_dutta CreditAttribution: satyaki_dutta commented@DamienMckenna the previous uploaded patch had some issues so had to upload again
Comment #17
DamienMcKennaCould you please describe the issues, and possibly provide an interdiff? Thank you.
Setting the status to "needs review" as the new patch needs to be reviewed.
Comment #18
DamienMcKennaI set the tests to run against PHP 7.4 as the current 5.6 isn't supported by core (see #3164545).
Comment #19
satyaki_dutta CreditAttribution: satyaki_dutta commentedThe issue with my previous patch was that the patch was given wrong for the files.
Comment #20
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThere's something really wrong going on here... #9 is still the one to use.
Comment #21
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedRe-uploading #9, and setting back the RTBC status from #12 and #13.
Disregard #14 and #16, please. I think no credit should be assigned.
Comment #22
Gábor HojtsyGreat to see this tested. Login Security is one of the 9 top 200 projects on drupal.org that is not yet Drupal 9 compatible. 🤞
Comment #23
jribeiro CreditAttribution: jribeiro for Pfizer, Inc. commentedThanks everyone, great work!
Committed and cut the first semantic versioning release 2.0.0.
Comment #24
jribeiro CreditAttribution: jribeiro for Pfizer, Inc. commentedHave you seen this? https://www.drupal.org/project/login_security/issues/3175408
Comment #25
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedNever saw #24 before. I've been installing this module on a few D9 sites, but the config used probably didn't trigger that. Now that the module can easily be installed in D9, you'll be able to uncover all the D9 incompatibilities that can't be discovered by automated tools.