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.

Command icon 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

e.bogatyrev created an issue. See original summary.

e.bogatyrev’s picture

Status: Active » Needs review
StatusFileSize
new3.4 KB

Hi 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

driverok’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @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:


developer@xenial64:~/cluster/jnj/contribution/drupal_composer$ drupal-check web/modules/contrib/bootstrap_login_authenticate/
 3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


 [OK] No errors                                                                 

Thanks for using drupal-check!

Consider sponsoring the development of the maintainers which make drupal-check possible:

- phpstan (ondrejmirtes): https://github.com/sponsors/ondrejmirtes
- phpstan-deprecation-rules (ondrejmirtes)): https://github.com/sponsors/ondrejmirtes
- phpstan-drupal (mglaman)): https://github.com/sponsors/mglaman
- drupal-check (mglaman)): https://github.com/sponsors/mglaman
developer@xenial64:~/cluster/jnj/contribution/drupal_composer$ drupal-check -a web/modules/contrib/bootstrap_login_authenticate/
 3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


 [OK] No errors                                                                 

Thanks for using drupal-check!