Missing parent constructor call in RenameAdminPathsSettingsForm

Created on 3 May 2024, about 2 months ago

Problem/Motivation

The parent constructor call is missing in RenameAdminPathsSettingsForm.php. This is because the module is using its own Config service. Let's either call the parent constructor or document why we are doing it this way.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ptmkenny
  • 🇮🇳India aman1248

    Hy @ptmkenny ,

    In the RenameAdminPathsSettingsForm class, you're already using the ConfigFormBase class as a parent class. The ConfigFormBase class has its own constructor that you don't need to explicitly call. When you call parent::submitForm($form, $formState);, it already executes the necessary logic from the parent class constructor.

    So, there's no need to explicitly call the parent constructor in your RenameAdminPathsSettingsForm class. Just keep using parent::submitForm($form, $formState); as you're doing.

  • Status changed to Needs review about 2 months ago
  • 🇮🇳India aman1248

    Hy @ptmkenny , please check
    thanks

  • 🇯🇵Japan ptmkenny

    @Amandeep123 Do you know if there is any performance difference between calling the parent constructor in the class vs. waiting to have it called when calling parent::submitForm()?

  • Status changed to Active about 2 months ago
Production build 0.69.0 2024