- Issue created by @simonp98
The ConfigFormBase class extended by the RecaptchaElementSettingsForm class has been updated from Drupal 10.2 to accept a second argument that is required in Drupal 11. Installing this module in Drupal 11 and visiting the settings configuration page causes and exception to thrown.
Install the module in Drupal 11 and visit the settings configuration page.
Add the new parameter to the RecaptchaElementSettingsForm class.
/**
* Constructs a RecaptchaElementSettingsForm object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* Config factory service.
* @param \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery
* Library discovery service.
*/
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, LibraryDiscoveryInterface $library_discovery) {
parent::__construct($config_factory, $typed_config_manager);
$this->libraryDiscovery = $library_discovery;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('library.discovery'),
);
}
https://www.drupal.org/node/3404140 →
Active
1.1
Code