Closed (fixed)
Project:
Username Enumeration Prevention
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Mar 2022 at 16:01 UTC
Updated:
27 Dec 2022 at 01:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
kimberlly_amaral commentedI'll work on that.
Comment #5
kimberlly_amaral commentedI fixed the errors above. However when I ran drupal-check I also found the following erros about tests. Should they be fixed?
------ ---------------------------------------------------------------------------------------------------------------
Line src/UserRouteEventSubscriber.php
------ ---------------------------------------------------------------------------------------------------------------
63 Parameter $event of method Drupal\username_enumeration_prevention\UserRouteEventSubscriber::onException() has
typehint with deprecated class Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent:
since Symfony 4.3, use ExceptionEvent instead
65 Call to deprecated method getException() of class
Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent:
since Symfony 4.4, use getThrowable instead
66 Call to deprecated method setException() of class
Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent:
since Symfony 4.4, use setThrowable instead
------ ---------------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------
Line tests/src/Functional/FloodTest.php
------ ---------------------------------------------------------------------------------------------------------
15 Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which
includes recommendations on which theme to use.
47 Call to deprecated method drupalPostForm() of class Drupal\Tests\BrowserTestBase:
in drupal:9.1.0 and is removed from drupal:10.0.0. Use
$this->submitForm() instead.
53 Call to deprecated method drupalPostForm() of class Drupal\Tests\BrowserTestBase:
in drupal:9.1.0 and is removed from drupal:10.0.0. Use
$this->submitForm() instead.
56 Call to deprecated method assertNoText() of class Drupal\Tests\BrowserTestBase:
in drupal:8.2.0 and is removed from drupal:10.0.0. Use
- $this->assertSession()->responseNotContains() for non-HTML responses,
like XML or Json.
- $this->assertSession()->pageTextNotContains() for HTML responses.
Unlike the deprecated assertNoText(), the passed text should be HTML
decoded, exactly as a human sees it in the browser.
60 Call to deprecated method assert() of class Drupal\Tests\BrowserTestBase:
in drupal:8.0.0 and is removed from drupal:10.0.0. Use
$this->assertTrue() instead.
------ ---------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------
Line tests/src/Functional/UserFormTest.php
------ ---------------------------------------------------------------------------------------------------------
13 Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which
includes recommendations on which theme to use.
------ ---------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------
Line tests/src/Functional/UserRouteTest.php
------ ---------------------------------------------------------------------------------------------------------
13 Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which
includes recommendations on which theme to use.
------ ---------------------------------------------------------------------------------------------------------
Comment #6
lucienchalom commentedComment #7
Tauany Bueno commentedhi!
I'll work on it :)
Comment #8
Tauany Bueno commentedHello!
I ran drupal-check and fixed the remaining compatibility problems (see attached .txt).
Changing the status to needs review.
Comment #9
Tauany Bueno commentedComment #10
Joel Guerreiro Borghi Filho commentedI will review =)
Comment #11
Joel Guerreiro Borghi Filho commentedChanges from #7 commit are looking good to me.
I only found one deprecated warning about the $modules variable that should be protected instead of public after running the tests locally.
1x: The Drupal\Tests\username_enumeration_prevention\Functional\UserFormTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
1x in DrupalListener::startTest from Drupal\Tests\Listeners
Comment #12
Joel Guerreiro Borghi Filho commentedComment #13
Tauany Bueno commentedi'll review it :)
Comment #14
Tauany Bueno commentedComment #15
Tauany Bueno commentedhello!
All deprecated and drupal 10 compatibility issues seems to have been fixed, so I'm changing the status to RTBC :)
Comment #16
Lal_Need to fix the phpstan issues.
Comment #17
Lal_Strange, unable to run test bot on the MR. Trying to add the diff as a patch.
Comment #18
Lal_PS: its a diff from the MR
Comment #19
Lal_Fixing the tests
Comment #20
Lal_Comment #21
Lal_Comment #22
kristen polBot issue is #3290308: Automated Drupal 10 compatibility fixes.
It would be good to go through and combine so the patch here or there covers everything and then close out one of these issues.
Comment #23
mpauloI'll review the patches here and on the related issue, #3290308
Comment #24
mpauloMoving to RTBC. There are no needed changes to bring from the issue #3290308.
Should the maintainers decide which issue to keep?
Comment #25
mpauloComment #26
mglamanNot needed.
Remove this.
Comment #27
reenaraghavan commentedComment #29
nkoporecUpdated the MR, removed the not needed type hinting and the extra composer config as @mglaman suggested.
Comment #30
reenaraghavan commentedI have made the changes and attached the patch.
Tested using Drupal check shows 2 error
------ -----------------------------------------------
Line username_enumeration_prevention.module
------ -----------------------------------------------
54 Cannot call method id() on object|true.
54 Cannot call method isActive() on object|true.
------ -----------------------------------------------
[ERROR] Found 2 errors
Tested using "Upgrade Status" and found one error, attached screenshot of that error.
Comment #31
reenaraghavan commentedComment #32
mglamanPutting back to Needs Review:
1. We're not fixing general typehint errors
2. Your upgrade_status error is because the module wasn't installed.
Comment #33
mglamanLooks good. Moving to RTBC to prevent the update bot from attaching more patches and making this thread even noiser.
Comment #34
reenaraghavan commented@mglaman Sorry I am new to contributions, and sorry if I have done anything wrong.
Comment #35
mglaman@reenaraghavan no problem! To be fair, it's my also partially my fault because of drupal-check's extra errors it outputs.
Comment #36
Lal_Ignore my PR note because it's a Drupal CI problem, and we don't want that to be committed... We already have a passing patch #20.... @nkoporec if we are following the patch method let's follow that to the end... The sole reason I went for a patch was to trigger test bots run...
Comment #37
Lal_oops
Comment #39
nicksanta commentedCommitted, thanks for your contribution everyone!