Problem/Motivation

The Custom Menu Breadcrumbs module is currently not fully compatible with Drupal 11. The core_version_requirement needs to be updated, and any deprecated APIs or outdated PHP practices flagged by the upgrade_status tool must be addressed to ensure a smooth transition to the latest major version.

Steps to reproduce

  • Install the module on a Drupal 11 ready environment.
  • Run the upgrade_status analysis on the module's codebase to expose deprecations.

Proposed resolution

  • Update custom_menu_breadcrumbs.info.yml to allow Drupal 10 and 11 compatibility (^10 || ^11).
  • Resolve any core API deprecations (such as outdated service calls or routing methods) to align with Drupal 11 standards.
  • Ensure modern PHP syntax and coding standards are applied where necessary.

Remaining tasks

Code review, testing, and merge.

User interface changes

None.

API changes

None.

Data model changes

None.

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

ion.eftodii created an issue. See original summary.

vinodhini.e’s picture

Status: Needs review » Needs work

Hi, I applied the patch and tested the module on a Drupal 11.2.5 setup. I also ran the Upgrade Status report to verify compatibility.

The module is partially working, but a few issues were reported by Upgrade Status that still need to be addressed for full Drupal 11 compatibility:

Reported issues:

web/modules/contrib/custom_menu_breadcrumbs/custom_menu_breadcrumbs.module, Line : 21
→ Call to an undefined static method Drupal::url()

web/modules/contrib/custom_menu_breadcrumbs/src/Breadcrumb/CustomMenuBreadcrumbsBuilder.php, Line : 85
→ Unsafe usage of new static()

web/modules/contrib/custom_menu_breadcrumbs/src/Breadcrumb/CustomMenuBreadcrumbsBuilder.php, Line : 154
→ Call to an undefined method ::t()

web/modules/contrib/custom_menu_breadcrumbs/src/Form/Config.php, Line : 42
→ ConfigFormBase::__construct() invoked with incorrect parameters (1 given, 2 required)

web/modules/contrib/custom_menu_breadcrumbs/src/Form/Config.php, Line : 51
→ Unsafe usage of new static()

These issues need to be resolved to ensure full compatibility with Drupal 11. Thanks.

ion.eftodii’s picture

Hi @vinodhini.e,
Thank you for testing.

Could you please re-test with the latest commit 927ea6d6 and see if it resolves the issues on your end?

Thanks for your help!

ion.eftodii’s picture

Status: Needs work » Needs review
vinodhini.e’s picture

Hi @ion.eftodii,

I have re-tested the module using the latest commit 927ea6d6.

  • Applied the latest changes on my local setup.
  • Re-ran the Upgrade Status report.
  • No issues are reported in the Upgrade Status.
  • Verified the functionality of the custom breadcrumb module.

Thank you for the update and the fix!

ion.eftodii’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs review +Needs merge request
ion.eftodii’s picture

Title: Automated Drupal 11 compatibility fixes. » Drupal 11 compatibility fixes
Assigned: ion.eftodii » Unassigned