https://github.com/mcdwayne/Drupal-9-drupal-check-Report/blob/master/Dru...

drupal-check results on commit hash: 
source   : [git] https://git.drupal.org/project/tfa ceebf0410ccc382412918145208d42619713eb51
source : http://cgit.drupalcode.org/tfa 
 ------ ------------------------------------------------------------------------- 
  Line   src/Commands/TfaCommands.php                                             
 ------ ------------------------------------------------------------------------- 
  26     Call to deprecated function db_query():                                  
         in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,               
         get a database connection injected into your service from the container  
         and call query() on it. For example,                                     
 ------ ------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Form/TfaLoginForm.php                                                          
 ------ ----------------------------------------------------------------------------------- 
  118    Call to deprecated method getStorage() of class Drupal\Core\Entity\EntityManager:  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                  
         Use \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() instead.          
 ------ ----------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/Block/TfaUserLoginBlock.php                                                                                           
 ------ --------------------------------------------------------------------------------------------------------------------------------- 
  91     Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use  
         \Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.                                                                
  92     Call to deprecated method l() of class Drupal:                                                                                   
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                                                                            
         \Drupal\Core\Link::fromTextAndUrl() instead.                                                                                     
  99     Call to deprecated method l() of class Drupal:                                                                                   
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                                                                            
         \Drupal\Core\Link::fromTextAndUrl() instead.                                                                                     
 ------ --------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------- 
  Line   src/Plugin/EncryptionMethod/McryptAES128Encryption.php                         
 ------ ------------------------------------------------------------------------------- 
  32     Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:  
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use                          
         mb_substr() instead.                                                           
  56     Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:  
         in drupal:8.6.0 and is removed from drupal:9.0.0. Use                          
         mb_substr() instead.                                                           
 ------ ------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/Plugin/TfaLogin/TfaTrustedBrowser.php                                         
 ------ ---------------------------------------------------------------------------------- 
  119    Call to deprecated method randomBytes() of class Drupal\Component\Utility\Crypt:  
         in drupal:8.8.0 and is removed from drupal:9.0.0.                                 
         Use PHP's built-in random_bytes() function instead.                               
 ------ ---------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------- 
  Line   src/TfaRandomTrait.php (in context of class Drupal\tfa\Plugin\TfaValidation\TfaRecoveryCode)  
 ------ ---------------------------------------------------------------------------------------------- 
  82     Call to deprecated method randomBytes() of class Drupal\Component\Utility\Crypt:              
         in drupal:8.8.0 and is removed from drupal:9.0.0.                                             
         Use PHP's built-in random_bytes() function instead.                                           
 ------ ---------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 9 errors                                                                                                

Comments

Manuel Garcia created an issue. See original summary.

manuel garcia’s picture

------ ------------------------------------------------------------------------ 
  Line   services_tfa/src/Plugin/ServiceDefinition/GenericValidation.php         
 ------ ------------------------------------------------------------------------ 
         Class Drupal\services\ServiceDefinitionBase not found and could not be  
         autoloaded.                                                             
 ------ ------------------------------------------------------------------------ 

This looks to me like a false positive.

manuel garcia’s picture

Status: Active » Needs review
StatusFileSize
new9.33 KB

Status: Needs review » Needs work

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

manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new4.83 KB
new9.35 KB
vatsalkhanna’s picture

Version: 8.x-1.x-dev » 8.x-1.0-alpha4
StatusFileSize
new2.68 KB

drupal-check on 8.x-1.0-alpha4

 ------ ------------------------------------------------------------------------------------ 
  Line   services_tfa/src/Plugin/ServiceDefinition/GenericValidation.php                     
 ------ ------------------------------------------------------------------------------------ 
         Class Drupal\services\ServiceDefinitionBase not found and could not be autoloaded.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                          
  30     Class Drupal\services\ServiceDefinitionBase not found and could not be autoloaded.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                          
 ------ ------------------------------------------------------------------------------------ 
 ------ ---------------------------------------------------------------------- 
  Line   src/Form/TfaLoginForm.php                                             
 ------ ---------------------------------------------------------------------- 
  228    Call to deprecated function drupal_set_message():                     
         in drupal:8.5.0 and is removed from drupal:9.0.0.                     
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.  
 ------ ---------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/Block/TfaUserLoginBlock.php                                                                         
 ------ --------------------------------------------------------------------------------------------------------------- 
  93     Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from  
         drupal:9.0.0. Use \Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.                            
  94     Call to deprecated method l() of class Drupal:                                                                 
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                                                          
         \Drupal\Core\Link::fromTextAndUrl() instead.                                                                   
  101    Call to deprecated method l() of class Drupal:                                                                 
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                                                          
         \Drupal\Core\Link::fromTextAndUrl() instead.                                                                   
 ------ --------------------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/Plugin/TfaLogin/TfaTrustedBrowser.php                                         
 ------ ---------------------------------------------------------------------------------- 
  118    Call to deprecated method randomBytes() of class Drupal\Component\Utility\Crypt:  
         in drupal:8.8.0 and is removed from drupal:9.0.0.                                 
         Use PHP's built-in random_bytes() function instead.                               
 ------ ---------------------------------------------------------------------------------- 


 [ERROR] Found 7 errors
jcnventura’s picture

Issue summary: View changes
StatusFileSize
new6.66 KB
new5.71 KB

I'm removing the 2 errors usually reported in the services_tfa when the services module is not available.

Not sure what #6 was trying to achieve, as it was a considerably less complete than #5, so I'm only doing an interdiff to #5. Many of the changes in #5 are already in the module as part of #2924691: Remove fallback plugins, make recovery code concept into validation & setup plugins.

jcnventura’s picture

StatusFileSize
new3 KB

Proper interdiff, as the previous one seemed to imply a lot of drupal_set_message rollbacks.

jcnventura’s picture

StatusFileSize
new681 bytes
new6.5 KB

It seems after all this, the patch was still missing the core_version_requirement: ^8 || ^9 key in both the tfa and services_tfa modules.

Adding those now.

dpi’s picture

Version: 8.x-1.0-alpha4 » 8.x-1.x-dev
StatusFileSize
new338 bytes
new6.96 KB

Fixes missing core_version_requirement for tfa_test_plugins submodule.

jcnventura’s picture

Not sure if the change in #10 is needed or even desired.

It might be that this module should be in the 'Testing' package. And modules in the 'Testing' package should not add this property as specified in https://www.drupal.org/node/3070687

meet_bhanvadia’s picture

Hi all,

Patch at #10 works fine for me.

acbramley’s picture

StatusFileSize
new6.94 KB
new432 bytes

As per #11 we can just use the Testing package.

jcnventura’s picture

StatusFileSize
new3.98 KB
new10.7 KB

Adding some changes from the rector-generated patch over in #3149047: Automated Drupal 9 compatibility fixes.

  • jcnventura authored cc9d5fc on 8.x-1.x
    Issue #3046504 by jcnventura, Manuel Garcia, dpi, acbramley,...
jcnventura’s picture

Status: Needs review » Fixed
acbramley’s picture

Thank you @jcnventura! Any chance we can get a new release for this?

Belhendo’s picture

Hi all,

I'm the Product Owner at GovCMS, I'm wondering if there is a roadmap/draft timeline for D9 readiness for the TFA module please?

Thanks!

jcnventura’s picture

@belhendo, the roadmap is here (#2925358: Two-factor Authentication (TFA) 1.0.0 stable release plan), but it needs to be updated. It will be soon, but it will still be an alpha. Please comment on that issue.

Belhendo’s picture

Thanks @jcnventura!

Status: Fixed » Closed (fixed)

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