Hi there,
@ajayNimbolkar thanks a lot for the module and for contributing to the Drupal community.
Problem/Motivation
There are some issues related to Drupal 9 compatibility
Checking for deprecations
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------------------------------------------------------------------------
Line src/BootstrapLoginAuthenticateTrait.php (in context of class Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthenticateBlock)
------ ------------------------------------------------------------------------------------------------------------------------------------------------
30 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.
59 Call to deprecated constant
USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL: Deprecated in
drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL
instead.
------ ------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] Found 2 errors
Checking Code Analysis
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------------------------------------------------------------------------
Line src/BootstrapLoginAuthenticateTrait.php (in context of class Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthenticateBlock)
------ ------------------------------------------------------------------------------------------------------------------------------------------------
23 Return typehint of method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getLoginBlock() has invalid type
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block.
30 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.
37 Method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getLoginBlock() should return
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block but returns array.
46 Return typehint of method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getRegisterBlock() has invalid type
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block.
59 Call to deprecated constant
USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL: Deprecated in
drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL
instead.
66 Method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getRegisterBlock() should return
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block but returns array.
75 Return typehint of method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getPasswordResetBlock() has invalid type
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block.
83 Method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::getPasswordResetBlock() should return
Drupal\bootstrap_login_authenticate\Drupal\bootstrap_login_authentica
te\Plugin\Block but returns array.
------ ------------------------------------------------------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------
Line src/Plugin/Block/BootstrapLoginAuthenticateBlock.php
------ -----------------------------------------------------------------------
56 Method
Drupal\bootstrap_login_authenticate\Plugin\Block\BootstrapLoginAuthen
ticateBlock::build() should return array but return statement is
missing.
------ -----------------------------------------------------------------------
[ERROR] Found 9 errors
Steps to reproduce
I used two commands by drupal-check
drupal-check bootstrap_login_authenticate/ deprecations
drupal-check -a bootstrap_login_authenticate/ check code analysis
Proposed resolution
I will prepare a MR to fix this.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | bootstrap_login_authenticate-d9_compatibility-3264012-3.patch | 3.4 KB | e.bogatyrev |
Issue fork bootstrap_login_authenticate-3264012
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
e.bogatyrevHi there,
MR is available but I also have attached a patch file just in case.
After checking by scan utility I have the following results
drupal-check bootstrap_login_authenticate/3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
drupal-check -a bootstrap_login_authenticate/3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Comment #4
driverok commentedThanks @e.bogatyrev for catching this.
I confirm that MR!1 fixes deprecation issues.
Below are the outputs for the drupal-check and drupal-check -a commands: