Resolve #3452453 "Drupal 11 support"
Closes #3452453
Merge request reports
Activity
added 1 commit
- fafa8c06 - Fixed Call to deprecated method getName() of interface...
@codebymikey @pasqualle can you review this MR?
added 1 commit
- 9cd69ff3 - update gitlab to run phpunit test and remove phpstan failures.
79 87 * The config reverter. 80 88 * @param \Drupal\Core\Diff\DiffFormatter $diff_formatter 81 89 * The diff formatter to use. 82 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler 90 * @param \Drupal\Core\Extension\ModuleExtensionList $moduleList 83 91 * The module handler. 84 * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler 92 * @param \Drupal\Core\Extension\ThemeExtensionList $themeList 85 93 * The theme handler. 86 94 * @param \drupal\Core\Config\ConfigFactoryInterface $config_factory 87 95 * The config factory. 96 * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger 97 * The state service. 88 98 */ 89 public function __construct(ConfigDiffInterface $config_diff, ConfigListByProviderInterface $config_list, ConfigRevertInterface $config_update, DiffFormatter $diff_formatter, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, ConfigFactoryInterface $config_factory) { 99 public function __construct(ConfigDiffInterface $config_diff, ConfigListByProviderInterface $config_list, ConfigRevertInterface $config_update, DiffFormatter $diff_formatter, ModuleExtensionList $moduleList, ThemeExtensionList $themeList, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger) { @deepakkm Let's keep variable name uniform i.e words should be separated with underscore and not Camel Case for function arguments. Ex: It should be
$module_list
and not$moduleList
.changed this line in version 14 of the diff
304 316 305 317 // Make a list of installed modules. 306 318 $profile = $this->getProfileName(); 307 $modules = $this->moduleHandler->getModuleList(); 319 $modules = $this->moduleList; @deepakkm I don't think this is correct because
$this->moduleHandler->getModuleList();
returns an array of extensions where$this->moduleList
returns theextension.list.module
service object.changed this line in version 15 of the diff
407 419 break; 408 420 409 421 case 'module': 410 $list = $this->moduleHandler->getModuleList(); 411 if (!isset($list[$value])) { 422 $list = $this->moduleList->getName($value); 423 if (!isset($list)) { @deepakkm Not sure what we are doing here ? This seems incorrect to me. Because
$this->moduleList->getName($value);
always returns a string value, there'll be no case where it'll returnNULL
.changed this line in version 15 of the diff
554 566 } 555 567 556 568 if (empty($config)) { 557 // @todo Inject this dependency in the constructor. 558 \Drupal::logger('config_update_ui')->error('Malformed config file @config_name.', ['@config_name' => $name]); 569 $this->logger->get('config_update_ui')->error('Malformed config file @config_name.', ['@config_name' => $name]); @deepakkm Let's not fix this. Though this change is correct & completely makes sense, but this change itself is not making PHPCS CI green. Let's resolve all PHPCS issues in a separate ticket.
changed this line in version 14 of the diff
327 339 ]; 328 340 329 341 // Make a list of installed themes. 330 $themes = $this->themeHandler->listInfo(); 342 $themes = $this->themeList; @deepakkm I don't think this is correct because
$this->themeList->listInfo();
returns an array of extensions where$this->themeList
returns theextension.list.theme
service object.changed this line in version 15 of the diff