In PHP 8.4, implicitly nullable parameters are deprecated and must be explicitly marked as nullable.
The SettingsForm constructor currently defines:
protected TypedConfigManagerInterface $typedConfigManager
However, ConfigFormBase expects this parameter to be nullable (TypedConfigManagerInterface|null), as reflected in the docblock and parent constructor.
This results in a PHP 8.4 deprecation warning.
Proposed fix:
Update the constructor to explicitly allow null
Issue fork simple_pass_reset-3586449
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 #2
amritsingh09 commentedAdded a fix for the PHP 8.4 nullable parameter deprecation in SettingsForm::__construct(). The TypedConfigManagerInterface parameter is now explicitly nullable to match ConfigFormBase. Needs review.
Comment #6
astonvictor commentedI guess the warning was caused by the
@param \Drupal\Core\Config\TypedConfigManagerInterface|null $typedConfigManagercomment. So, we can simply remove thenullfrom the comment.Another solution is to remove the
__constructmethod and create the property directly in thecreatemethod. So, I implemented that option.Comment #7
astonvictor commented