Hi,

drupal-check password_policy results:

42/42 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------- 
  Line   src/PasswordConstraintInterface.php                                                        
 ------ ------------------------------------------------------------------------------------------- 
  12     Interface Drupal\password_policy\PasswordConstraintInterface extends deprecated interface  
         Drupal\Component\Plugin\ConfigurablePluginInterface:                                       
         Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated                          
         in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement              
         ConfigurableInterface and/or DependentPluginInterface directly as needed. If               
         you implement ConfigurableInterface you may choose to implement                            
         ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,                 
         however this must be removed prior to Drupal 9.                                            
 ------ ------------------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------------------- 
  Line   src/Wizard/PasswordPolicyWizard.php                                                     
 ------ ---------------------------------------------------------------------------------------- 
         Class Drupal\ctools\Wizard\EntityFormWizardBase not found and could not be autoloaded.  
 ------ ---------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 2 errors

Comments

gmangones created an issue. See original summary.

gmangones’s picture

Problem/Motivation

Hi, I added this patch, in case if required. now display the next error.

drupal-check password_policy                               
 42/42 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

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

Thank's

gmangones’s picture

StatusFileSize
new959 bytes

Patch.

chr.fritsch’s picture

There is still more stuff to fix:

------ -------------------------------------------------------------------------- 
  Line   test-dir/docroot/modules/contrib/password_policy/password_policy.install  
 ------ -------------------------------------------------------------------------- 
  13     Call to deprecated constant DATETIME_DATETIME_STORAGE_FORMAT:             
         Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use          
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATETIME   
         _STORAGE_FORMAT instead.                                                  
  13     Call to deprecated constant DATETIME_STORAGE_TIMEZONE: Deprecated in      
         drupal:8.5.0 and is removed from drupal:9.0.0. Use                        
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::STORAGE_   
         TIMEZONE instead.                                                         
 ------ -------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------- 
  Line   test-dir/docroot/modules/contrib/password_policy/password_policy.module  
 ------ ------------------------------------------------------------------------- 
  345    Call to deprecated constant DATETIME_DATETIME_STORAGE_FORMAT:            
         Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use         
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATETIME  
         _STORAGE_FORMAT instead.                                                 
  345    Call to deprecated constant DATETIME_STORAGE_TIMEZONE: Deprecated in     
         drupal:8.5.0 and is removed from drupal:9.0.0. Use                       
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::STORAGE_  
         TIMEZONE instead.                                                        
  358    Call to deprecated constant DATETIME_DATETIME_STORAGE_FORMAT:            
         Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use         
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATETIME  
         _STORAGE_FORMAT instead.                                                 
  358    Call to deprecated constant DATETIME_STORAGE_TIMEZONE: Deprecated in     
         drupal:8.5.0 and is removed from drupal:9.0.0. Use                       
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::STORAGE_  
         TIMEZONE instead.                                                        
  407    Call to deprecated constant DATETIME_DATETIME_STORAGE_FORMAT:            
         Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use         
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATETIME  
         _STORAGE_FORMAT instead.                                                 
  407    Call to deprecated constant DATETIME_STORAGE_TIMEZONE: Deprecated in     
         drupal:8.5.0 and is removed from drupal:9.0.0. Use                       
         \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::STORAGE_  
         TIMEZONE instead.                                                        
 ------ ------------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------------- 
  Line   test-dir/docroot/modules/contrib/password_policy/src/Form/ConstraintDelete.php  
 ------ -------------------------------------------------------------------------------- 
  58     Parameter $tempstore of method                                                  
         Drupal\password_policy\Form\ConstraintDelete::__construct() has                 
         typehint with deprecated class Drupal\user\SharedTempStoreFactory:              
         in drupal:8.5.0 and is removed from drupal:9.0.0.                               
         Use \Drupal\Core\TempStore\SharedTempStoreFactory instead.                      
 ------ -------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------ 
  Line   test-dir/docroot/modules/contrib/password_policy/src/Form/ConstraintEdit.php  
 ------ ------------------------------------------------------------------------------ 
  64     Parameter $tempstore of method                                                
         Drupal\password_policy\Form\ConstraintEdit::__construct() has typehint        
         with deprecated class Drupal\user\SharedTempStoreFactory:                     
         in drupal:8.5.0 and is removed from drupal:9.0.0.                             
         Use \Drupal\Core\TempStore\SharedTempStoreFactory instead.                    
 ------ ------------------------------------------------------------------------------ 

gnanagowthaman sankar’s picture

Hi @gmangones,

Here by i attached the patch. Please review and let me know for any changes.

Thanks & Regards,
Gnanagowthaman sankar

gnanagowthaman sankar’s picture

Status: Needs work » Needs review
StatusFileSize
new4.47 KB
new5.68 KB

Patch,

Thanks & Regards,
Gnanagowthaman sankar

chr.fritsch’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

aohrvetpv’s picture

Status: Reviewed & tested by the community » Needs work
andreyjan’s picture

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

Re-rolled the patch (excluded 3064082 changes).

chr.fritsch’s picture

StatusFileSize
new15.75 KB

Added defaultTheme to the tests and core_version_requirement to the info files.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

Looks great.

timmillwood’s picture

+1

aohrvetpv’s picture

I plan to commit this patch soon (within days, hopefully). Want to run drupal-check myself to test, but my development environment currently only has PHP 7.0, and >=7.1 is a requirement for drupal-check. Thanks.

damienmckenna’s picture

Title: Drupal 9 Deprecated Code Report » Drupal 9 Deprecated Code Report for Password Policy module
aohrvetpv’s picture

Status: Reviewed & tested by the community » Needs work

#10 has changes unrelated that seem to be unrelated to this issue.

For example:

diff --git a/password_policy_character_types/tests/src/Functional/PasswordCharacterTypesOperations.php b
/password_policy_character_types/tests/src/Functional/PasswordCharacterTypesOperations.php
index 63028fc..9c4d968 100644
--- a/password_policy_character_types/tests/src/Functional/PasswordCharacterTypesOperations.php
+++ b/password_policy_character_types/tests/src/Functional/PasswordCharacterTypesOperations.php
@@ -12,15 +12,18 @@ use Drupal\Tests\BrowserTestBase;
 class PasswordCharacterTypesOperations extends BrowserTestBase {
 
   /**
-   * Modules to enable at the start of the test.
-   *
-   * @var array
+   * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'password_policy_character_types',
     'password_policy',
   ];
 
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
   /**
    * Administrative user.
    *

That doesn't seem to remove any drupal-check error, so I'm not sure what the basis for the change is. We can commit other code clean-up separately.

swatichouhan012’s picture

Status: Needs work » Needs review
Issue tags: +VbContribution2020
StatusFileSize
new4.71 KB

I have created a patch to fix only deprecated code and removed other unrelated changes, kindly review new patch file.

aohrvetpv’s picture

Status: Needs review » Reviewed & tested by the community

Thank you. I applied #16, ran drupal-check, and there were no errors. I'll plan to commit soon.

aohrvetpv’s picture

Status: Reviewed & tested by the community » Fixed

Thank you all.

Status: Fixed » Closed (fixed)

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

klemendev’s picture

Could one of the maintainers commit this into a release?

nerdstein’s picture

I can do this, we need to merge https://www.drupal.org/project/password_policy/issues/3120746 at the same time