Problem/Motivation

This function is dead code since around 2013, it seems to be a hook_menu() callback. Postponed on #3571067: [12.x] Remove hook_hook_info and support in HookCollectorPass, once that lands we can remove the whole file.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3572687

Command icon 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

berdir created an issue. See original summary.

nicxvan’s picture

Title: [pp-1] Remove module_test_load() and module_test.module » Remove module_test_load() and module_test.module
Status: Postponed » Active
berdir’s picture

Issue tags: +Novice

Novice instructions: Create a MR that removes the module_test.module file.

karthik_gundu made their first commit to this issue’s fork.

karthik_gundu’s picture

Created merge request removing module_test.module as suggested in the novice instructions.
MR: https://git.drupalcode.org/project/drupal/-/merge_requests/14994

scontzen’s picture

Assigned: Unassigned » scontzen
scontzen’s picture

Assigned: scontzen » Unassigned
Status: Active » Needs work

Thanks @karthik_gundu for working on this!

The file removal is correct.

However, the pipeline fails because the PHPStan baseline still references the deleted file:

Invalid entry in ignoreErrors:

Path "/builds/core/modules/system/tests/modules/module_test/module_test.module" is neither a directory, nor a file path, nor a fnmatch pattern.

The corresponding entry in core/.phpstan-baseline.php (lines 28716-28721) also needs to be removed:

$ignoreErrors[] = [
        'message' => '#^Function module_test_load\\(\\) has no return type specified\\.$#',
        'identifier' => 'missingType.return',
        'count' => 1,
        'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.module',
  ];

Setting to Needs work for the missing baseline cleanup.

thirteenthdown made their first commit to this issue’s fork.

thirteenthdown’s picture

Status: Needs work » Needs review

I checked out the existing MR branch and removed the orphaned PHPStan baseline entry from core/.phpstan-baseline.php that was causing the pipeline to fail at the static analysis stage. The MR should now be green and the dead code removal is complete. Changing the status to Needs Review.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

MR is green, this looks good now.

  • catch committed 7904ce30 on main
    refactor: #3572687 Remove module_test_load() and module_test.module
    
    By...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.