Problem/Motivation

drupal-check on version:
176dd7eca67bbce80ca16e37fa3e94323647bf0d

------ ---------------------------------------------------------
  Line   password_policy_history/password_policy_history.install
 ------ ---------------------------------------------------------
  15     Call to deprecated function entity_load_multiple().
 ------ ---------------------------------------------------------

 ------ --------------------------------------------------------
  Line   password_policy_history/password_policy_history.module
 ------ --------------------------------------------------------
  52     Call to deprecated function db_delete().
 ------ --------------------------------------------------------

 ------ -------------------------------------------------------------------------------------
  Line   src/Controller/PasswordPolicyListBuilder.php
 ------ -------------------------------------------------------------------------------------
  27     Call to deprecated method getLabel() of class Drupal\Core\Entity\EntityListBuilder.
 ------ -------------------------------------------------------------------------------------

 ------ -------------------------------------------------------
  Line   src/EventSubscriber/PasswordPolicyEventSubscriber.php
 ------ -------------------------------------------------------
  53     Call to deprecated function drupal_set_message().
 ------ -------------------------------------------------------

 ------ ---------------------------------------------------
  Line   src/Form/PasswordPolicyDeleteForm.php
 ------ ---------------------------------------------------
  41     Call to deprecated function drupal_set_message().
 ------ ---------------------------------------------------

 ------ ---------------------------------------------------
  Line   src/Form/PasswordReset.php
 ------ ---------------------------------------------------
  119    Call to deprecated function drupal_set_message().
  129    Call to deprecated function drupal_set_message().
 ------ ---------------------------------------------------

 ------ -------------------------------------------------------------------------------------------
  Line   src/PasswordConstraintInterface.php
 ------ -------------------------------------------------------------------------------------------
  12     Interface Drupal\password_policy\PasswordConstraintInterface extends deprecated interface
         Drupal\Component\Plugin\ConfigurablePluginInterface.
 ------ -------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------
  Line   src/Tests/PasswordManualResetTest.php
 ------ ------------------------------------------------------------
  45     Call to deprecated method entityManager() of class Drupal.
 ------ ------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------
  Line   src/Wizard/PasswordPolicyWizard.php
 ------ ----------------------------------------------------------------------------------------
         Class Drupal\ctools\Wizard\EntityFormWizardBase not found and could not be autoloaded.
 ------ ----------------------------------------------------------------------------------------


 [ERROR] Found 10 errors                                                                                        

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

josephdpurcell created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new3.93 KB

Here is the patch, please review.

Status: Needs review » Needs work

The last submitted patch, 2: drupal_9_deprecated_code-3042612-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

PatashINotFound’s picture

Issue summary: View changes

updated with latest error related to deprecated code.

PatashINotFound’s picture

Assigned: Unassigned » PatashINotFound
sergiu stici’s picture

Status: Needs work » Needs review
StatusFileSize
new5.39 KB

I updated the patch.

Status: Needs review » Needs work

The last submitted patch, 6: drupal_9_deprecated_code-3042612-6.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new6.83 KB
new1.6 KB

Also removes usage of deprecated 'entity_manager' service which didn't get picked up by drupal-check.

aohrvetpv’s picture

Status: Needs review » Needs work

Thanks for the patches. #8 no longer applies, I think because some of the lines fixed by the patch were fixed in other issues. I'll try to update it when I can, but a new patch would be appreciated.

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new4.32 KB

Re-roll of #8

jeroent’s picture

Assigned: PatashINotFound » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +DevDaysCluj

Looking good:

$ drupal-check modules/password_policy/
 40/40 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 [OK] No errors                                                                 
+++ b/src/EventSubscriber/PasswordPolicyEventSubscriber.php
@@ -50,7 +50,7 @@ class PasswordPolicyEventSubscriber implements EventSubscriberInterface {
+        \Drupal::messenger()->addError('Your password has expired, please update it');

We should replace this by DI, but there are other calls to the global \Drupal project. Marking as RTBC so the maintainer of this module can decide if we should replace this or not.

aohrvetpv’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the updated patch and RTBC. I think we could change to use dependency injection for the messages as a separate issue. Removing the drupal_set_message() calls is an improvement.

rosinegrean’s picture

Issue tags: -DevDaysCluj +DevDaysTransylvania

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.