Problem/Motivation

Drupal 8 has dropped hook_menu() in favor of hook_menu_links_default(), which in turn has been superseded by the use of YAML files.

Change records here:

Many of the D8 examples still have hook_menu(), and these should be converted.

Also, in accordance with the Examples module checklist, each of these menu paths should have a functional test, to make sure they work properly.

Proposed resolution

The following modules still have hook_menu() implementations:

For each of these, we need to do the following:

  • Convert the module to using *.menu_links.yml files.
  • Write a test which verifies that 1) The menu links appear on the front page, and also that 2) A request to each link yields a result of 200. The PHPUnit Example module has a test for the presence of the menu items. We should follow its lead with all of these.
  • We can also verify that there is a test which performs drupalGet() on the path, to make sure the route is set up correctly in addition to the menu link.

Create a separate issue for each module and link to it here.

Remaining tasks

User interface changes

API changes

Comments

djevans’s picture

Title: Change all hook_menu() implementations to hook_menu_link_defaults(), add tests » Change all hook_menu() implementations to *.menu_links.yml files, add tests
Issue summary: View changes

Changed issue title to reflect https://drupal.org/node/2228089.

Mile23’s picture

Thanks, djevans.

Mile23’s picture

Issue summary: View changes
Issue tags: +Novice
Mile23’s picture

Issue summary: View changes
Mile23’s picture

Issue summary: View changes
Mile23’s picture

Issue summary: View changes
Mile23’s picture

Status: Active » Fixed

Everything accomplished, other than scope change for #2218567: Update js_example to demonstrate *.libraries.yml.

Thanks to everyone who contributed a patch!

Status: Fixed » Closed (fixed)

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