Problem/Motivation
Deprecation warning after upgrading to 2.0.7 on D11.3.5:
Deprecated function: Drupal\email_tfa\Plugin\Block\EmailTfaUserLoginBlock::__construct(): Implicitly marking parameter $config_factory as nullable is deprecated, the explicit nullable type must be used instead in include() (line 576 of /var/www/drupal11upgrade4/vendor/composer/ClassLoader.php).
Steps to reproduce
Upgrade email_tfa to 2.0.7 on D11.3.5 and probably others using PHP 8.4 or higher.
Proposed resolution
Add one character (question mark) to \src\Plugin\Block\EmailTfaUserLoginBlock.php:
public function __construct(array $configuration, string $plugin_id, $plugin_definition, RouteMatchInterface $route_match, FormBuilderInterface|ConfigFactoryInterface $form_builder, ConfigFactoryInterface $config_factory = NULL) {
public function __construct(array $configuration, string $plugin_id, $plugin_definition, RouteMatchInterface $route_match, FormBuilderInterface|ConfigFactoryInterface $form_builder, ?ConfigFactoryInterface $config_factory = NULL) {
Issue fork email_tfa-3580574
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 #4
abdulaziz zaidThx rclemings