Problem/Motivation
Not having looked far into this, I suspect it is a Drupal 11 issue. I also recognize the module does not indicate Drupal 11 as supported (yet). I'd like to try to test this out as a possible module rather than developing custom theme code for responsive menuii.
Steps to reproduce
Install module on Drupal 11
Observe error message on module admin page (/admin/config/user-interface/responsive_menus)
ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/responsive_menus/src/Form/ResponsiveMenusAdminForm.php on line 29 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
Proposed resolution
Implement and test in an issue branch:
<?php
namespace Drupal\responsive_menus\Form;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\responsive_menus\ResponsiveMenusPluginManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Form class for managing responsive menus in the administration interface.
*
* @package Drupal\responsive_menus\Form
*/
class ResponsiveMenusAdminForm extends ConfigFormBase {
/**
* The Responsive Menus plugin manager.
*
* @var \Drupal\responsive_menus\ResponsiveMenusPluginManager
*/
protected ResponsiveMenusPluginManager $pluginManager;
/**
* {@inheritdoc}
*/
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, ResponsiveMenusPluginManager $plugin_manager) {
parent::__construct($config_factory, $typed_config_manager);
$this->pluginManager = $plugin_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('plugin.manager.responsive_menus')
);
}
//...
Remaining tasks
Set up dev branch based on this issue
Allow Drupal 11 support
Implement proposed minor fix
Test
User interface changes
None
API changes
None
Data model changes
None